This is an automated email from the ASF dual-hosted git repository.
hxb pushed a commit to branch release-2.0
in repository https://gitbox.apache.org/repos/asf/flink-ml.git
The following commit(s) were added to refs/heads/release-2.0 by this push:
new 2ff7d98 [hotfix][python] Update setup.py to throw error if python
version > 3.8
2ff7d98 is described below
commit 2ff7d9809c5998b3f06a7a60401c6be89f7c77ab
Author: Dong Lin <[email protected]>
AuthorDate: Fri Dec 31 09:53:03 2021 +0800
[hotfix][python] Update setup.py to throw error if python version > 3.8
This closes #51.
---
flink-ml-python/setup.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/flink-ml-python/setup.py b/flink-ml-python/setup.py
index f3f8aa6..319ba55 100644
--- a/flink-ml-python/setup.py
+++ b/flink-ml-python/setup.py
@@ -18,13 +18,14 @@
import io
import os
import sys
+from platform import python_version
from shutil import copytree, rmtree
from setuptools import setup
-if sys.version_info < (3, 6):
- print("Python versions prior to 3.6 are not supported for Flink ML.",
- file=sys.stderr)
+if sys.version_info < (3, 6) or sys.version_info > (3, 8):
+ print("Only Python versions between 3.6 and 3.8 (inclusive) are supported
for Flink ML. "
+ "The current Python version is %s." % python_version(),
file=sys.stderr)
sys.exit(-1)