GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PEP 623: Remove wstr from Unicode · Issue #92536 · python/cpython

PEP 623: Remove wstr from Unicode #92536

New issue
Copy link
New issue
Copy link
Closed
Closed
PEP 623: Remove wstr from Unicode#92536
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@methane
methane
opened on May 9, 2022
Issue body actions

Feature or enhancement

PEP 623

Linked PRs

  • gh-92536: Argument Clinic no longer emits PyUnicode_READY() #105208
  • gh-92536: Remove PyUnicode_READY() calls #105210

Activity

  1. methane
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 9, 2022
  2. vstinner commented on May 11, 2022

    @vstinner
    vstinner
    on May 11, 2022
    Member
    More actions

    FYI the lxml project still uses uses deprecated functions:

    src/lxml/parser.pxi:            py_buffer_len = python.PyUnicode_GET_DATA_SIZE(utext)
    src/lxml/parser.pxi:            c_len = python.PyUnicode_GET_DATA_SIZE(text)
    src/lxml/python.pxd:    cdef Py_ssize_t PyUnicode_GET_DATA_SIZE(object ustring)
    

    Compiler warnings on Python 3.11:

    src/lxml/etree.c: In function ‘__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc’:
    src/lxml/etree.c:119132:5: warning: ‘PyUnicode_GET_DATA_SIZE’ is deprecated [-Wdeprecated-declarations]
    119132 |     __pyx_v_py_buffer_len = PyUnicode_GET_DATA_SIZE(__pyx_v_utext);
           |     ^~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.11/unicodeobject.h:1042,
                     from /usr/include/python3.11/Python.h:51,
                     from src/lxml/etree.c:99:
    /usr/include/python3.11/cpython/unicodeobject.h:657:26: note: declared here
      657 | static inline Py_ssize_t PyUnicode_GET_DATA_SIZE(PyObject *op)
          |                          ^~~~~~~~~~~~~~~~~~~~~~~
    src/lxml/etree.c:119141:5: warning: ‘PyUnicode_AS_DATA’ is deprecated [-Wdeprecated-declarations]
    119141 |     __pyx_v_c_text = PyUnicode_AS_DATA(__pyx_v_utext);
           |     ^~~~~~~~~~~~~~
    /usr/include/python3.11/cpython/unicodeobject.h:691:27: note: declared here
      691 | static inline const char* PyUnicode_AS_DATA(PyObject *op)
          |                           ^~~~~~~~~~~~~~~~~
    src/lxml/etree.c: In function ‘__pyx_f_4lxml_5etree__parseDoc’:
    src/lxml/etree.c:125721:7: warning: ‘PyUnicode_GET_DATA_SIZE’ is deprecated [-Wdeprecated-declarations]
    125721 |       __pyx_v_c_len = PyUnicode_GET_DATA_SIZE(__pyx_v_text);
           |       ^~~~~~~~~~~~~
    /usr/include/python3.11/cpython/unicodeobject.h:657:26: note: declared here
      657 | static inline Py_ssize_t PyUnicode_GET_DATA_SIZE(PyObject *op)
          |                          ^~~~~~~~~~~~~~~~~~~~~~~
    
  3. methane
    added a commit that references this issue on May 12, 2022

    gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)

    f9c9354
  4. methane commented on May 12, 2022

    @methane
    methane
    on May 12, 2022
    MemberAuthor
    More actions

    Thank you for reporting.
    I reported it to lxml. https://bugs.launchpad.net/lxml/+bug/1973155

    I tried to fix it but I don't have enough skill to write compile-time switch in Cython.
    If it is difficult to fix it soon, I will resurrect PyUnicode_AS_DATA and PyUnicode_GET_DATA_SIZE as dummy function that just raise an exception.

  5. vstinner commented on May 12, 2022

    @vstinner
    vstinner
    on May 12, 2022
    Member
    More actions

    I tried to fix it but I don't have enough skill to write compile-time switch in Cython.

    I wrote https://github.com/gevent/gevent/pull/1872/files which has conditional code depending on the Python version.

  6. methane
    added 2 commits that reference this issue on May 13, 2022

    pythongh-92536: Doc update about Py_UNICODE removal

    54e54b1

    gh-92536: Doc update about Py_UNICODE removal (GH-92756)

    e371d5d
  7. sweeneyde
    added a commit that references this issue on May 17, 2022

    gh-92536: Update unicode struct size to ensure MemoryError is raised (G…

    19a4252
  8. methane
    closed this as completedon May 19, 2022
  9. vstinner commented on May 19, 2022

    @vstinner
    vstinner
    on May 19, 2022
    Member
    More actions

    Well done! That was a long journey ;-)

  10. vstinner
    added a commit that references this issue on May 23, 2022

    gh-92536: Mark PyUnicode_READY() argument as unused (#93011)

    b2694ab
  11. vstinner
    added 8 commits that reference this issue on Jun 1, 2023

    pythongh-92536: Argument Clinic no longer emits PyUnicode_READY()

    def4fab

    pythongh-92536: Argument Clinic no longer emits PyUnicode_READY()

    e19ae66

    pythongh-92536: Argument Clinic no longer emits PyUnicode_READY()

    4960003

    pythongh-92536: Remove PyUnicode_READY() calls

    7861cef

    pythongh-92536: Remove PyUnicode_READY() calls

    63ba3dc

    pythongh-92536: Argument Clinic no longer emits PyUnicode_READY()

    c591ad7

    gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)

    cbb9ba8

    gh-92536: Remove PyUnicode_READY() calls (#105210)

    ef30093
  12. erlend-aasland
    added a commit that references this issue on Sep 8, 2023

    python/cpython#92536: PEP 623: Remove wstr and legacy APIs from Unico…

    e1df607
  13. AA-Turner
    added a commit that references this issue on Sep 13, 2023

    python/cpython#92536: PEP 623: Remove wstr and legacy APIs from Unico…

    03d39ac
  14. erlend-aasland
    added a commit that references this issue on Sep 26, 2023

    python/cpython#92536: PEP 623: Remove wstr and legacy APIs from Unico…

    09f1afa
  15. malemburg
    added a commit that references this issue on Jul 8, 2025

    gh-92536: Fix comment about number of unicode string types (#136439)

    a6566e4
  16. AndPuQing
    added a commit that references this issue on Jul 11, 2025

    pythongh-92536: Fix comment about number of unicode string types (pyt…

    bd3210d
  17. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-92536: Fix comment about number of unicode string types (pyt…

    a7462a3
  18. picnixz
    added a commit that references this issue on Jul 13, 2025

    pythongh-92536: Fix comment about number of unicode string types (pyt…

    9070d87
  19. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-92536: Fix comment about number of unicode string types (pyt…

    7c5c7e1
  20. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-92536: Fix comment about number of unicode string types (pyt…

    bbb4e3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.