Skip to content

Commit ec484ac

Browse files
committed
feat: drop Python 3.9
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent fa5e8d8 commit ec484ac

File tree

10 files changed

+27
-25
lines changed

10 files changed

+27
-25
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
matrix:
2424
os: [ubuntu-latest, windows-latest, macos-latest]
2525
python-version:
26-
- "3.9"
27-
- "3.11"
26+
- "3.10"
27+
- "3.12"
2828
- "3.14"
2929
include:
30-
- os: ubuntu-22.04
31-
python-version: "3.9"
3230
- os: ubuntu-22.04
3331
python-version: "3.11"
32+
- os: ubuntu-22.04
33+
python-version: "3.13"
3434
- os: macos-15-intel
3535
python-version: "3.12"
3636
steps:
@@ -41,8 +41,8 @@ jobs:
4141
uses: actions/setup-python@v6
4242
with:
4343
python-version: |
44-
3.9
4544
3.10
45+
3.11
4646
- name: Set up Python ${{ matrix.python-version }}
4747
uses: actions/setup-python@v6
4848
with:

nox/_decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
import functools
1919
import inspect
2020
import types
21-
from typing import TYPE_CHECKING, Any, Callable, Literal, TypeVar, cast
21+
from collections.abc import Callable
22+
from typing import TYPE_CHECKING, Any, Literal, TypeVar, cast
2223

2324
if TYPE_CHECKING:
2425
from collections.abc import Iterable, Mapping, Sequence

nox/_option_set.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __dir__() -> list[str]:
4747

4848

4949
av_opt_str = av.optional(av.instance_of(str))
50-
av_opt_path = av.optional(av.or_(av.instance_of(str), av.instance_of(os.PathLike)))
50+
av_opt_path = av.optional(av.or_(av.instance_of(str), av.instance_of(os.PathLike))) # type: ignore[type-abstract]
5151
av_opt_list_str = av.optional(
5252
av.deep_iterable(
5353
member_validator=av.instance_of(str),

nox/_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import itertools
2222
import os
2323
import sys
24-
from typing import TYPE_CHECKING, Any, Callable, Literal
24+
from typing import TYPE_CHECKING, Any, Literal
2525

2626
import argcomplete
2727

@@ -30,7 +30,7 @@
3030
from nox.virtualenv import ALL_VENVS
3131

3232
if TYPE_CHECKING:
33-
from collections.abc import Iterable, Sequence
33+
from collections.abc import Callable, Iterable, Sequence
3434

3535
from nox._option_set import NoxOptions
3636

nox/_parametrize.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import functools
1818
import itertools
1919
from collections.abc import Iterable
20-
from typing import TYPE_CHECKING, Any, Union
20+
from typing import TYPE_CHECKING, Any
2121

2222
if TYPE_CHECKING:
2323
from collections.abc import Callable, Sequence
@@ -64,7 +64,7 @@ def __init__(
6464

6565
@property
6666
def call_spec(self) -> dict[str, Any]:
67-
return dict(zip(self.arg_names, self.args))
67+
return dict(zip(self.arg_names, self.args, strict=True))
6868

6969
def __str__(self) -> str:
7070
if self.id:
@@ -96,7 +96,7 @@ def __eq__(self, other: object) -> bool:
9696
and self.tags == other.tags
9797
)
9898
if isinstance(other, dict):
99-
return dict(zip(self.arg_names, self.args)) == other
99+
return dict(zip(self.arg_names, self.args, strict=True)) == other
100100

101101
return NotImplemented
102102

@@ -108,7 +108,7 @@ def _apply_param_specs(param_specs: Iterable[Param], f: Any) -> Any:
108108
return f
109109

110110

111-
ArgValue = Union[Param, Iterable[Any]]
111+
ArgValue = Param | Iterable[Any]
112112

113113

114114
def parametrize_decorator(

nox/_typing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from __future__ import annotations
1616

1717
from collections.abc import Sequence
18-
from typing import Union
1918

2019
__all__ = ["Python"]
2120

@@ -24,4 +23,4 @@ def __dir__() -> list[str]:
2423
return __all__
2524

2625

27-
Python = Union[str, Sequence[str], bool, None]
26+
Python = str | Sequence[str] | bool | None

nox/registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import copy
1818
import functools
1919
import warnings
20-
from typing import TYPE_CHECKING, Any, Callable, Literal, overload
20+
from collections.abc import Callable
21+
from typing import TYPE_CHECKING, Any, Literal, overload
2122

2223
from ._decorators import Func
2324

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ license = "Apache-2.0"
1818
authors = [
1919
{ name = "Alethea Katherine Flowers", email = "me@thea.codes" },
2020
]
21-
requires-python = ">=3.9"
21+
requires-python = ">=3.10"
2222
classifiers = [
2323
"Development Status :: 5 - Production/Stable",
2424
"Environment :: Console",
@@ -29,7 +29,6 @@ classifiers = [
2929
"Operating System :: Unix",
3030
"Programming Language :: Python",
3131
"Programming Language :: Python :: 3 :: Only",
32-
"Programming Language :: Python :: 3.9",
3332
"Programming Language :: Python :: 3.10",
3433
"Programming Language :: Python :: 3.11",
3534
"Programming Language :: Python :: 3.12",
@@ -45,8 +44,7 @@ dependencies = [
4544
"humanize>=4",
4645
"packaging>=22",
4746
"tomli>=1.1; python_version<'3.11'",
48-
"virtualenv>=20.14.1; python_version<'3.10'",
49-
"virtualenv>=20.15; python_version>='3.10'",
47+
"virtualenv>=20.15",
5048
]
5149
optional-dependencies.pbs = [
5250
"pbs-installer[all]>=2025.1.6",
@@ -149,7 +147,7 @@ report.exclude_also = [
149147
report.omit = [ "nox/_typing.py" ]
150148

151149
[tool.mypy]
152-
python_version = "3.9"
150+
python_version = "3.10"
153151
strict = true
154152
warn_unreachable = true
155153
enable_error_code = [ "ignore-without-code", "redundant-expr", "truthy-bool" ]

tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
import subprocess
1919
from pathlib import Path
2020
from string import Template
21-
from typing import Any, Callable
21+
from typing import TYPE_CHECKING, Any
2222

2323
import pytest
2424

25+
if TYPE_CHECKING:
26+
from collections.abc import Callable
27+
2528
HAS_CONDA = shutil.which("conda") is not None
2629

2730

tests/resources/noxfile_requires.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def j(session):
6767
print(session.name)
6868

6969

70-
@nox.session(python=["3.9", "3.10"])
70+
@nox.session(python=["3.10", "3.11"])
7171
def k(session):
7272
print(session.name)
7373

@@ -77,7 +77,7 @@ def m(session):
7777
print(session.name)
7878

7979

80-
@nox.session(python="3.10", requires=["k-{python}"])
80+
@nox.session(python="3.11", requires=["k-{python}"])
8181
def n(session):
8282
print(session.name)
8383

@@ -87,7 +87,7 @@ def o(session):
8787
print(session.name)
8888

8989

90-
@nox.session(python=["3.9", "3.10"])
90+
@nox.session(python=["3.10", "3.11"])
9191
def p(session):
9292
print(session.name)
9393

0 commit comments

Comments
 (0)