Skip to content

Commit

Permalink
feat: drop Python 3.7
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Jan 27, 2025
1 parent dd4ae0c commit 5331a3f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.8

- name: Install nox
run: python -m pip install nox
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- "windows-latest"
- "ubuntu-latest"
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -30,7 +29,7 @@ jobs:
- "3.13"
include:
- os: macos-13
python: "3.7"
python: "3.8"
- os: macos-14
python: "3.12"

Expand All @@ -47,10 +46,6 @@ jobs:
- name: Prepare nox
run: pipx install nox

- name: Limit virtualenv on 3.7
if: matrix.python == '3.7'
run: pipx inject --force nox 'virtualenv<20.27.0'

- name: Run tests
run: nox -s test-${{ matrix.python }}

Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2

sphinx:
configuration: docs/conf.py

build:
os: ubuntu-22.04
tools:
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]


@nox.session(python="3.7")
@nox.session(python="3.8")
def mypy(session: nox.Session) -> None:
"""
Run a type checker.
Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ name = "pyproject-metadata"
dynamic = ["version"]
description = "PEP 621 metadata parsing"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
authors = [
{ name = "Filipe Laíns", email = "[email protected]" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -25,7 +24,6 @@ classifiers = [
]
dependencies = [
"packaging>=19.0",
"typing_extensions; python_version<'3.8'",
]

[project.optional-dependencies]
Expand All @@ -52,9 +50,6 @@ include = ["LICENSE", "tests/**", "docs/**", ".gitignore"]

[tool.uv]
dev-dependencies = ["pyproject-metadata[test]"]
environments = [
"python_version >= '3.10'",
]


[tool.pytest.ini_options]
Expand Down
8 changes: 2 additions & 6 deletions pyproject_metadata/project_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
import typing
from typing import Any, Dict, List, Union

if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: nocover
from typing_extensions import Required
else:
from typing import Required

if sys.version_info < (3, 8):
from typing_extensions import Literal, TypedDict
else:
from typing import Literal, TypedDict

from typing import Literal, TypedDict

__all__ = [
"BuildSystemTable",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_standard_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ def test_license_file_24(
pre_spdx = (
metadata_version in pyproject_metadata.constants.PRE_SPDX_METADATA_VERSIONS
)
with contextlib.nullcontext() if pre_spdx else pytest.warns( # type: ignore[attr-defined]
with contextlib.nullcontext() if pre_spdx else pytest.warns(
pyproject_metadata.errors.ConfigurationWarning
):
metadata = pyproject_metadata.StandardMetadata.from_pyproject(
Expand Down Expand Up @@ -1444,8 +1444,8 @@ def test_statically_defined_dynamic_field() -> None:
"value",
[
"<3.10",
">3.7,<3.11",
">3.7,<3.11,!=3.8.4",
">3.8,<3.11",
">3.8,<3.11,!=3.8.4",
"~=3.10,!=3.10.3",
],
)
Expand Down

0 comments on commit 5331a3f

Please sign in to comment.