Skip to content

Commit 69ed8b1

Browse files
committed
Drop support for Python 3.7
This enables the use of newer Python typing functionality without compatibility shims.
1 parent 88906ab commit 69ed8b1

5 files changed

Lines changed: 17 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
28+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2929
os: [Ubuntu, macOS, Windows]
3030

3131
steps:

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Changelog
44
v1.1
55
----
66

7-
No changes.
7+
- Drop support for Python 3.7.
88

99
v1.0
1010
----

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
nox.options.reuse_existing_virtualenvs = True
77

88

9-
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"])
9+
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "pypy3"])
1010
def test(session: nox.Session) -> None:
1111
session.install("-r", "dev-requirements.txt")
1212
session.install(".")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88
{name = "Thomas Kluyver", email = "thomas@kluyver.me.uk"},
99
]
1010
readme = "README.rst"
11-
requires-python = ">=3.7"
11+
requires-python = ">=3.8"
1212
dependencies = []
1313
classifiers = [
1414
"License :: OSI Approved :: MIT License",

src/pyproject_hooks/_impl.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@
66
from os.path import abspath
77
from os.path import join as pjoin
88
from subprocess import STDOUT, check_call, check_output
9-
from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional
9+
from typing import Any, Dict, Iterator, List, Optional, Protocol
1010

1111
from ._in_process import _in_proc_script_path
1212

13-
if TYPE_CHECKING:
14-
from typing import Protocol
15-
16-
class SubprocessRunner(Protocol):
17-
"""A protocol for the subprocess runner."""
18-
19-
def __call__(
20-
self,
21-
cmd: List[str],
22-
cwd: Optional[str] = None,
23-
extra_environ: Optional[Dict[str, str]] = None,
24-
) -> None:
25-
...
26-
2713

2814
def write_json(obj: Dict[str, Any], path: str, **kwargs) -> None:
2915
with open(path, "w", encoding="utf-8") as f:
@@ -71,6 +57,18 @@ def __init__(self, traceback: str) -> None:
7157
self.traceback = traceback
7258

7359

60+
class SubprocessRunner(Protocol):
61+
"""A protocol for the subprocess runner."""
62+
63+
def __call__(
64+
self,
65+
cmd: List[str],
66+
cwd: Optional[str] = None,
67+
extra_environ: Optional[Dict[str, str]] = None,
68+
) -> None:
69+
...
70+
71+
7472
def default_subprocess_runner(
7573
cmd: List[str],
7674
cwd: Optional[str] = None,

0 commit comments

Comments
 (0)