[pypy-issue] Issue #3035: CPython old-style Unicode API deprecations (pypy/pypy)

hugovk issues-reply at bitbucket.org
Mon Jul 1 16:09:04 EDT 2019


New issue 3035: CPython old-style Unicode API deprecations
https://bitbucket.org/pypy/pypy/issues/3035/cpython-old-style-unicode-api-deprecations

hugovk:

CPython deprecated `PyUnicode_AS_UNICODE` \(amongst others\) in CPython 3.3, and will remove it in CPython 4.0.

[https://docs.python.org/3/c-api/unicode.html#c.PyUnicode\_AS\_UNICODE](https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_AS_UNICODE)

Are there any plans to deprecate/remove/replace it in PyPy?

More generally, how does PyPy deal with deprecations made in CPython?

---

We had a [PR](https://github.com/python-pillow/Pillow/pull/3780) in our project to replace `PyUnicode_AS_UNICODE` with `PyUnicode_AsUCS4Copy` or `PyUnicode_READ_CHAR`. Whilst this was fine for CPython, we got an [error](https://github.com/python-pillow/Pillow/issues/3835#issuecomment-507351734) on PyPy3:

`_imagingft.obj : error LNK2019: unresolved external symbol _PyUnicode_AsUCS4Copy referenced in function _text_layout_raqm`

With:

Python 3.6.1 \(784b254d6699, Apr 16 2019, 12:10:48\)  
\[PyPy 7.1.1-beta0 with MSC v.1910 32 bit\] on win32

and:

Python 3.5.3 \(928a4f70d3de, Feb 08 2019, 12:56:35\)  
\[PyPy 7.0.0 with MSC v.1910 32 bit\] on win32

Thank you!




More information about the pypy-issue mailing list