diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 977199ceb..127d5b682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: 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: - uses: actions/checkout@v4 diff --git a/docker/version.py b/docker/version.py index 44eac8c5d..dca45bf04 100644 --- a/docker/version.py +++ b/docker/version.py @@ -1,14 +1,8 @@ try: from ._version import __version__ except ImportError: + from importlib.metadata import version, PackageNotFoundError 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 - try: - __version__ = version('docker') - except PackageNotFoundError: - __version__ = '0.0.0' - except ImportError: + __version__ = version('docker') + except PackageNotFoundError: __version__ = '0.0.0' diff --git a/setup.py b/setup.py index d63cbe0a1..98736247d 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ install_requires=requirements, tests_require=test_requirements, extras_require=extras_require, - python_requires='>=3.7', + python_requires='>=3.8', zip_safe=False, test_suite='tests', classifiers=[ @@ -69,7 +69,6 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10',