Skip to content

Commit 64ddef9

Browse files
authored
feat: drop Python 3.9 (#1049)
* feat: drop Python 3.9 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * tests: fix 3.9/3.10 -> 3.10/3.11 Assisted-by: OpenCode:Kimi-K2.5 Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore: clean up a few more mentions of old Python versions Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Assisted-by: OpenCode:Kimi-K2.5 * chore: use more pattern matching Assisted-by: OpenCode:Kimi-K2.5 Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: fix coverage issue Signed-off-by: Henry Schreiner <henryfs@princeton.edu> --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 909d6e1 commit 64ddef9

File tree

21 files changed

+152
-152
lines changed

21 files changed

+152
-152
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ body:
3131
label: Environment
3232
description: |
3333
examples:
34-
- **OS**: Ubuntu 20.04
35-
- **Python**: 3.9.7
36-
- **Nox**: 0.14.2
34+
- **OS**: Ubuntu 24.04
35+
- **Python**: 3.14.3
36+
- **Nox**: 2026.04.10
3737
value: |
3838
- OS:
3939
- Python:

.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:

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1616
id: localpython
1717
with:
18-
python-version: "3.9 - 3.14"
18+
python-version: "3.10 - 3.14"
1919
update-environment: false
2020

2121
- name: "Validate input"

docs/config.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ You can tell Nox to use a different Python interpreter/version by specifying the
114114
.. note::
115115

116116
The Python binaries on Windows are found via the Python `Launcher`_ for
117-
Windows (``py``). For example, Python 3.9 can be found by determining which
118-
executable is invoked by ``py -3.9``. If a given test needs to use the 32-bit
117+
Windows (``py``). For example, Python 3.10 can be found by determining which
118+
executable is invoked by ``py -3.10``. If a given test needs to use the 32-bit
119119
version of a given Python, then ``X.Y-32`` should be used as the version.
120120

121121
.. _Launcher: https://docs.python.org/3/using/windows.html#python-launcher-for-windows
@@ -142,19 +142,19 @@ When collecting your sessions, Nox will create a separate session for each inter
142142

143143
.. code-block:: python
144144
145-
@nox.session(python=['2.7', '3.6', '3.7', '3.8', '3.9'])
145+
@nox.session(python=['3.10', '3.11', '3.12', '3.13', '3.14'])
146146
def tests(session):
147147
pass
148148
149149
Will produce these sessions:
150150

151151
.. code-block:: console
152152
153-
* tests-2.7
154-
* tests-3.6
155-
* tests-3.7
156-
* tests-3.8
157-
* tests-3.9
153+
* tests-3.10
154+
* tests-3.11
155+
* tests-3.12
156+
* tests-3.13
157+
* tests-3.14
158158
159159
Note that this expansion happens *before* parameterization occurs, so you can still parametrize sessions with multiple interpreters.
160160

docs/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ In addition to Nox supporting executing single sessions, it also supports runnin
245245

246246
.. code-tab:: console CLI options
247247

248-
nox --extra-pythons 3.8 3.9 3.10
248+
nox --extra-pythons 3.12 3.13 3.14
249249

250250
.. code-tab:: console Environment variables
251251

252-
NOXEXTRAPYTHON=3.8,3.9,3.10 nox
252+
NOXEXTRAPYTHON=3.12,3.13,3.14 nox
253253

254254

255255
This will, in addition to specified Python versions in the Noxfile, also create sessions for the specified versions.

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

0 commit comments

Comments
 (0)