Remove handling for pre-3.3 wide/narrow builds

This commit is contained in:
Hugo van Kemenade 2019-11-04 00:32:33 +02:00 committed by GitHub
parent 5006401d0b
commit 24b8501d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,22 +88,6 @@ except ImportError as v:
)
elif str(v).startswith("The _imaging extension"):
warnings.warn(str(v), RuntimeWarning)
elif "Symbol not found: _PyUnicodeUCS2_" in str(v):
# should match _PyUnicodeUCS2_FromString and
# _PyUnicodeUCS2_AsLatin1String
warnings.warn(
"The _imaging extension was built for Python with UCS2 support; "
"recompile Pillow or build Python --without-wide-unicode. ",
RuntimeWarning,
)
elif "Symbol not found: _PyUnicodeUCS4_" in str(v):
# should match _PyUnicodeUCS4_FromString and
# _PyUnicodeUCS4_AsLatin1String
warnings.warn(
"The _imaging extension was built for Python with UCS4 support; "
"recompile Pillow or build Python --with-wide-unicode. ",
RuntimeWarning,
)
# Fail here anyway. Don't let people run with a mostly broken Pillow.
# see docs/porting.rst
raise