diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd3d481..8af47fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,13 @@ jobs: - "3.11" - "3.12" - "3.13" - runs-on: ubuntu-latest + platform-version: + - "ubuntu-24.04" + include: + # Python 3.7 only runs on Ubuntu 22.04 + - python-version: "3.7" + platform-version: "ubuntu-22.04" + runs-on: ${{ matrix.platform-version }} steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Set up Python ${{ matrix.python-version }} diff --git a/morgan/__init__.py b/morgan/__init__.py index 8e46e6a..50e6bcb 100644 --- a/morgan/__init__.py +++ b/morgan/__init__.py @@ -293,7 +293,8 @@ def _filter_files( return files def _matches_environments(self, fileinfo: dict) -> bool: - if req := fileinfo.get("requires-python"): + req = fileinfo.get("requires-python") + if req: # The Python versions in all of our environments must be supported # by this file in order to match. # Some packages specify their required Python versions with a simple diff --git a/pyproject.toml b/pyproject.toml index 7efcd27..533023e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,11 +14,8 @@ keywords = [ "pypi", "mirror", "packages", "pypi-mirror" ] readme = "README.md" requires-python = ">=3.7" dependencies = [ - #"packaging~=21.3", - # hatchling 1.27.0 requires packaging>=24.2, but you have packaging 21.3 which is incompatible. - "packaging~=24.2", - # packaging.utils.InvalidSdistFilename: Invalid sdist filename (invalid version): 'expandvars-0.6.0-macosx-10.15-x86_64.tar.gz' (old versions) - # solved in morgan/__init__.py + "packaging~=24.0; python_version == '3.7'", + "packaging~=24.2; python_version >= '3.8'", "importlib-metadata~=4.12.0; python_version < '3.8'", "tomli~=2.0.1", "python-dateutil", @@ -36,6 +33,9 @@ classifiers = [ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", ]