Skip to content
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

gh-80527: Deprecate PEP 623 Unicode functions #91801

Merged
merged 2 commits into from
Apr 22, 2022
Merged

gh-80527: Deprecate PEP 623 Unicode functions #91801

merged 2 commits into from
Apr 22, 2022

Conversation

vstinner
Copy link
Member

Deprecate functions:

  • PyUnicode_AS_DATA()
  • PyUnicode_AS_UNICODE()
  • PyUnicode_GET_DATA_SIZE()
  • PyUnicode_GET_SIZE()

Previously, these functions were macros and so it wasn't possible to
decorate them with Py_DEPRECATED().

Deprecate functions:

* PyUnicode_AS_DATA()
* PyUnicode_AS_UNICODE()
* PyUnicode_GET_DATA_SIZE()
* PyUnicode_GET_SIZE()

Previously, these functions were macros and so it wasn't possible to
decorate them with Py_DEPRECATED().
@vstinner
Copy link
Member Author

@methane @serhiy-storchaka: Would one of you review this change? Thanks.

@vstinner
Copy link
Member Author

I converted these macros to functions in commit 636ad7b.

@methane
Copy link
Member

methane commented Apr 22, 2022

Previously, these functions were macros and so it wasn't possible to
decorate them with Py_DEPRECATED().

FWIW, use of these macros caused deprecation warning because wstr and wstr_length are deprecated.

@vstinner
Copy link
Member Author

FWIW, use of these macros caused deprecation warning because wstr and wstr_length are deprecated.

Oh ok, nice!

@vstinner vstinner merged commit 9e146bb into python:main Apr 22, 2022
@vstinner vstinner deleted the unicode_deprecate branch April 22, 2022 11:05
@vstinner
Copy link
Member Author

Well, I prefer to make it extra explicit that these functions will be removed soon (Python 3.12) ;-) I'm impatient, I would like to see wstr being removed as soon as possible, I hate the PyUnicode_READY() function!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants