FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-80527: Deprecate PEP 623 Unicode functions by vstinner · Pull Request #91801 · python/cpython · GitHub

Repository navigation

gh-80527: Deprecate PEP 623 Unicode functions - #91801

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:unicode_deprecate
Apr 22, 2022
Merged

vstinner merged 2 commits into
python:mainfrom
vstinner:unicode_deprecate

Conversation

Copy link
Copy Markdown
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().

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

I converted these macros to functions in commit 636ad7b.

methane commented Apr 22, 2022

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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

Oh ok, nice!

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

Copy link
Copy Markdown
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!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL