Skip to content

Commit

Permalink
[FLINK-28195][python] Annotate Python3.6 as deprecated in PyFlink 1.16
Browse files Browse the repository at this point in the history
This closes apache#20078.
  • Loading branch information
HuangXingBo committed Jun 27, 2022
1 parent f9ba9d1 commit 459711b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flink-python/dev/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function install_py_env() {
if [[ ${BUILD_REASON} = 'IndividualCI' ]]; then
py_env=("3.9")
else
py_env=("3.6" "3.7" "3.8" "3.9")
py_env=("3.7" "3.8" "3.9")
fi
for ((i=0;i<${#py_env[@]};i++)) do
if [ -d "$CURRENT_DIR/.conda/envs/${py_env[i]}" ]; then
Expand Down Expand Up @@ -403,7 +403,7 @@ function install_environment() {
fi

# step-3 install python environment which includes
# 3.6 3.7 3.8 3.9
# 3.7 3.8 3.9
if [ $STEP -lt 3 ] && [ `need_install_component "py_env"` = true ]; then
print_function "STEP" "installing python environment..."
install_py_env
Expand Down Expand Up @@ -778,7 +778,7 @@ usage: $0 [options]
-l list all checks supported.
Examples:
./lint-python -s basic => install environment with basic components.
./lint-python -s py_env => install environment with python env(3.6,3.7,3.8,3.9).
./lint-python -s py_env => install environment with python env(3.7,3.8,3.9).
./lint-python -s all => install environment with all components such as python env,tox,flake8,sphinx,mypy etc.
./lint-python -s tox,flake8 => install environment with tox,flake8.
./lint-python -s tox -f => reinstall environment with tox.
Expand Down
3 changes: 3 additions & 0 deletions flink-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import os
import platform
import sys
import warnings
from distutils.command.build_ext import build_ext
from shutil import copytree, copy, rmtree

Expand All @@ -30,6 +31,8 @@
print("Python versions prior to 3.6 are not supported for PyFlink.",
file=sys.stderr)
sys.exit(-1)
elif sys.version_info.minor == 6:
warnings.warn("Python version 3.6 won't be supported for PyFlink after 1.16.")


def remove_if_exists(file_path):
Expand Down

0 comments on commit 459711b

Please sign in to comment.