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

Replace usage of old unicode API removed in Py3.12/PEP 623 #1860

Merged
merged 4 commits into from
Sep 17, 2022

Commits on Sep 5, 2022

  1. Py3.12: replace PyUnicode_EncodeMBCS with PyUnicode_AsMBCSString

    PyUnicode_AS_UNICODE removed in Py3.12 (PEP 623) / e6f7299
    kxrob committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    10ab2ba View commit details
    Browse the repository at this point in the history
  2. Py3.12: replace PyUnicode_AsUnicode, extend TmpWCHAR

    TmpWCHAR does most of the conversions and now required
    memory handling.
    Replace PyUnicode_GetSize.
    
    > The "legacy" Unicode object (buffered wstr in unicode objects)
    > will be removed in Python 3.12 with deprecated APIs. All Unicode
    > objects will be "canonical" since then. See PEP 623 for more
    > information.
    
    Those deprecated API were still used in pywin32:
    * PyUnicode_AsUnicode
    * PyUnicode_GetSize
    * PyUnicode_AS_UNICODE
    * PyUnicode_GET_SIZE, PyUnicode_GET_DATA_SIZE
    * PyUnicode_FromUnicode
    * PyUnicode_EncodeMBCS
    * u u# Z Z# in PyArg_Parse... format strings
    kxrob committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    d9d1577 View commit details
    Browse the repository at this point in the history
  3. Py3.12: replace PyUnicode_AS_UNICODE

    and replace PyUnicode_GET_SIZE, PyUnicode_GET_DATA_SIZE.
    kxrob committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    0c2011a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7359be4 View commit details
    Browse the repository at this point in the history