summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2020-10-04 12:09:52 +0300
committerHugo van Kemenade <hugovk@users.noreply.github.com>2020-10-04 12:49:38 +0300
commitf3a6b33144e62ce77aa767b73d930dec420a3511 (patch)
tree398aa80786dd06b15097cc2cbccfd2c78705a665 /setup.py
parent88eda2f2f430e2f3b7e580fe38ac31e4c5fac942 (diff)
downloadnumpy-f3a6b33144e62ce77aa767b73d930dec420a3511.tar.gz
ENH: Warn on unsupported Python 3.9+
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 1f5212676..b4c06c402 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ import os
import sys
import subprocess
import textwrap
-import sysconfig
+import warnings
if sys.version_info[:2] < (3, 6):
@@ -59,6 +59,13 @@ MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
+if sys.version_info >= (3, 9):
+ warnings.warn(
+ f"NumPy {VERSION} does not support Python "
+ f"{sys.version_info.major}.{sys.version_info.minor}.",
+ RuntimeWarning,
+ )
+
# Return the git revision as a string
def git_version():