File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,3 +79,7 @@ target/
7979
8080# Standard venv location
8181.venv
82+
83+ # Lockfiles
84+ uv.lock
85+ * pylock.toml
Original file line number Diff line number Diff line change 2929import packaging .utils
3030
3131import nox .command
32+ import nox .registry
3233import nox .virtualenv
3334from nox import _options , tasks , workflow
3435from nox ._options import DefaultStr
@@ -270,6 +271,7 @@ def _main(*, main_ep: bool) -> None:
270271 download_python = download_python ,
271272 )
272273
274+ nox .registry .reset ()
273275 exit_code = execute_workflow (args )
274276
275277 # Done; exit.
Original file line number Diff line number Diff line change 2626
2727 from ._typing import Python
2828
29- __all__ = ["get" , "session_decorator" ]
29+ __all__ = ["get" , "reset" , " session_decorator" ]
3030
3131
3232def __dir__ () -> list [str ]:
@@ -38,6 +38,10 @@ def __dir__() -> list[str]:
3838_REGISTRY : dict [str , Func ] = {}
3939
4040
41+ def reset () -> None :
42+ _REGISTRY .clear ()
43+
44+
4145@overload
4246def session_decorator (func : RawFunc | Func , / ) -> Func : ...
4347
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S uv run --script
2+
13# Copyright 2016 Alethea Katherine Flowers
24#
35# Licensed under the Apache License, Version 2.0 (the "License");
1214# See the License for the specific language governing permissions and
1315# limitations under the License.
1416
17+ # /// script
18+ # dependencies = ["nox>=2025.02.09"]
19+ # ///
20+
1521
1622from __future__ import annotations
1723
2632
2733ON_WINDOWS_CI = "CI" in os .environ and sys .platform .startswith ("win32" )
2834
29- nox .needs_version = ">=2024.4.15 "
35+ nox .needs_version = ">=2025.02.09 "
3036nox .options .default_venv_backend = "uv|virtualenv"
3137
3238PYPROJECT = nox .project .load_toml ("pyproject.toml" )
33-
34- ALL_PYTHONS = [
35- c .split ()[- 1 ]
36- for c in PYPROJECT ["project" ]["classifiers" ]
37- if c .startswith ("Programming Language :: Python :: 3." )
38- ]
39+ ALL_PYTHONS = nox .project .python_versions (PYPROJECT )
3940
4041
4142@nox .session (python = ALL_PYTHONS )
@@ -189,7 +190,7 @@ def _check_python_version(session: nox.Session) -> None:
189190@nox .session (
190191 python = [
191192 * ALL_PYTHONS ,
192- "pypy-3.10 " ,
193+ "pypy-3.11 " ,
193194 ],
194195 default = False ,
195196)
@@ -205,9 +206,14 @@ def github_actions_default_tests(session: nox.Session) -> None:
205206 "pypy3.8" ,
206207 "pypy3.9" ,
207208 "pypy3.10" ,
209+ "pypy3.11" ,
208210 ],
209211 default = False ,
210212)
211213def github_actions_all_tests (session : nox .Session ) -> None :
212214 """Check all versions installed by the nox GHA Action"""
213215 _check_python_version (session )
216+
217+
218+ if __name__ == "__main__" :
219+ nox .main ()
You can’t perform that action at this time.
0 commit comments