File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ Abstract
1717
1818Add a new ``PyBytesWriter `` C API to create ``bytes `` objects.
1919
20- It replaces the ``PyBytes_FromStringAndSize(NULL, size) `` and
21- ``_PyBytes_Resize() `` APIs which treat an immutable ``bytes `` object as
22- a mutable object.
20+ Soft deprecate ``PyBytes_FromStringAndSize(NULL, size) `` and
21+ ``_PyBytes_Resize() `` APIs. These APIs treat an immutable ``bytes ``
22+ object as a mutable object. They remain available and maintained, don't
23+ emit deprecation warning, but are no longer recommended when writing new
24+ code.
2325
2426
2527Rationale
@@ -188,6 +190,18 @@ Thread safety
188190The API is not thread safe: a writer should only be used by a single
189191thread at the same time.
190192
193+ Soft deprecations
194+ -----------------
195+
196+ Soft deprecate ``PyBytes_FromStringAndSize(NULL, size) `` and
197+ ``_PyBytes_Resize() `` APIs. These APIs treat an immutable ``bytes ``
198+ object as a mutable object. They remain available and maintained, don't
199+ emit deprecation warning, but are no longer recommended when writing new
200+ code.
201+
202+ ``PyBytes_FromStringAndSize(str, size) `` is not soft deprecated. Only
203+ calls with ``NULL `` *str * are soft deprecated.
204+
191205
192206Examples
193207========
You can’t perform that action at this time.
0 commit comments