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>
This commit is contained in:
Milas Bowman 2023-11-21 12:14:23 -05:00 committed by GitHub
parent fd2f5029f0
commit 586988ce2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 12 deletions

View File

@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -1,14 +1,8 @@
try: try:
from ._version import __version__ from ._version import __version__
except ImportError: except ImportError:
try:
# importlib.metadata available in Python 3.8+, the fallback (0.0.0)
# is fine because release builds use _version (above) rather than
# this code path, so it only impacts developing w/ 3.7
from importlib.metadata import version, PackageNotFoundError from importlib.metadata import version, PackageNotFoundError
try: try:
__version__ = version('docker') __version__ = version('docker')
except PackageNotFoundError: except PackageNotFoundError:
__version__ = '0.0.0' __version__ = '0.0.0'
except ImportError:
__version__ = '0.0.0'

View File

@ -59,7 +59,7 @@ setup(
install_requires=requirements, install_requires=requirements,
tests_require=test_requirements, tests_require=test_requirements,
extras_require=extras_require, extras_require=extras_require,
python_requires='>=3.7', python_requires='>=3.8',
zip_safe=False, zip_safe=False,
test_suite='tests', test_suite='tests',
classifiers=[ classifiers=[
@ -69,7 +69,6 @@ setup(
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.10',