Skip to content

gh-92536: PEP 623: Remove wstr from unicode #92537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ access to internal read-only data of Unicode objects:
subtype. This function always succeeds.


.. c:function:: int PyUnicode_READY(PyObject *o)

Returns ``0``. This API is kept only for backward compatibility.

.. versionadded:: 3.3

.. deprecated:: 3.10
This API do nothing since Python 3.12. Please remove code using this function.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API does nothing..., and I think the 'Please remove ...' can be omitted



.. c:function:: Py_ssize_t PyUnicode_GET_LENGTH(PyObject *o)

Return the length of the Unicode string, in code points. *o* has to be a
Expand All @@ -100,8 +110,7 @@ access to internal read-only data of Unicode objects:
Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4
integer types for direct character access. No checks are performed if the
canonical representation has the correct character size; use
:c:func:`PyUnicode_KIND` to select the right macro. Make sure
:c:func:`PyUnicode_READY` has been called before accessing this.
:c:func:`PyUnicode_KIND` to select the right macro.

.. versionadded:: 3.3

Expand Down
1 change: 0 additions & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Removed
* :c:func:`PyUnicode_GET_SIZE`
* :c:func:`PyUnicode_GetSize`
* :c:func:`PyUnicode_GET_DATA_SIZE`
* :c:func:`PyUnicode_READY`


Porting to Python 3.12
Expand Down