Merge remote-tracking branch 'upstream/master' into anchor-part3

This commit is contained in:
nulano 2020-10-12 16:14:00 +01:00
commit b49ebad5f5
4 changed files with 3 additions and 26 deletions

View File

@ -33,9 +33,10 @@ pip install pyroma
pip install test-image-results pip install test-image-results
pip install numpy pip install numpy
# TODO Remove when 3.8 / 3.9 includes setuptools 49.3.2+: # TODO Remove when 3.8 / 3.9 / PyPy3 includes setuptools 49.3.2+:
if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.8" ]; then pip install -U "setuptools>=49.3.2" ; fi
if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then pip install -U "setuptools>=49.3.2" ; fi if [ "$GHA_PYTHON_VERSION" == "3.9" ]; then pip install -U "setuptools>=49.3.2" ; fi
if [ "$TRAVIS_PYTHON_VERSION" == "pypy3.6-7.3.1" ]; then pip install -U "setuptools>=49.3.2" ; fi
if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then
# arm64, ppc64le, s390x CPUs: # arm64, ppc64le, s390x CPUs:

View File

@ -26,7 +26,7 @@ matrix:
- python: "3.8" - python: "3.8"
arch: s390x arch: s390x
- python: "pypy3" - python: "pypy3.6-7.3.1"
name: "PyPy3 Xenial" name: "PyPy3 Xenial"
- python: "3.9-dev" - python: "3.9-dev"
name: "3.9-dev Xenial" name: "3.9-dev Xenial"

View File

@ -15,7 +15,6 @@ from .helper import (
assert_image_equal_tofile, assert_image_equal_tofile,
assert_image_similar, assert_image_similar,
assert_image_similar_tofile, assert_image_similar_tofile,
is_pypy,
is_win32, is_win32,
skip_unless_feature, skip_unless_feature,
skip_unless_feature_version, skip_unless_feature_version,
@ -509,7 +508,6 @@ class TestImageFont:
with pytest.raises(UnicodeEncodeError): with pytest.raises(UnicodeEncodeError):
font.getsize("") font.getsize("")
@pytest.mark.xfail(is_pypy(), reason="failing on PyPy with Raqm")
def test_unicode_extended(self): def test_unicode_extended(self):
# issue #3777 # issue #3777
text = "A\u278A\U0001F12B" text = "A\u278A\U0001F12B"

View File

@ -368,27 +368,6 @@ text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *
goto failed; goto failed;
} }
#if (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM < 0x07020000))
if (PyUnicode_Check(string)) {
Py_UNICODE *text = PyUnicode_AS_UNICODE(string);
Py_ssize_t size = PyUnicode_GET_SIZE(string);
if (! size) {
/* return 0 and clean up, no glyphs==no size,
and raqm fails with empty strings */
goto failed;
}
if (!(*p_raqm.set_text)(rq, (const uint32_t *)(text), size)) {
PyErr_SetString(PyExc_ValueError, "raqm_set_text() failed");
goto failed;
}
if (lang) {
if (!(*p_raqm.set_language)(rq, lang, start, size)) {
PyErr_SetString(PyExc_ValueError, "raqm_set_language() failed");
goto failed;
}
}
}
#else
if (PyUnicode_Check(string)) { if (PyUnicode_Check(string)) {
Py_UCS4 *text = PyUnicode_AsUCS4Copy(string); Py_UCS4 *text = PyUnicode_AsUCS4Copy(string);
Py_ssize_t size = PyUnicode_GET_LENGTH(string); Py_ssize_t size = PyUnicode_GET_LENGTH(string);
@ -410,7 +389,6 @@ text_layout_raqm(PyObject* string, FontObject* self, const char* dir, PyObject *
} }
} }
} }
#endif
else { else {
PyErr_SetString(PyExc_TypeError, "expected string"); PyErr_SetString(PyExc_TypeError, "expected string");
goto failed; goto failed;