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

Fix Unicode support for PyPy #4145

Open
wants to merge 29 commits into
base: master
from

Conversation

@nulano
Copy link
Contributor

nulano commented Oct 16, 2019

Depends on #4109.

Reinstates #3780 changes reverted by #3935 for PyPy 7.2.0+.

This change also fixes Raqm support on PyPy (from #4084 (comment)).

There is a bug in PyPy that causes a failure of the test for #3777 when using Raqm, reported here: https://bitbucket.org/pypy/pypy/issues/3095/pyunicode_asucs4copy-fails-with-extended

hugovk and others added 18 commits Sep 26, 2019
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
@@ -375,7 +351,7 @@ text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *
goto failed;
}

#if (PY_VERSION_HEX < 0x03030000) || (defined(PYPY_VERSION_NUM))
#if (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM < 0x07020000))

This comment has been minimized.

Copy link
@nulano

nulano Oct 16, 2019

Author Contributor

I added a compile time PyPy version check here, to be removed in the future. What is Pillow's policy on supporting old versions of PyPy?

Aside: This fallback code fails on Windows anyway (due to the cast in the p_raqm.set_text call), see #4084 (comment).

This comment has been minimized.

Copy link
@hugovk

hugovk Oct 16, 2019

Member

For CPython we support the same versions as they do.

For PyPy, we generally only test the latest version, so maybe that too? If it's trivial to support older ones, we could do so, but I'm not sure of the value in testing many old versions.

Does the PyPy project have a policy on which PyPy versions they support?

(PyPy plan to support Python 2.7 "forever" http://doc.pypy.org/en/latest/faq.html#how-long-will-pypy-support-python2, but we won't support PyPy Python 2.7 after 2020-01-01.)

hugovk added 4 commits Oct 26, 2019
hugovk added 3 commits Nov 3, 2019
@nulano nulano force-pushed the nulano:ucs4-pypy branch from db5d7a4 to 5fd68e5 Nov 8, 2019
@nulano nulano force-pushed the nulano:ucs4-pypy branch from 5fd68e5 to 944753d Nov 8, 2019
radarhere added 2 commits Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.