This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch jbilleter/python-3.9 in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit b2be0673ea01ca02dd1f24bca224c267e09de7ca Author: Jürg Billeter <[email protected]> AuthorDate: Sun Nov 2 18:58:11 2025 +0100 Drop support for Python 3.9 Python 3.9 is no longer maintained upstream and at least one Python package (Click) has dropped support for it. --- .github/common.env | 4 +-- .github/compose/ci.docker-compose.yml | 5 --- .github/workflows/ci.yml | 1 - .github/workflows/release.yml | 1 - doc/source/main_install.rst | 2 +- pyproject.toml | 3 +- requirements/requirements.in | 1 - setup.py | 5 ++- src/buildstream/_pluginfactory/pluginoriginpip.py | 5 +-- tests/conftest.py | 5 +-- tox.ini | 40 +++++++++++------------ 11 files changed, 29 insertions(+), 43 deletions(-) diff --git a/.github/common.env b/.github/common.env index 1bd0bc72b..152504fd6 100644 --- a/.github/common.env +++ b/.github/common.env @@ -1,6 +1,6 @@ # Shared common variables CI_IMAGE_VERSION=master-2057058575 -CI_TOXENV_MAIN=py39,py310,py311,py312,py313,py314 -CI_TOXENV_PLUGINS=py39-plugins,py310-plugins,py311-plugins,py312-plugins,py313-plugins,py314-plugins +CI_TOXENV_MAIN=py310,py311,py312,py313,py314 +CI_TOXENV_PLUGINS=py310-plugins,py311-plugins,py312-plugins,py313-plugins,py314-plugins CI_TOXENV_ALL="${CI_TOXENV_MAIN},${CI_TOXENV_PLUGINS}" diff --git a/.github/compose/ci.docker-compose.yml b/.github/compose/ci.docker-compose.yml index 69f7016f9..e9797bd58 100644 --- a/.github/compose/ci.docker-compose.yml +++ b/.github/compose/ci.docker-compose.yml @@ -98,11 +98,6 @@ services: # on the PyPA official 'manylinux' images that define the base ABI for # Python binary packages. - wheels-manylinux_2_28-cp39: - <<: *tests-template - image: quay.io/pypa/manylinux_2_28_x86_64 - command: .github/wheel-helpers/test-wheel-manylinux.sh cp39 /opt/python/cp39-cp39/bin/python3 - wheels-manylinux_2_28-cp310: <<: *tests-template image: quay.io/pypa/manylinux_2_28_x86_64 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58540ebd0..07faedc0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,6 @@ jobs: # The names here should map to a valid service defined in # "../compose/ci.docker-compose.yml" test-name: - - wheels-manylinux_2_28-cp39 - wheels-manylinux_2_28-cp310 - wheels-manylinux_2_28-cp311 - wheels-manylinux_2_28-cp312 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b81151f6..7de62f6e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,6 @@ jobs: # The names here should map to a valid service defined in # "../compose/ci.docker-compose.yml" test-name: - - wheels-manylinux_2_28-cp39 - wheels-manylinux_2_28-cp310 - wheels-manylinux_2_28-cp311 - wheels-manylinux_2_28-cp312 diff --git a/doc/source/main_install.rst b/doc/source/main_install.rst index 6bf635811..7714c6cd6 100644 --- a/doc/source/main_install.rst +++ b/doc/source/main_install.rst @@ -35,7 +35,7 @@ Runtime requirements BuildStream requires the following Python environment to run: -- python3 >= 3.9 +- python3 >= 3.10 - PyPI packages as specified in `requirements.in <https://github.com/apache/buildstream/blob/master/requirements/requirements.in>`_. diff --git a/pyproject.toml b/pyproject.toml index 7c6008b57..5f4204bf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,11 @@ environment = { BST_BUNDLE_BUILDBOX = "1" } manylinux-x86_64-image = "manylinux_2_28" skip = [ - # BuildStream supports Python >= 3.9 + # BuildStream supports Python >= 3.10 "cp36-*", "cp37-*", "cp38-*", + "cp39-*", # PyPy may work, but nobody is testing it so avoid distributing prebuilt binaries. "pp*", # Skipping this niche archicture ~halves overall build time. diff --git a/requirements/requirements.in b/requirements/requirements.in index 232bbc4b2..73b011fda 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -1,7 +1,6 @@ Click >= 7.0, != 8.2.2 grpcio Jinja2 >= 2.10 -importlib_metadata >= 3.6; python_version < "3.10" packaging pluginbase protobuf <9,>=5.29 diff --git a/setup.py b/setup.py index 3c6aecb95..e8162f237 100755 --- a/setup.py +++ b/setup.py @@ -44,10 +44,10 @@ if version.startswith("0+untagged"): # Python requirements ################################################################## REQUIRED_PYTHON_MAJOR = 3 -REQUIRED_PYTHON_MINOR = 9 +REQUIRED_PYTHON_MINOR = 10 if sys.version_info[0] != REQUIRED_PYTHON_MAJOR or sys.version_info[1] < REQUIRED_PYTHON_MINOR: - print("BuildStream requires Python >= 3.9") + print("BuildStream requires Python >= 3.10") sys.exit(1) try: @@ -322,7 +322,6 @@ setup( "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/src/buildstream/_pluginfactory/pluginoriginpip.py b/src/buildstream/_pluginfactory/pluginoriginpip.py index 2fe4563cd..998d9bf7d 100644 --- a/src/buildstream/_pluginfactory/pluginoriginpip.py +++ b/src/buildstream/_pluginfactory/pluginoriginpip.py @@ -35,10 +35,7 @@ class PluginOriginPip(PluginOrigin): from packaging.requirements import Requirement, InvalidRequirement - if sys.version_info >= (3, 10): - from importlib.metadata import distribution, PackageNotFoundError - else: - from importlib_metadata import distribution, PackageNotFoundError + from importlib.metadata import distribution, PackageNotFoundError # Sources and elements are looked up in separate # entrypoint groups from the same package. diff --git a/tests/conftest.py b/tests/conftest.py index aa8e60838..cef7dfbef 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,10 +29,7 @@ from buildstream._testing.integration import integration_cache # pylint: disabl from tests.testutils.repo.tar import Tar -if sys.version_info >= (3, 10): - from importlib.metadata import entry_points -else: - from importlib_metadata import entry_points +from importlib.metadata import entry_points # diff --git a/tox.ini b/tox.ini index 62362f64e..bb67161da 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ # Tox global configuration # [tox] -envlist = py{39,310,311,312,313,314} +envlist = py{310,311,312,313,314} skip_missing_interpreters = true isolated_build = true @@ -33,30 +33,30 @@ BST_PLUGINS_VERSION = 79649529cffb695d0d22195ed9a4910c80ca6907 # 2.5.0 [testenv] usedevelop = # This is required by Cython in order to get coverage for cython files. - py{39,310,311,312,313,314}-!nocover: True + py{310,311,312,313,314}-!nocover: True commands = # Running with coverage reporting enabled - py{39,310,311,312,313,314}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} + py{310,311,312,313,314}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs} # Running with coverage reporting disabled - py{39,310,311,312,313,314}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs} + py{310,311,312,313,314}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs} # Running external plugins tests with coverage reporting enabled - py{39,310,311,312,313,314}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs} + py{310,311,312,313,314}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs} # Running external plugins tests with coverage disabled - py{39,310,311,312,313,314}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs} + py{310,311,312,313,314}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs} commands_post: - py{39,310,311,312,313,314}-!nocover: mkdir -p .coverage-reports - py{39,310,311,312,313,314}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} + py{310,311,312,313,314}-!nocover: mkdir -p .coverage-reports + py{310,311,312,313,314}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname} deps = - py{39,310,311,312,313,314}: -rrequirements/requirements.txt - py{39,310,311,312,313,314}: -rrequirements/dev-requirements.txt - py{39,310,311,312,313,314}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}} + py{310,311,312,313,314}: -rrequirements/requirements.txt + py{310,311,312,313,314}: -rrequirements/dev-requirements.txt + py{310,311,312,313,314}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}} # Install local sample plugins for testing pip plugin origins - py{39,310,311,312,313,314}: {toxinidir}/tests/plugins/sample-plugins + py{310,311,312,313,314}: {toxinidir}/tests/plugins/sample-plugins # Install external plugins for plugin tests - py{39,310,311,312,313,314}-plugins: git+https://gitlab.com/buildstream/buildstream-plugins-community.git@{env:BST_PLUGINS_COMMUNITY_VERSION:{[config]BST_PLUGINS_COMMUNITY_VERSION}}#egg=bst_plugins_community[deb] + py{310,311,312,313,314}-plugins: git+https://gitlab.com/buildstream/buildstream-plugins-community.git@{env:BST_PLUGINS_COMMUNITY_VERSION:{[config]BST_PLUGINS_COMMUNITY_VERSION}}#egg=bst_plugins_community[deb] # Only require coverage and pytest-cov when using it !nocover: -rrequirements/cov-requirements.txt @@ -84,18 +84,18 @@ passenv = # These keys are not inherited by any other sections # setenv = - py{39,310,311,312,313,314}: COVERAGE_FILE = {envtmpdir}/.coverage - py{39,310,311,312,313,314}: BST_TEST_HOME = {envtmpdir} - py{39,310,311,312,313,314}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache - py{39,310,311,312,313,314}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config - py{39,310,311,312,313,314}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share + py{310,311,312,313,314}: COVERAGE_FILE = {envtmpdir}/.coverage + py{310,311,312,313,314}: BST_TEST_HOME = {envtmpdir} + py{310,311,312,313,314}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache + py{310,311,312,313,314}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config + py{310,311,312,313,314}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share # This is required to get coverage for Cython - py{39,310,311,312,313,314}-!nocover: BST_CYTHON_TRACE = 1 + py{310,311,312,313,314}-!nocover: BST_CYTHON_TRACE = 1 randomized: PYTEST_ADDOPTS="--random-order-bucket=global" allowlist_externals = - py{39,310,311,312,313,314}: + py{310,311,312,313,314}: mv mkdir
