Mailing List Archive

bpo-36346: Document removal schedule of deprecate APIs (GH-20879)
https://github.com/python/cpython/commit/2d6f2eed14ff5d89155b52771cc8ef957e8145b4
commit: 2d6f2eed14ff5d89155b52771cc8ef957e8145b4
branch: master
author: Inada Naoki <songofacandy@gmail.com>
committer: methane <songofacandy@gmail.com>
date: 2021-02-23T08:06:51+09:00
summary:

bpo-36346: Document removal schedule of deprecate APIs (GH-20879)

We will remove wstr cache in Python 3.12. See PEP 623.

files:
A Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
M Doc/c-api/arg.rst
M Doc/c-api/unicode.rst

diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index a91b3c7c9505f..1d93b35dc1c88 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -149,7 +149,7 @@ which disallows mutable objects such as :class:`bytearray`.
Previously, :exc:`TypeError` was raised when embedded null code points
were encountered in the Python string.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -158,7 +158,7 @@ which disallows mutable objects such as :class:`bytearray`.
Unicode data buffer, the second one its length. This variant allows
null code points.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -166,7 +166,7 @@ which disallows mutable objects such as :class:`bytearray`.
Like ``u``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -174,7 +174,7 @@ which disallows mutable objects such as :class:`bytearray`.
Like ``u#``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 1851c645f41d8..b603f580a8ef0 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -19,8 +19,7 @@ points must be below 1114112 (which is the full Unicode range).

:c:type:`Py_UNICODE*` and UTF-8 representations are created on demand and cached
in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
-and inefficient; it should be avoided in performance- or memory-sensitive
-situations.
+and inefficient.

Due to the transition between the old APIs and the new APIs, Unicode objects
can internally be in two states depending on how they were created:
@@ -434,7 +433,7 @@ APIs:

If *u* is ``NULL``, this function behaves like :c:func:`PyUnicode_FromUnicode`
with the buffer set to ``NULL``. This usage is deprecated in favor of
- :c:func:`PyUnicode_New`.
+ :c:func:`PyUnicode_New`, and will be removed in Python 3.12.


.. c:function:: PyObject *PyUnicode_FromString(const char *u)
@@ -676,7 +675,7 @@ APIs:
Deprecated Py_UNICODE APIs
""""""""""""""""""""""""""

-.. deprecated-removed:: 3.3 4.0
+.. deprecated-removed:: 3.3 3.12

These API functions are deprecated with the implementation of :pep:`393`.
Extension modules can continue using them, as they will not be removed in Python
diff --git a/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst b/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
new file mode 100644
index 0000000000000..b737e125f8371
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
@@ -0,0 +1,2 @@
+Update some deprecated unicode APIs which are documented as "will be removed
+in 4.0" to "3.12". See :pep:`623` for detail.

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins
bpo-36346: Document removal schedule of deprecate APIs (GH-20879) [ In reply to ]
https://github.com/python/cpython/commit/93853b73b666a0ffbf5aaee8894659580581f7d3
commit: 93853b73b666a0ffbf5aaee8894659580581f7d3
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
committer: miss-islington <31488909+miss-islington@users.noreply.github.com>
date: 2021-02-22T15:30:52-08:00
summary:

bpo-36346: Document removal schedule of deprecate APIs (GH-20879)


We will remove wstr cache in Python 3.12. See PEP 623.
(cherry picked from commit 2d6f2eed14ff5d89155b52771cc8ef957e8145b4)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>

files:
A Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
M Doc/c-api/arg.rst
M Doc/c-api/unicode.rst

diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index a187a8fb81437..7a3188009cf95 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -151,7 +151,7 @@ which disallows mutable objects such as :class:`bytearray`.
Previously, :exc:`TypeError` was raised when embedded null code points
were encountered in the Python string.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -160,7 +160,7 @@ which disallows mutable objects such as :class:`bytearray`.
Unicode data buffer, the second one its length. This variant allows
null code points.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -168,7 +168,7 @@ which disallows mutable objects such as :class:`bytearray`.
Like ``u``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

@@ -176,7 +176,7 @@ which disallows mutable objects such as :class:`bytearray`.
Like ``u#``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.

- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.

diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 62295b4c52934..61841c2c205cd 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -19,8 +19,7 @@ points must be below 1114112 (which is the full Unicode range).

:c:type:`Py_UNICODE*` and UTF-8 representations are created on demand and cached
in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
-and inefficient; it should be avoided in performance- or memory-sensitive
-situations.
+and inefficient.

Due to the transition between the old APIs and the new APIs, Unicode objects
can internally be in two states depending on how they were created:
@@ -434,7 +433,7 @@ APIs:

If *u* is ``NULL``, this function behaves like :c:func:`PyUnicode_FromUnicode`
with the buffer set to ``NULL``. This usage is deprecated in favor of
- :c:func:`PyUnicode_New`.
+ :c:func:`PyUnicode_New`, and will be removed in Python 3.12.


.. c:function:: PyObject *PyUnicode_FromString(const char *u)
@@ -676,7 +675,7 @@ APIs:
Deprecated Py_UNICODE APIs
""""""""""""""""""""""""""

-.. deprecated-removed:: 3.3 4.0
+.. deprecated-removed:: 3.3 3.12

These API functions are deprecated with the implementation of :pep:`393`.
Extension modules can continue using them, as they will not be removed in Python
diff --git a/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst b/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
new file mode 100644
index 0000000000000..b737e125f8371
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2020-06-15-10-45-45.bpo-36346.H0sS_i.rst
@@ -0,0 +1,2 @@
+Update some deprecated unicode APIs which are documented as "will be removed
+in 4.0" to "3.12". See :pep:`623` for detail.

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins