Skip to content

Commit 586988c

Browse files
authored
chore: remove support for Python 3.7 (#3187)
Python 3.7 reached EOL in June 2023: https://endoflife.date/python Signed-off-by: Milas Bowman <milas.bowman@docker.com>
1 parent fd2f502 commit 586988c

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
25+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2626

2727
steps:
2828
- uses: actions/checkout@v4

docker/version.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
try:
22
from ._version import __version__
33
except ImportError:
4+
from importlib.metadata import version, PackageNotFoundError
45
try:
5-
# importlib.metadata available in Python 3.8+, the fallback (0.0.0)
6-
# is fine because release builds use _version (above) rather than
7-
# this code path, so it only impacts developing w/ 3.7
8-
from importlib.metadata import version, PackageNotFoundError
9-
try:
10-
__version__ = version('docker')
11-
except PackageNotFoundError:
12-
__version__ = '0.0.0'
13-
except ImportError:
6+
__version__ = version('docker')
7+
except PackageNotFoundError:
148
__version__ = '0.0.0'

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
install_requires=requirements,
6060
tests_require=test_requirements,
6161
extras_require=extras_require,
62-
python_requires='>=3.7',
62+
python_requires='>=3.8',
6363
zip_safe=False,
6464
test_suite='tests',
6565
classifiers=[
@@ -69,7 +69,6 @@
6969
'Operating System :: OS Independent',
7070
'Programming Language :: Python',
7171
'Programming Language :: Python :: 3',
72-
'Programming Language :: Python :: 3.7',
7372
'Programming Language :: Python :: 3.8',
7473
'Programming Language :: Python :: 3.9',
7574
'Programming Language :: Python :: 3.10',

0 commit comments

Comments
 (0)