Skip to content

gh-154757: Remove the deprecated Py_UNICODE type - #154759

Open
fedonman wants to merge 5 commits into
python:mainfrom
fedonman:remove-py-unicode-typedef
Open

fedonman wants to merge 5 commits into
python:mainfrom
fedonman:remove-py-unicode-typedef

Conversation

@fedonman

@fedonman fedonman commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Py_UNICODE is a typedef to wchar_t, deprecated by :pep:393 since 3.3 and at runtime since 3.13, listed for removal in 3.16. This removes it, and PY_UNICODE_TYPE, the same typedef deprecated alongside it in 3.13.

Nothing in CPython used either typedef. The Argument Clinic Py_UNICODE converter is unrelated: it generates const wchar_t *. Neither is in the stable ABI.

Documentation references are kept with the link suppressed (:c:type:!Py_UNICODE``), as GH-133657 did for PyWeakref_GetObject, and the anchor is recorded in `Doc/tools/removed-ids.txt`.

This covers one of the three groups in gh-154757 and one box in gh-133644. The other two groups are not touched here: GH-136277 and GH-133654 are already open for them, and Py_SetProgramName and PySys_SetArgv were reverted once before in gh-117987.

Verified with a full build (make -j), test_capi and test_clinic (1986 tests, SUCCESS). A file using Py_UNICODE or PY_UNICODE_TYPE now fails to compile with "unknown type name", while wchar_t still works. Sphinx is not installed here, so the docs build is unverified locally.

Py_UNICODE was a typedef to wchar_t, deprecated by PEP 393 since Python 3.3
and at runtime since Python 3.13, and scheduled for removal in 3.16. Nothing
in CPython used it: the Argument Clinic converter of the same name generates
const wchar_t *, and the typedef is not part of the stable ABI.

The documentation references to it are kept, with the link suppressed, as was
done for PyWeakref_GetObject in pythonGH-133657.
@read-the-docs-community

read-the-docs-community Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Comment thread Doc/whatsnew/3.3.rst Outdated
@fedonman
fedonman requested a review from hugovk August 28, 2026 21:57

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO PY_UNICODE_TYPE should also be removed in the same PR.

@encukou

encukou commented Sep 24, 2026

Copy link
Copy Markdown
Member

Why not keep both? Simple typedefs have virtually no maintenance cost.

@vstinner

Copy link
Copy Markdown
Member

Py_UNICODE is a ghost from the past. It was only relevant when a large part of the PyUnicode C API used this type (as Py_UNICODE* strings). In Python 3.16, using Py_UNICODE is no longer relevant. Using wchar_t makes the code less Pythonic (easier to understand for people not used to Python C API).

Removing Py_UNICODE can help C extensions maintainers to discover bugs in their old code (especially if the code was written with Py_UNICODE APIs and was updated later to newer APIs)

@fedonman

Copy link
Copy Markdown
Contributor Author

I left PY_UNICODE_TYPE out because only Py_UNICODE is on the 3.16 removal list. Unlike Py_UNICODE_WIDE, both typedefs have given a compiler deprecation warning since 3.13. I'll follow whatever you two settle on: remove one, both, or neither.

@encukou

encukou commented Sep 29, 2026

Copy link
Copy Markdown
Member

Removing Py_UNICODE can help C extensions maintainers to discover bugs in their old code (especially if the code was written with Py_UNICODE APIs and was updated later to newer APIs)

That seems unlikely to me. What kinds of bugs is this likely to help discover?

Removing Py_UNICODE means that any project that uses it is forced to change code. If they find the porting instructions in the removal notice, they'll replace Py_UNICODE by wchar_t. I don't think that has much potential for finding bugs. (But, of course, each such forced trivial change is a chance for the project to re-evaluate whether Python support is worth the churn.)

@vstinner

Copy link
Copy Markdown
Member

@encukou: If we don't remove Py_UNICODE in Python 3.16, we should at least postpone its removal in the docs. Does it mean that we should keep forever?


I searched for (Py_UNICODE|PY_UNICODE_TYPE)\b regex in PyPI top 15,000 projects and sadly I found 29 projects:

  • Distance (0.1.3)
  • PyICU-binary (2.7.4)
  • PyQt5 (5.15.11)
  • cffi (2.1.1)
  • cu2qu-1.6.7.post2
  • cython (3.3.0)
  • genshi (0.7.11)
  • igwn_ligolw (2.1.1)
  • line_profiler (5.0.2)
  • lxml (6.1.3)
  • minorminer (0.2.22)
  • netifaces (0.11.0)
  • netifaces_plus (0.12.5)
  • nuitka (4.2.1)
  • orjson (3.12.0)
  • pyScss (1.4.0)
  • pyahocorasick (2.3.1)
  • pygments (2.21.0)
  • pyicu (2.16.2)
  • pyobjc_core (12.2.2)
  • pypyodbc (1.3.6)
  • pystack (1.7.1)
  • pywin32-ctypes (0.2.3)
  • pywinpty (3.0.5)
  • rcssmin (1.2.2)
  • rjsmin (1.2.5)
  • simplejson (4.1.2)
  • tiled (0.2.18)
  • twisted_iocpsupport (25.10.1)

Notes:

  • Cython 3.0.9 (2024-03-05) changelog says "The deprecated Py_UNICODE type is no longer used, unless required by user code."
  • cffi: The matching lines comes from Python 2 code (not used on Python 3.3 and newer).
  • lxml: Py_UNICODE is only used on Python 3.11 and older.
  • A single line mention PY_UNICODE_TYPE and it comes from a copy of CPython unicodeobject.h header file.

I didn't check if Py_UNICODE is actually used in other projects:

Details
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: register Py_UNICODE *u;
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: return PyUnicode_FromUnicode((const Py_UNICODE *)w, size);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: return PyUnicode_FromUnicode((const Py_UNICODE *)w, size);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u_base = PyUnicode_AS_UNICODE(result);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = u_base;
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cffi-2.1.1.tar.gz: cffi-2.1.1/src/c/wchar_helper.h: Py_UNICODE *u = PyUnicode_AS_UNICODE(unicode);
PYPI-2026-09-17/cu2qu-1.6.7.post2.zip: cu2qu-1.6.7.post2/Lib/cu2qu/cython.py: int_types = ['char', 'short', 'Py_UNICODE', 'int', 'Py_UCS4', 'long', 'longlong', 'Py_ssize_t', 'size_t']
PYPI-2026-09-17/cu2qu-1.6.7.post2.zip: cu2qu-1.6.7.post2/Lib/cu2qu/cython.py: if name not in ('Py_UNICODE', 'Py_UCS4') and not name.endswith('size_t'):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Code.py: # return a Py_UNICODE[] constant, creating a new one if necessary
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Code.py: # Generate legacy Py_UNICODE[] constants.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Code.py: decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf32_array))
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Code.py: decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf16_array))
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: (unicode_type, PyrexTypes.c_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.",
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: (unicode_type, PyrexTypes.c_const_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.",
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: (unicode_type, PyrexTypes.c_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.",
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: (unicode_type, PyrexTypes.c_const_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.",
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: (bytes_type, PyrexTypes.c_py_unicode_ptr_type): "Cannot convert 'bytes' object to Py_UNICODE*, use 'str'.",
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: "Cannot convert 'bytes' object to Py_UNICODE*, use 'str'."),
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: error(self.pos, "Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.")
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: "surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.")
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: "than Py_UCS4/Py_UNICODE (for characters), Py_UNICODE* "
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: # sliced Py_UNICODE* strings must coerce to Python
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: # we infer Py_UNICODE/Py_UCS4 for unicode strings in some
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: # Py_UNICODE/Py_UCS4 will automatically coerce to a unicode string
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: "Py_UNICODE* has been removed in Python 3.12. This conversion to a "
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/ExprNodes.py: "Py_UNICODE* will no longer compile in the latest Python versions. "
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Optimize.py: len(Py_UNICODE) by the equivalent Py_UNICODE_strlen() and
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Optimize.py: """Unpack ord(Py_UNICODE) and ord('X').
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/Parsing.py: "Py_UNICODE" : (0, 0),
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: #  is_unicode_char       boolean     Is either Py_UCS4 or Py_UNICODE
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: # Py_UNICODE
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: # Py_UNICODE coerces from and to single character unicode strings,
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: # Py_UNICODE is 0..1114111, which is checked when converting from
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: from_py_function = "__Pyx_PyObject_AsPy_UNICODE"
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: return "Py_UNICODE"
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: #  is_pyunicode_ptr  bool           Pointer is a Py_UNICODE*.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: "Py_UNICODE": (0, c_py_unicode_type),
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/PyrexTypes.py: # Py_UNICODE behaves more like a string than an int
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Compiler/StringEncoding.py: """Create Py_UNICODE[] representation of a given unicode string.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: _type_Py_UNICODE = gdb.lookup_type('Py_UNICODE')
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: return _type_Py_UNICODE.sizeof
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: # Gather a list of ints from the Py_UNICODE array; these are either
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: # A more elaborate routine if sizeof(Py_UNICODE) is 2 in the
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: # This splits surrogate pairs if sizeof(Py_UNICODE) is 2 here (in gdb).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Debugger/libpython.py: # If sizeof(Py_UNICODE) is 2 here (in gdb), join
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/array.pxd: Py_UNICODE *as_pyunicodes
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/long.pxd: object PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Return a pointer to the internal Py_UNICODE buffer of the
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: Py_UNICODE* PyUnicode_AS_UNICODE(object o)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Create a Unicode Object from the Py_UNICODE buffer u of the
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: unicode PyUnicode_FromUnicode(Py_UNICODE *u, Py_ssize_t size)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE buffer, NULL if unicode is not a Unicode object.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: Py_UNICODE* PyUnicode_AsUnicode(object o) except NULL
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE type is identical to the system's wchar_t.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size and return a
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: object PyUnicode_Encode(Py_UNICODE *s, Py_ssize_t size,
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using UTF-8 and
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeUTF8(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # If Py_UNICODE_WIDE is defined, a single Py_UNICODE value may get
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE values is interpreted as an UCS-2 character.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeUTF16(Py_UNICODE *s, Py_ssize_t size, char *errors, int byteorder)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeUnicodeEscape(Py_UNICODE *s, Py_ssize_t size)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeRawUnicodeEscape(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using Latin-1 and
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeLatin1(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using ASCII and
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeASCII(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using the given
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeCharmap(Py_UNICODE *s, Py_ssize_t size, object mapping, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Translate a Py_UNICODE buffer of the given length by applying a
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: object PyUnicode_TranslateCharmap(Py_UNICODE *s, Py_ssize_t size,
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using MBCS and
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeMBCS(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: 'Py_UNICODE',
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: if name not in ('Py_UNICODE', 'Py_UCS4', 'Py_hash_t', 'ptrdiff_t') and not name.endswith('size_t'):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: Py_UNICODE = py_int | str
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: const_Py_UNICODE : TypeAlias = const[py_int]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: p_const_Py_UNICODE = pointer[const[py_int]]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: pp_const_Py_UNICODE = pointer[pointer[const[py_int]]]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: ppp_const_Py_UNICODE = pointer[pointer[pointer[const[py_int]]]]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: p_Py_UNICODE = pointer[py_int]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: pp_Py_UNICODE = pointer[pointer[py_int]]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Shadow.py: ppp_Py_UNICODE = pointer[pointer[pointer[py_int]]]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Tests/TestShadow.py: int_name in ['Py_UNICODE', 'Py_UCS4', 'Py_ssize_t',
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: static CYTHON_INLINE Py_ssize_t __Pyx_Py_UNICODE_ssize_strlen(const Py_UNICODE *u);/*proto*/
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: static CYTHON_INLINE Py_ssize_t __Pyx_Py_UNICODE_ssize_strlen(const Py_UNICODE *u) {
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: PyErr_SetString(PyExc_OverflowError, "Py_UNICODE string is too long");
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u); /* proto */
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: // Note: will not work in the limited API since Py_UNICODE is not available there.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/StringTools.c: const Py_UNICODE *u_end = u;
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject*);
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) {
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: "only single character unicode strings can be converted to Py_UNICODE, "
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: return (Py_UNICODE)-1;
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: "cannot convert negative value to Py_UNICODE");
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: return (Py_UNICODE)-1;
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: "value too large to convert to Py_UNICODE");
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: return (Py_UNICODE)-1;
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/TypeConversion.c: return (Py_UNICODE)ival;
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/Cython/Utility/arrayarray.h: // Don't use Py_UNICODE ourselves in the union. This avoids deprecation warnings
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/runtests.py: 'run.py_unicode_strings',  # Py_UNICODE was removed
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/charptr_from_temp.pyx: cdef Py_UNICODE* cuptr
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/charptr_from_temp.pyx: 38:8: Py_UNICODE* has been removed in Python 3.12. This conversion to a Py_UNICODE* will no longer compile in the latest Python versions. Use Python C API functions like PyUnicode_AsWideCharString if you need to obtain a wchar_t* on Windows (and free the string manually after use).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/charptr_from_temp.pyx: 41:8: Obtaining 'Py_UNICODE *' from externally modifiable global Python value
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/charptr_from_temp.pyx: 41:8: Py_UNICODE* has been removed in Python 3.12. This conversion to a Py_UNICODE* will no longer compile in the latest Python versions. Use Python C API functions like PyUnicode_AsWideCharString if you need to obtain a wchar_t* on Windows (and free the string manually after use).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/charptr_from_temp.pyx: 44:10: Py_UNICODE* has been removed in Python 3.12. This conversion to a Py_UNICODE* will no longer compile in the latest Python versions. Use Python C API functions like PyUnicode_AsWideCharString if you need to obtain a wchar_t* on Windows (and free the string manually after use).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/e_strcoerce.pyx: cdef Py_UNICODE u1 = u"\xFF"   # works
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/e_strcoerce.pyx: 11:14: Unicode literals do not support coercion to C types other than Py_UCS4/Py_UNICODE (for characters), Py_UNICODE* (for strings) or char*/void* (for auto-encoded strings).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_ucs4_type_errors.pyx: 8:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_ucs4_type_errors.pyx: 11:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_ucs4_type_errors.pyx: 17:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE char_ASCII = u'A'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE char_KLINGON = u'\uF8D2'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE c = u'AB'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE c = u'A\uF8D2'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE c = b'AB'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: cdef Py_UNICODE char_bytes_latin1 = b'\xf6'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: 8:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: 11:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/py_unicode_type_errors.pyx: 17:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: cdef Py_UNICODE* cu1 = u1
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: cdef Py_UNICODE* cu_f1 = c1
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: cdef Py_UNICODE* cu_f2 = b1
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: cdef Py_UNICODE* cu_f3 = s1
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: cdef Py_UNICODE* cu_f4 = b"abc"
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 36:20: Unicode literals do not support coercion to C types other than Py_UCS4/Py_UNICODE (for characters), Py_UNICODE* (for strings) or char*/void* (for auto-encoded strings).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 37:20: Unicode objects only support coercion to Py_UNICODE*.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 38:20: Unicode objects only support coercion to Py_UNICODE*.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 40:25: Cannot assign type 'char *' to 'Py_UNICODE *'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 41:25: Cannot convert 'bytes' object to Py_UNICODE*, use 'str'.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 43:25: Cannot convert 'bytes' object to Py_UNICODE*, use 'str'.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/errors/string_assignments.pyx: 77:20: Unicode literals do not support coercion to C types other than Py_UCS4/Py_UNICODE (for characters), Py_UNICODE* (for strings) or char*/void* (for auto-encoded strings).
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/limited_api_bugs.txt: # Py_UNICODE
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/builtin_ord.pyx: def ord_Py_UNICODE(unicode s):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/builtin_ord.pyx: >>> ord_Py_UNICODE(uspace)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/builtin_ord.pyx: cdef Py_UNICODE u
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/for_in_string.pyx: cdef Py_UNICODE c
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/for_in_string.pyx: cdef Py_UNICODE c
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/fstring.pyx: def format_c_values(Py_UCS4 uchar, Py_UNICODE pyunicode):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/inop.pyx: def m_unicode_literal(Py_UNICODE a):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/inop.pyx: def conditional_unicode(Py_UNICODE a):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/notinop.pyx: def conditional_unicode(Py_UNICODE a):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef assert_Py_UNICODE_equal(const Py_UNICODE* u1, const Py_UNICODE* u2):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: ctypedef Py_UNICODE* LPWSTR
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef Py_UNICODE* c_pu_str = u"unicode\u1234"
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef Py_UNICODE[42] c_pu_arr
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef Py_UNICODE* c_pu_empty = u""
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef Py_UNICODE* c_pu_wide_literal = u'\U00020000\U00020001'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: memcpy(c_pu_arr, c_pu_str, sizeof(Py_UNICODE) * (len(uobj) + 1))
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: cdef Py_UNICODE ch = uobj[1]  # Py_UCS4 is unsigned, Py_UNICODE is usually signed.
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert sizeof(c_pu_arr) == sizeof(Py_UNICODE) * 42
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: if sizeof(Py_UNICODE) >= 4:
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert_Py_UNICODE_equal(<Py_UNICODE*>u"u", u)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert_Py_UNICODE_equal(<Py_UNICODE*>u"nicode", u)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert_Py_UNICODE_equal(<Py_UNICODE*>u"n", u)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert_Py_UNICODE_equal(uwide_literal, <Py_UNICODE*>c_pu_wide_literal)
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_strings.pyx: assert len(<Py_UNICODE*>u"abc\0") == 3
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: cdef Py_UNICODE char_ASCII = u'A'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: cdef Py_UNICODE char_KLINGON = u'\uF8D2'
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def unicode_ordinal(Py_UNICODE i):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: ValueError: only single character unicode strings can be converted to Py_UNICODE, got length 0
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: ValueError: only single character unicode strings can be converted to Py_UNICODE, got length 2
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def ord_pyunicode(Py_UNICODE x):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def unicode_type_methods(Py_UNICODE uchar):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def unicode_methods(Py_UNICODE uchar):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def len_uchar(Py_UNICODE uchar):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def index_uchar(Py_UNICODE uchar, Py_ssize_t i):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/py_unicode_type.pyx: def uchar_lookup_in_dict(obj, Py_UNICODE uchar):
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/unicode_indexing.pyx: return <Py_UNICODE>(u"12345"[i])
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/unicode_indexing.pyx: cdef Py_UNICODE result = u"12345"[i]
PYPI-2026-09-17/cython-3.3.0.tar.gz: cython-3.3.0/tests/run/unicode_indexing.pyx: cdef Py_UNICODE result = u"12345"[i]
PYPI-2026-09-17/Distance-0.1.3.tar.gz: distance/cdistance/distance.h: typedef Py_UNICODE unicode;
PYPI-2026-09-17/genshi-0.7.11.tar.gz: genshi-0.7.11/genshi/_speedups.c: Py_UNICODE *inp, *outp;
PYPI-2026-09-17/igwn_ligolw-2.1.1.tar.gz: igwn_ligolw-2.1.1/debian/changelog: * tokenizer drop use in Py_UNICODE in favour of wchar_t
PYPI-2026-09-17/line_profiler-5.0.2.tar.gz: line_profiler-5.0.2/line_profiler/python25.pxd: ctypedef unsigned short Py_UNICODE
PYPI-2026-09-17/line_profiler-5.0.2.tar.gz: line_profiler-5.0.2/line_profiler/python25.pxd: object              PyInt_FromUnicode               (Py_UNICODE*, Py_ssize_t, int)
PYPI-2026-09-17/line_profiler-5.0.2.tar.gz: line_profiler-5.0.2/line_profiler/python25.pxd: object              PyLong_FromUnicode              (Py_UNICODE*, Py_ssize_t, int)
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/CHANGES.txt: to the native UTF-8 encoding directly, instead of going through ``Py_UNICODE`` /
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: # name of Python Py_UNICODE encoding as known to libxml2
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: cdef Py_UNICODE *uchars = [c'<', c't', c'e', c's', c't', c'/', c'>']
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: enc = _findEncodingName(buffer, sizeof(Py_UNICODE) * 7)
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: # Python 3.12 removed support for "Py_UNICODE".
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: # old Py_UNICODE string
PYPI-2026-09-17/lxml-6.1.3.tar.gz: lxml-6.1.3/src/lxml/parser.pxi: # old Py_UNICODE string
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/array.pxd: Py_UNICODE *as_pyunicodes
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/long.pxd: object PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Return a pointer to the internal Py_UNICODE buffer of the
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: Py_UNICODE* PyUnicode_AS_UNICODE(object o)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Used to return a Py_UNICODE value before Py3.3.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Create a Unicode Object from the Py_UNICODE buffer u of the
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: unicode PyUnicode_FromUnicode(Py_UNICODE *u, Py_ssize_t size)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE buffer, NULL if unicode is not a Unicode object.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: Py_UNICODE* PyUnicode_AsUnicode(object o) except NULL
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE type is identical to the system's wchar_t.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size and return a
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: object PyUnicode_Encode(Py_UNICODE *s, Py_ssize_t size,
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using UTF-8 and
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeUTF8(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # If Py_UNICODE_WIDE is defined, a single Py_UNICODE value may get
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Py_UNICODE values is interpreted as an UCS-2 character.
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeUTF16(Py_UNICODE *s, Py_ssize_t size, char *errors, int byteorder)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeUnicodeEscape(Py_UNICODE *s, Py_ssize_t size)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeRawUnicodeEscape(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using Latin-1 and
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeLatin1(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using ASCII and
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeASCII(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using the given
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: object PyUnicode_EncodeCharmap(Py_UNICODE *s, Py_ssize_t size, object mapping, char *errors)
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Translate a Py_UNICODE buffer of the given length by applying a
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: object PyUnicode_TranslateCharmap(Py_UNICODE *s, Py_ssize_t size,
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: # Encode the Py_UNICODE buffer of the given size using MBCS and
PYPI-2026-09-17/minorminer-0.2.22.tar.gz: minorminer-0.2.22/env/lib/python3.12/site-packages/Cython/Includes/cpython/unicode.pxd: bytes PyUnicode_EncodeMBCS(Py_UNICODE *s, Py_ssize_t size, char *errors)
PYPI-2026-09-17/netifaces-0.11.0.tar.gz: netifaces-0.11.0/netifaces.c: Py_UNICODE uc = 0;
PYPI-2026-09-17/netifaces_plus-0.12.5.tar.gz: netifaces_plus-0.12.5/netifaces/_netifaces.c: Py_UNICODE uc = 0;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/include/nuitka/string_functions.h: NUITKA_MAY_BE_UNUSED static Py_UNICODE *Nuitka_UnicodeAsWideString(PyObject *str, Py_ssize_t *size) {
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/CompiledCodeHelpers.c: Py_UNICODE *buffer = PyUnicode_AS_UNICODE(object);
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: const Py_UNICODE *data1 = a->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: const Py_UNICODE *data2 = b->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: int cmp = memcmp(data1, data2, len * sizeof(Py_UNICODE));
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: const Py_UNICODE *data1 = a->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: const Py_UNICODE *data2 = b->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonEq.c: int cmp = memcmp(data1, data2, len * sizeof(Py_UNICODE));
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: const Py_UNICODE *data1 = a->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: const Py_UNICODE *data2 = b->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: int cmp = memcmp(data1, data2, len * sizeof(Py_UNICODE));
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: const Py_UNICODE *data1 = a->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: const Py_UNICODE *data2 = b->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersComparisonNe.c: int cmp = memcmp(data1, data2, len * sizeof(Py_UNICODE));
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersOperationInplaceAddUtils.c: operand2_size * sizeof(Py_UNICODE));
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersStrings.c: if (length > ((PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(Py_UNICODE)) - 1)) {
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersStrings.c: Py_ssize_t new_size = sizeof(Py_UNICODE) * ((size_t)length + 1);
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/build/static_src/HelpersStrings.c: _PyUnicode_WSTR(unicode) = (Py_UNICODE *)NuitkaObject_Malloc(new_size);
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2: const Py_UNICODE *data1 = a->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2: const Py_UNICODE *data2 = b->str;
PYPI-2026-09-17/nuitka-4.2.1.tar.gz: nuitka-4.2.1/nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2: int cmp = memcmp(data1, data2, len * sizeof(Py_UNICODE));
PYPI-2026-09-17/orjson-3.12.0.tar.gz: orjson-3.12.0/include/cargo/pyo3-ffi-0.28.3/src/unicodeobject.rs: pub type Py_UNICODE = wchar_t;
PYPI-2026-09-17/pyahocorasick-2.3.1.tar.gz: pyahocorasick-2.3.1/src/AutomatonItemsIter.c: return PyUnicode_FromUnicode((Py_UNICODE*)(iter->buffer + 1), depth);
PYPI-2026-09-17/pygments-2.21.0.tar.gz: pygments-2.21.0/tests/examplefiles/c/ceval.c: Py_UNICODE *s = PyUnicode_AS_UNICODE(v);
PYPI-2026-09-17/pygments-2.21.0.tar.gz: pygments-2.21.0/tests/examplefiles/c/ceval.c.output: 'Py_UNICODE'  Name
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/bases.cpp: Py_UNICODE c = (Py_UNICODE) u->charAt(n);
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: else if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: return PyUnicode_FromUnicode((const Py_UNICODE *) utf16, len16);
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: Py_UNICODE *pchars = PyUnicode_AS_UNICODE(u);
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: else if (sizeof(Py_UNICODE) == sizeof(UChar32))
PYPI-2026-09-17/pyicu-2.16.2.tar.gz: pyicu-2.16.2/common.cpp: Py_UNICODE *pchars = PyUnicode_AS_UNICODE(object);
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/bases.cpp: Py_UNICODE c = (Py_UNICODE) u->charAt(n);
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: else if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: return PyUnicode_FromUnicode((const Py_UNICODE *) utf16, len16);
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: Py_UNICODE *pchars = PyUnicode_AS_UNICODE(u);
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: if (sizeof(Py_UNICODE) == sizeof(UChar))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: else if (sizeof(Py_UNICODE) == sizeof(UChar32))
PYPI-2026-09-17/PyICU-binary-2.7.4.tar.gz: PyICU-binary-2.7.4/common.cpp: Py_UNICODE *pchars = PyUnicode_AS_UNICODE(object);
PYPI-2026-09-17/pyobjc_core-12.2.2.tar.gz: pyobjc_core-12.2.2/Modules/objc/OC_PythonUnicode.m: * This can be slightly optimized on systems where sizeof(Py_UNICODE) ==
PYPI-2026-09-17/pyobjc_core-12.2.2.tar.gz: pyobjc_core-12.2.2/Modules/objc/OC_PythonUnicode.m: /* NOTE: the malloc() call can be avoided when sizeof(unichar) == sizeof(Py_UNICODE)
PYPI-2026-09-17/pypyodbc-1.3.6.tar.gz: pypyodbc-1.3.6/pypyodbc.py: #determin the size of Py_UNICODE
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/designer/pluginloader.cpp: ucs4.size() * sizeof (Py_UNICODE));
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/designer/pluginloader.cpp: native_dir.length() * sizeof (Py_UNICODE));
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/qmlscene/pluginloader.cpp: ucs4.size() * sizeof (Py_UNICODE));
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/qmlscene/pluginloader.cpp: py_plugin_dir.length() * sizeof (Py_UNICODE));
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/qpy/QtCore/qpycore_qstring.cpp: ucs4.size() * sizeof (Py_UNICODE));
PYPI-2026-09-17/PyQt5-5.15.11.tar.gz: PyQt5-5.15.11/qpy/QtCore/qpycore_qstring.cpp: qstr.length() * sizeof (Py_UNICODE));
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.c: int _strip(Py_UNICODE *begin, Py_UNICODE *end, int *lineno, Py_UNICODE **out) {
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.c: Py_UNICODE *block_start = NULL;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.c: Py_UNICODE *block_start = NULL;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.c: Py_UNICODE *block_start = NULL;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.c: Py_UNICODE *codestr_end = self->codestr + self->codestr_sz;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *selprop;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *codestr;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *codestr;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *codestr_ptr;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE instr;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *init;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *lose;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *start;
PYPI-2026-09-17/pyScss-1.4.0.tar.gz: pyScss-1.4.0/scss/src/block_locator.h: Py_UNICODE *end;
PYPI-2026-09-17/pystack-1.7.1.tar.gz: pystack-1.7.1/src/pystack/_pystack/cpython/string.h: typedef Py_UCS4 Py_UNICODE;
PYPI-2026-09-17/pystack-1.7.1.tar.gz: pystack-1.7.1/src/pystack/_pystack/cpython/string.h: Py_UNICODE* str;
PYPI-2026-09-17/pywin32-ctypes-0.2.3.tar.gz: pywin32-ctypes-0.2.3/win32ctypes/core/ctypes/_common.py: PPy_UNICODE = c_void_p
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* Py_UNICODE was the native Unicode storage format (code unit) used by
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: With PEP 393, Py_UNICODE is deprecated and replaced with a
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: #define PY_UNICODE_TYPE wchar_t
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* Py_DEPRECATED(3.3) */ typedef wchar_t Py_UNICODE;
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* --- Plain Py_UNICODE --------------------------------------------------- */
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: wstr/Py_UNICODE representation. This function is used to convert Unicode
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* Create a Unicode Object from the Py_UNICODE buffer u of the given
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: const Py_UNICODE *u,        /* Unicode buffer */
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: Py_UNICODE buffer.
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: If the wchar_t/Py_UNICODE representation is not yet available, this
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: Py_UNICODE buffer and save the length at size.
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: If the wchar_t/Py_UNICODE representation is not yet available, this
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicodeAndSize(
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* Returns the deprecated Py_UNICODE representation's size in code units
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: If the Py_UNICODE representation is not available, it will be computed
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: /* Alias for PyUnicode_AsUnicode().  This will create a wchar_t/Py_UNICODE
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: static inline Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *op)
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/cpython/unicodeobject.h: Py_UNICODE *data = PyUnicode_AS_UNICODE(op);
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/unicodeobject.h: /* Get the number of Py_UNICODE units in the
PYPI-2026-09-17/pywinpty-3.0.5.tar.gz: pywinpty-3.0.5/pythonarm64/tools/include/unicodeobject.h: is the number of Py_UNICODE characters.
PYPI-2026-09-17/rcssmin-1.2.2.tar.gz: rcssmin-1.2.2/cext.h: #define EXT_UNI_CP Py_UNICODE
PYPI-2026-09-17/rcssmin-1.2.2.tar.gz: rcssmin-1.2.2/cext.h: #error "Cannot recognize sizeof(Py_UNICODE)"
PYPI-2026-09-17/rcssmin-1.2.2.tar.gz: rcssmin-1.2.2/cext.h: ((Py_UNICODE) (((const Py_UNICODE *)(data))[(index)]))
PYPI-2026-09-17/rcssmin-1.2.2.tar.gz: rcssmin-1.2.2/cext.h: ((Py_UNICODE *)(data))[(index)] = (Py_UNICODE)(value); \
PYPI-2026-09-17/rcssmin-1.2.2.tar.gz: rcssmin-1.2.2/cext.h: (PyUnicode_FromUnicode((Py_UNICODE *)data, length))
PYPI-2026-09-17/rjsmin-1.2.5.tar.gz: rjsmin-1.2.5/cext.h: #define EXT_UNI_CP Py_UNICODE
PYPI-2026-09-17/rjsmin-1.2.5.tar.gz: rjsmin-1.2.5/cext.h: #error "Cannot recognize sizeof(Py_UNICODE)"
PYPI-2026-09-17/rjsmin-1.2.5.tar.gz: rjsmin-1.2.5/cext.h: ((Py_UNICODE) (((const Py_UNICODE *)(data))[(index)]))
PYPI-2026-09-17/rjsmin-1.2.5.tar.gz: rjsmin-1.2.5/cext.h: ((Py_UNICODE *)(data))[(index)] = (Py_UNICODE)(value); \
PYPI-2026-09-17/rjsmin-1.2.5.tar.gz: rjsmin-1.2.5/cext.h: (PyUnicode_FromUnicode((Py_UNICODE *)data, length))
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: #define PyUnicode_KIND(obj) (sizeof(Py_UNICODE))
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: #define PyUnicode_READ(kind, data, index) ((JSON_UNICHR)((const Py_UNICODE *)(data))[(index)])
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: #define JSON_UNICHR Py_UNICODE
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: Py_UNICODE c = 0;
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: chunk = PyUnicode_FromUnicode(&((const Py_UNICODE *)buf)[end], next - end);
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: Py_UNICODE *output = PyUnicode_AS_UNICODE(rval);
PYPI-2026-09-17/simplejson-4.1.2.tar.gz: simplejson-4.1.2/simplejson/_speedups.c: PyUnicode_FromUnicode(&((Py_UNICODE *)str)[(sidx)], (eidx) - (sidx))
PYPI-2026-09-17/tiled-0.2.18.tar.gz: tiled-0.2.18/tiled/structures/array.py: unicode = "U"  # fixed-length sequence of Py_UNICODE
PYPI-2026-09-17/twisted_iocpsupport-25.10.1.tar.gz: twisted_iocpsupport-25.10.1/twisted_iocpsupport/iocpsupport.pyx: ctypedef Py_UNICODE WCHAR

@encukou

encukou commented Sep 29, 2026

Copy link
Copy Markdown
Member

Does it mean that we should keep forever?

Yes, that's the current guidance in PEP-387:

If the expected maintenance overhead and security risk of the deprecated behavior is small (e.g. an old function is reimplemented in terms of a new, more general one), it can stay indefinitely (or until the situation changes).

@hugovk

hugovk commented Sep 29, 2026

Copy link
Copy Markdown
Member

An LLM check on the 29 projects:

Summary: one actively maintained project breaks (lxml), and the root cause is Cython. Everything else is either dead code behind Python 2 / pre-3.3 guards, already broken on 3.12+, or not C code at all.

Details

I went through Victor's list of 29 projects by downloading each sdist and checking the preprocessor guards around every Py_UNICODE match, and by compiling lxml's shipped etree.c against headers with the typedef removed.

Would break on 3.16 with this PR (compiles fine on 3.13 today)

  • lxml 6.1.3 (and lxml master). _setupPythonUnicode() in src/lxml/parser.pxi declares cdef Py_UNICODE *uchars. The call is guarded by PY_VERSION_HEX < 0x030C0000 at runtime, but Cython compiles the function unconditionally. The shipped etree.c compiles cleanly against current main (with two Py_UNICODE is deprecated warnings) and fails with 14 errors against headers without the typedef, all from etree.c:129077 and :129080. lxml master still has this code; its only added guard is #define Py_UNICODE wchar_t under Py_LIMITED_API, so normal builds are still affected.
  • Cython 3.3.0 itself. Any cdef Py_UNICODE in user code is emitted verbatim as Py_UNICODE in the generated C: CPyUnicodeIntType.sign_and_name() returns "Py_UNICODE" in 3.3.0 and on master. So this removal breaks every Cython project using the type until Cython emits wchar_t instead. lxml is one such project.
  • PyICU-binary 2.7.4. Seven unguarded sizeof(Py_UNICODE) == sizeof(UChar) comparisons in bases.cpp. Abandoned fork, last released September 2021. The real PyICU 2.16.2 guards every use with PY_VERSION_HEX < 0x030d0000 and is fine.

Already broken on 3.12+ regardless (they use PyUnicode_AS_UNICODE, removed in 3.12)

  • pyScss 1.4.0 (2022): unconditional Py_UNICODE in block_locator.c. The C speedups are optional and fall back to pure Python.
  • Distance 0.1.3 (2013): unconditional typedef. The C extension only builds with an explicit --with-c flag.

Not affected

  • Guarded to Python 2 or pre-3.3: genshi, netifaces, netifaces_plus, simplejson, rcssmin, rjsmin, cffi (wchar_helper.h is only included when PyUnicode_KIND is undefined), pyahocorasick, pyicu 2.16.2, PyQt5, nuitka (guards at 3.0 and 3.12).
  • Cython declarations that never reach C: twisted_iocpsupport (the ctypedef Py_UNICODE WCHAR is inside an extern from "windows.h" block; the cythonized output contains no Py_UNICODE), line_profiler (python25.pxd is not cimported by anything).
  • Own definitions or non-C: pystack (its own typedef in a pystack namespace, no Python.h), orjson (Rust pyo3-ffi alias), pyobjc_core (comments), cu2qu, igwn_ligolw, minorminer (vendored virtualenv), pygments (test fixture), pypyodbc, pywin32-ctypes, pywinpty (vendored CPython header), tiled.

PY_UNICODE_TYPE matched nothing outside pywinpty's vendored copy of unicodeobject.h, so removing it as well has no additional cost on this list.

So the practical blocker is Cython: a Cython release that emits wchar_t for Py_UNICODE, plus a regenerated lxml sdist, would resolve the only real breakage.

@vstinner

Copy link
Copy Markdown
Member

@fedonman: Can you update the PR to remove also PY_UNICODE_TYPE?

@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 26, 2026
@fedonman

Copy link
Copy Markdown
Contributor Author

Done, PY_UNICODE_TYPE is removed too.

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

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants