-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Conversation
@@ -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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.)
5fd68e5
to
944753d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocked by #4109, good to merge once that is merged, and merge conflicts resolved here. (May as well wait until that one is merged before resolving, otherwise it'll just conflict again soon.)
#4109 is merged, this is no longer blocked. |
Rebased. |
Thanks! |
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