You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by hx...@apache.org on 2021/12/31 09:20:57 UTC

[flink-ml] branch master updated: [hotfix][python] Update setup.py to throw error if python version > 3.8

This is an automated email from the ASF dual-hosted git repository.

hxb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-ml.git


The following commit(s) were added to refs/heads/master by this push:
     new 6794fc4  [hotfix][python] Update setup.py to throw error if python version > 3.8
6794fc4 is described below

commit 6794fc444be52f0622fb427511d81731f6d55b52
Author: Dong Lin <li...@gmail.com>
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)