This is an automated email from the ASF dual-hosted git repository. mgreber pushed a commit to branch branch-1.17.x in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 3a1c75b8cbcbd9d5de0c7efd2d8441dabccbb83f Author: Marton Greber <greber...@gmail.com> AuthorDate: Mon Apr 29 16:02:40 2024 +0000 [Python] Update dependencies and 3.10 support This patch updates the package dependencies to clearly define the supported Python versions. Previously, supported versions were determined through trial and error (KUDU-2951). With this update, the following versions are now explicitly supported: - Python 2.7 - Python 3.6 to 3.10 (inclusive) This patch adds support for the newer Python versions 3.9 and 3.10. Support for Python versions 3.0 to 3.5 has been discontinued due to dependency complications in this range. However, this decision can be revisited based on community feedback. To re-add support for these versions, use the following marker in `setup.py` and `requirements.txt`: 'python_version >= 3.0, < 3.6'. Testing was conducted manually on: - Ubuntu 20: Python 2.7, Python 3.6 to 3.10 - SLES 15 SP5: Python 3.10 The `setup.py` file has been updated to reflect these changes, ensuring the correct versions are visible on PyPI upon the next release. Change-Id: I930a15018158563996819fb33d32a3bb5641c396 Reviewed-on: http://gerrit.cloudera.org:8080/21380 Tested-by: Marton Greber <greber...@gmail.com> Reviewed-by: Attila Bukor <abu...@apache.org> Reviewed-by: Zoltan Martonka <zmarto...@cloudera.com> Reviewed-on: http://gerrit.cloudera.org:8080/21853 Reviewed-by: Marton Greber <greber...@gmail.com> --- python/requirements.txt | 32 +++++++++++++------------------- python/setup.py | 33 +++++++++++++++++---------------- 2 files changed, 30 insertions(+), 35 deletions(-) diff --git a/python/requirements.txt b/python/requirements.txt index 6a5ff3cb4..6bc741b07 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,22 +1,16 @@ -# pytest 3.3 dropped support for python 2.6. -# -# See https://docs.pytest.org/en/latest/changelog.html#id164 for more details. -pytest >=2.8,<3.3 +pytest ==4.6.11; python_version == "2.7" +pytest ==6.2.5; python_version >= "3.6" -# pytest-timeout 1.2.1 dropped support for python 2.6. -# -# See https://pypi.org/project/pytest-timeout/#id5 for more details. -pytest-timeout >=1.1.0,<1.2.1 +pytest-timeout ==1.4.2; python_version == "2.7" +pytest-timeout ==2.1.0; python_version >= "3.6" -cython ==0.29.14 -six -unittest2 -pytz +pytest-runner <5.3.0; python_version == "2.7" +pytest-runner ==5.3.2; python_version >= "3.6" -# This is a dependency of pytest, but if we don't list it here, python 2.6 -# virtualenvs will fail in build_ext with this exception: -# -# pkg_resources.DistributionNotFound: The 'setuptools_scm>=1.15.0' distribution was not found and is required by the application -# -# See https://github.com/pypa/setuptools_scm/issues/209 for more details. -setuptools_scm +unittest2 ==1.1.0 + +cython ==0.29.14; python_version == "2.7" +cython ==0.29.37; python_version >= "3.6" + +six ==1.16.0 +pytz ==2024.1 diff --git a/python/setup.py b/python/setup.py index 86fe70b73..d46038061 100644 --- a/python/setup.py +++ b/python/setup.py @@ -174,8 +174,11 @@ CLASSIFIERS = [ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Cython' ] @@ -191,24 +194,22 @@ setup( 'clean': clean, 'build_ext': build_ext }, - # pytest-runner 5.3.0 [1] started requiring python 3.6 or later. - # - # 1. https://github.com/pytest-dev/pytest-runner/blob/v5.3.0/CHANGES.rst - setup_requires=['pytest-runner <5.3.0'], + setup_requires=['pytest-runner <5.3.0; python_version == "2.7"', + 'pytest-runner ==5.3.2; python_version >= "3.6"'], # Note: dependencies in tests_require should also be listed in # requirements.txt so that dependencies aren't downloaded at test-time # (when it's more difficult to override various pip installation options). - # - # pytest 3.3 [1] and pytest-timeout 1.2.1 [2] dropped - # support for python 2.6. - # - # 1. https://docs.pytest.org/en/latest/changelog.html#id164 - # 2. https://pypi.org/project/pytest-timeout/#id5 - tests_require=['pytest >=2.8,<3.3', - 'pytest-timeout >=1.1.0,<1.2.1'], - - install_requires=['cython >= 0.21', 'pytz', 'six'], + tests_require=['pytest ==4.6.11; python_version == "2.7"', + 'pytest ==6.2.5; python_version >= "3.6"', + 'pytest-timeout ==1.4.2; python_version == "2.7"', + 'pytest-timeout ==2.1.0; python_version >= "3.6"', + 'unittest2 ==1.1.0'], + + install_requires=['cython ==0.29.14; python_version == "2.7"', + 'cython ==0.29.37; python_version >= "3.6"', + 'six ==1.16.0', + 'pytz ==2024.1'], description=DESCRIPTION, long_description=LONG_DESCRIPTION, license='Apache License, Version 2.0',