Skip to content

Python/C API "PyUnicode_FromObject" is listed in the "Deprecated " section #103883

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

Closed
Hizuru3 opened this issue Apr 26, 2023 · 5 comments
Closed
Labels
3.11 only security fixes 3.12 only security fixes docs Documentation in the Doc dir topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@Hizuru3
Copy link
Contributor

Hizuru3 commented Apr 26, 2023

In the documentation of Python 3.11 (or earlier), the Python/C API "PyUnicode_FromObject" is listed in the "Deprecated Py_UNICODE APIs" section, which is marked to be removed in version 3.12:

https://docs.python.org/3.11/c-api/unicode.html#deprecated-py-unicode-apis

However, the API seems not to get removed from neither of the actual implementation nor the documentation in Python 3.12. PEP 623 (https://peps.python.org/pep-0623/) doesn't even mention "PyUnicode_FromObject" as deprecated.

I suspect it is an error of the documentation, or did I miss something else?

Linked PRs

@Hizuru3 Hizuru3 added the docs Documentation in the Doc dir label Apr 26, 2023
@sunmy2019
Copy link
Member

sunmy2019 commented Apr 27, 2023

It's more like nobody remembers this or cares about this.
Rephrase: The situation here is likely due to nobody remembering this or caring about this.

@arhadthedev
Copy link
Member

arhadthedev commented Apr 27, 2023

It's more like nobody remembers this or cares about this.

Module authors will be confused after CPython 3.12.0 is out.

@methane (as an author and implementer of pep-0623).

@methane
Copy link
Member

methane commented Apr 27, 2023

pep 623 doesn't affect to PyUnicode_FromObject.

@methane
Copy link
Member

methane commented Apr 27, 2023

OK, this is 12 year old bug, since PEP 393.
db6c7f5

@methane
Copy link
Member

methane commented Apr 27, 2023

Even though this issue is disappeared in main branch, it is better to move this API to other "creating Unicode object" APIs.

@methane methane added 3.11 only security fixes 3.12 only security fixes type-bug An unexpected behavior, bug, or error needs backport to 3.11 only security fixes labels Apr 27, 2023
methane added a commit that referenced this issue Apr 27, 2023
This API is one of Unicode creator APIs.
methane added a commit to methane/cpython that referenced this issue Apr 27, 2023
…103913)

This API is one of Unicode creator APIs..
(cherry picked from commit ce2383e)

Co-authored-by: Inada Naoki <[email protected]>
methane added a commit to methane/cpython that referenced this issue Apr 27, 2023
This API is one of Unicode creator APIs.

(cherry picked from commit ce2383e)
methane added a commit that referenced this issue Apr 27, 2023
This API is one of Unicode creator APIs.
This APIs should not be placed in PEP 393 deprecated APIs.

Fixes: gh-103883

(cherry picked from commit ce2383e)
@methane methane closed this as completed Apr 27, 2023
@picnixz picnixz removed the needs backport to 3.11 only security fixes label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 only security fixes docs Documentation in the Doc dir topic-unicode type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants