Skip to content

Commit

Permalink
Merge pull request #4965 from radarhere/warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Nov 22, 2020
2 parents dac4896 + c2890d1 commit 1b4ecdf
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions setup.py
Expand Up @@ -38,12 +38,16 @@ def get_version():


if sys.platform == "win32" and sys.version_info >= (3, 10):
warnings.warn(
f"Pillow {PILLOW_VERSION} does not support Python "
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,
import atexit

atexit.register(
lambda: warnings.warn(
f"Pillow {PILLOW_VERSION} does not support Python "
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,
)
)


Expand Down

0 comments on commit 1b4ecdf

Please sign in to comment.