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.
47
47
*len * on success, and ``NULL `` on failure. If *v * is ``NULL ``, the contents of
48
48
the bytes object are uninitialized.
49
49
50
+ .. deprecated :: 3.15
51
+ ``PyBytes_FromStringAndSize(NULL, len) `` is :term: `soft deprecated `,
52
+ use the :c:type: `PyBytesWriter ` API instead.
53
+
50
54
51
55
.. c :function :: PyObject* PyBytes_FromFormat (const char *format, ...)
52
56
@@ -220,6 +224,11 @@ called with a non-bytes parameter.
220
224
*\* bytes * is set to ``NULL ``, :exc: `MemoryError ` is set, and ``-1 `` is
221
225
returned.
222
226
227
+ .. deprecated :: 3.15
228
+ The function is :term: `soft deprecated `,
229
+ use the :c:type: `PyBytesWriter ` API instead.
230
+
231
+
223
232
PyBytesWriter
224
233
-------------
225
234
Original file line number Diff line number Diff line change @@ -774,6 +774,11 @@ Deprecated C APIs
774
774
signed integer type of the same size is now deprecated.
775
775
(Contributed by Serhiy Storchaka in :gh: `132629 `.)
776
776
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
+
777
782
* Deprecate :c:member: `~PyComplexObject.cval ` field of the the
778
783
:c:type: `PyComplexObject ` type.
779
784
Use :c:func: `PyComplex_AsCComplex ` and :c:func: `PyComplex_FromCComplex `
You can’t perform that action at this time.
0 commit comments