File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ called with a non-bytes parameter.
4747 *len * on success, and ``NULL `` on failure. If *v * is ``NULL ``, the contents of
4848 the bytes object are uninitialized.
4949
50+ .. deprecated :: 3.15
51+ ``PyBytes_FromStringAndSize(NULL, len) `` is :term: `soft deprecated `,
52+ use the :c:type: `PyBytesWriter ` API instead.
53+
5054
5155.. c :function :: PyObject* PyBytes_FromFormat (const char *format, ...)
5256
@@ -220,6 +224,11 @@ called with a non-bytes parameter.
220224 *\* bytes * is set to ``NULL ``, :exc: `MemoryError ` is set, and ``-1 `` is
221225 returned.
222226
227+ .. deprecated :: 3.15
228+ The function is :term: `soft deprecated `,
229+ use the :c:type: `PyBytesWriter ` API instead.
230+
231+
223232PyBytesWriter
224233-------------
225234
Original file line number Diff line number Diff line change @@ -774,6 +774,11 @@ Deprecated C APIs
774774 signed integer type of the same size is now deprecated.
775775 (Contributed by Serhiy Storchaka in :gh: `132629 `.)
776776
777+ * :c:func: `PyBytes_FromStringAndSize(NULL, len) <PyBytes_FromStringAndSize> `
778+ and :c:func: `_PyBytes_Resize ` are :term: `soft deprecated `,
779+ use the :c:type: `PyBytesWriter ` API instead.
780+ (Contributed by Victor Stinner in :gh: `129813 `.)
781+
777782* Deprecate :c:member: `~PyComplexObject.cval ` field of the the
778783 :c:type: `PyComplexObject ` type.
779784 Use :c:func: `PyComplex_AsCComplex ` and :c:func: `PyComplex_FromCComplex `
You can’t perform that action at this time.
0 commit comments