Skip to content

Commit 0040da4

Browse files
committed
Drop support for Python 3.8
Python 3.8 is no longer maintained upstream and some Python packages have dropped support for it.
1 parent d70d92c commit 0040da4

File tree

10 files changed

+30
-45
lines changed

10 files changed

+30
-45
lines changed

.github/common.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Shared common variables
22

33
CI_IMAGE_VERSION=master-1558808360
4-
CI_TOXENV_MAIN=py38,py39,py310,py311,py312
5-
CI_TOXENV_PLUGINS=py38-plugins,py39-plugins,py310-plugins,py311-plugins,py312-plugins
4+
CI_TOXENV_MAIN=py39,py310,py311,py312
5+
CI_TOXENV_PLUGINS=py39-plugins,py310-plugins,py311-plugins,py312-plugins
66
CI_TOXENV_ALL="${CI_TOXENV_MAIN},${CI_TOXENV_PLUGINS}"

.github/compose/ci.docker-compose.yml

-5
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ services:
9090
# on the PyPA official 'manylinux' images that define the base ABI for
9191
# Python binary packages.
9292

93-
wheels-manylinux_2_28-cp38:
94-
<<: *tests-template
95-
image: quay.io/pypa/manylinux_2_28_x86_64
96-
command: .github/wheel-helpers/test-wheel-manylinux.sh cp38 /opt/python/cp38-cp38/bin/python3
97-
9893
wheels-manylinux_2_28-cp39:
9994
<<: *tests-template
10095
image: quay.io/pypa/manylinux_2_28_x86_64

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ jobs:
142142
# The names here should map to a valid service defined in
143143
# "../compose/ci.docker-compose.yml"
144144
test-name:
145-
- wheels-manylinux_2_28-cp38
146145
- wheels-manylinux_2_28-cp39
147146
- wheels-manylinux_2_28-cp310
148147
- wheels-manylinux_2_28-cp311

.github/workflows/release.yml

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ jobs:
8686
# The names here should map to a valid service defined in
8787
# "../compose/ci.docker-compose.yml"
8888
test-name:
89-
- wheels-manylinux_2_28-cp38
9089
- wheels-manylinux_2_28-cp39
9190
- wheels-manylinux_2_28-cp310
9291
- wheels-manylinux_2_28-cp311

doc/source/hacking/using_the_testsuite.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ found on your host. If you have multiple python versions installed, you may
6868
want to run tests against only one version and you can do that using the ``-e``
6969
option when running tox::
7070

71-
tox -e py37
71+
tox -e py312
7272

7373
If you would like to test and lint at the same time, or if you do have multiple
7474
python versions installed and would like to test against multiple versions, then
7575
we recommend using `detox <https://github.com/tox-dev/detox>`_, just run it with
7676
the same arguments you would give `tox`::
7777

78-
detox -e lint,py36,py37
78+
detox -e lint,py311,py312
7979

8080
The output of all failing tests will always be printed in the summary, but
8181
if you want to observe the stdout and stderr generated by a passing test,

doc/source/main_install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Runtime requirements
3535

3636
BuildStream requires the following Python environment to run:
3737

38-
- python3 >= 3.8
38+
- python3 >= 3.9
3939
- PyPI packages as specified in
4040
`requirements.in <https://github.com/apache/buildstream/blob/master/requirements/requirements.in>`_.
4141

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ environment = { BST_BUNDLE_BUILDBOX = "1" }
5353
manylinux-x86_64-image = "manylinux_2_28"
5454

5555
skip = [
56-
# BuildStream supports Python >= 3.8
56+
# BuildStream supports Python >= 3.9
5757
"cp36-*",
5858
"cp37-*",
59+
"cp38-*",
5960
# PyPy may work, but nobody is testing it so avoid distributing prebuilt binaries.
6061
"pp*",
6162
# Skipping this niche archicture ~halves overall build time.

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
# Python requirements
4545
##################################################################
4646
REQUIRED_PYTHON_MAJOR = 3
47-
REQUIRED_PYTHON_MINOR = 8
47+
REQUIRED_PYTHON_MINOR = 9
4848

4949
if sys.version_info[0] != REQUIRED_PYTHON_MAJOR or sys.version_info[1] < REQUIRED_PYTHON_MINOR:
50-
print("BuildStream requires Python >= 3.8")
50+
print("BuildStream requires Python >= 3.9")
5151
sys.exit(1)
5252

5353
try:
@@ -367,7 +367,6 @@ def files_from_module(modname):
367367
"License :: OSI Approved :: Apache Software License",
368368
"Operating System :: POSIX",
369369
"Programming Language :: Python :: 3",
370-
"Programming Language :: Python :: 3.8",
371370
"Programming Language :: Python :: 3.9",
372371
"Programming Language :: Python :: 3.10",
373372
"Programming Language :: Python :: 3.11",

src/buildstream/plugin.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,7 @@
158158
_FILE = Union[None, int, IO[Any]]
159159
_TXT = Union[bytes, str]
160160
_STR_BYTES_PATH = Union[str, bytes, "os.PathLike[str]", "os.PathLike[bytes]"]
161-
if sys.version_info >= (3, 8):
162-
_CMD = Union[_STR_BYTES_PATH, Sequence[_STR_BYTES_PATH]]
163-
else:
164-
# Python 3.6 doesn't support _CMD being a single PathLike.
165-
# See: https://bugs.python.org/issue31961
166-
_CMD = Union[_TXT, Sequence[_STR_BYTES_PATH]]
161+
_CMD = Union[_STR_BYTES_PATH, Sequence[_STR_BYTES_PATH]]
167162

168163
# _background_job_wrapper()
169164
#

tox.ini

+20-23
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Tox global configuration
1717
#
1818
[tox]
19-
envlist = py{38,39,310,311,312}
19+
envlist = py{39,310,311,312}
2020
skip_missing_interpreters = true
2121
isolated_build = true
2222

@@ -33,30 +33,30 @@ BST_PLUGINS_VERSION = db71610b7ae9884f6d8cbe0d3cc5a1c657c19edb # 2.2.0
3333
[testenv]
3434
usedevelop =
3535
# This is required by Cython in order to get coverage for cython files.
36-
py{38,39,310,311,312}-!nocover: True
36+
py{39,310,311,312}-!nocover: True
3737

3838
commands =
3939
# Running with coverage reporting enabled
40-
py{38,39,310,311,312}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
40+
py{39,310,311,312}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
4141
# Running with coverage reporting disabled
42-
py{38,39,310,311,312}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
42+
py{39,310,311,312}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
4343
# Running external plugins tests with coverage reporting enabled
44-
py{38,39,310,311,312}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
44+
py{39,310,311,312}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
4545
# Running external plugins tests with coverage disabled
46-
py{38,39,310,311,312}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
46+
py{39,310,311,312}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
4747
commands_post:
48-
py{38,39,310,311,312}-!nocover: mkdir -p .coverage-reports
49-
py{38,39,310,311,312}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
48+
py{39,310,311,312}-!nocover: mkdir -p .coverage-reports
49+
py{39,310,311,312}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
5050
deps =
51-
py{38,39,310,311,312}: -rrequirements/requirements.txt
52-
py{38,39,310,311,312}: -rrequirements/dev-requirements.txt
53-
py{38,39,310,311,312}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}
51+
py{39,310,311,312}: -rrequirements/requirements.txt
52+
py{39,310,311,312}: -rrequirements/dev-requirements.txt
53+
py{39,310,311,312}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}
5454

5555
# Install local sample plugins for testing pip plugin origins
56-
py{38,39,310,311,312}: {toxinidir}/tests/plugins/sample-plugins
56+
py{39,310,311,312}: {toxinidir}/tests/plugins/sample-plugins
5757

5858
# Install external plugins for plugin tests
59-
py{38,39,310,311,312}-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]
59+
py{39,310,311,312}-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]
6060

6161
# Only require coverage and pytest-cov when using it
6262
!nocover: -rrequirements/cov-requirements.txt
@@ -84,21 +84,18 @@ passenv =
8484
# These keys are not inherited by any other sections
8585
#
8686
setenv =
87-
py{38,39,310,311,312}: COVERAGE_FILE = {envtmpdir}/.coverage
88-
py{38,39,310,311,312}: BST_TEST_HOME = {envtmpdir}
89-
py{38,39,310,311,312}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
90-
py{38,39,310,311,312}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
91-
py{38,39,310,311,312}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
92-
93-
# This is required to run tests with python 3.7
94-
py37: SETUPTOOLS_ENABLE_FEATURES = "legacy-editable"
87+
py{39,310,311,312}: COVERAGE_FILE = {envtmpdir}/.coverage
88+
py{39,310,311,312}: BST_TEST_HOME = {envtmpdir}
89+
py{39,310,311,312}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
90+
py{39,310,311,312}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
91+
py{39,310,311,312}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
9592

9693
# This is required to get coverage for Cython
97-
py{38,39,310,311,312}-!nocover: BST_CYTHON_TRACE = 1
94+
py{39,310,311,312}-!nocover: BST_CYTHON_TRACE = 1
9895
randomized: PYTEST_ADDOPTS="--random-order-bucket=global"
9996

10097
allowlist_externals =
101-
py{38,39,310,311,312}:
98+
py{39,310,311,312}:
10299
mv
103100
mkdir
104101

0 commit comments

Comments
 (0)