Merge pull request #4965 from radarhere/warning

This commit is contained in:
Hugo van Kemenade 2020-11-22 23:56:46 +02:00 committed by GitHub
commit 1b4ecdf8cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,12 +38,16 @@ ZLIB_ROOT = None
if sys.platform == "win32" and sys.version_info >= (3, 10): if sys.platform == "win32" and sys.version_info >= (3, 10):
warnings.warn( import atexit
f"Pillow {PILLOW_VERSION} does not support Python "
f"{sys.version_info.major}.{sys.version_info.minor} and does not provide " atexit.register(
"prebuilt Windows binaries. We do not recommend building from source on " lambda: warnings.warn(
"Windows.", f"Pillow {PILLOW_VERSION} does not support Python "
RuntimeWarning, f"{sys.version_info.major}.{sys.version_info.minor} and does not provide "
"prebuilt Windows binaries. We do not recommend building from source on "
"Windows.",
RuntimeWarning,
)
) )