From e1f3b43ad8b45afca3a7a363a41103f5f468f461 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 18 Oct 2025 16:05:14 -0400 Subject: [PATCH] require nox 2025.10.16, remove python version workaround the workaround for [1] no longer works now that the fix has been committed. slightly surprising but just require that version of nox and carry on [1] https://github.com/wntrblm/nox/pull/999 Change-Id: I4b4031c3d3d02399f55f9750237de61e5e90d179 --- noxfile.py | 3 +++ tools/toxnox.py | 25 +------------------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/noxfile.py b/noxfile.py index 1fe4d524bb..18bee7ee35 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,6 +10,9 @@ from typing import Set import nox +nox.needs_version = ">=2025.10.16" + + if True: sys.path.insert(0, ".") from tools.toxnox import extract_opts diff --git a/tools/toxnox.py b/tools/toxnox.py index 897abfc774..891fc70f9c 100644 --- a/tools/toxnox.py +++ b/tools/toxnox.py @@ -74,27 +74,6 @@ def tox_parameters( def _is_py_version(token: str) -> bool: return bool(PY_RE.match(token)) - def _expand_python_version(token: str) -> str: - """expand pyx.y(t) tags into executable names. - - Works around nox issue fixed at - https://github.com/wntrblm/nox/pull/999 by providing full executable - name - - """ - if sys.platform == "win32": - return token - - m = PY_RE.match(token) - - # do this matching minimally so that it only happens for the - # free-threaded versions. on windows, the "pythonx.y" syntax doesn't - # work due to the use of the "py" tool - if m and m.group(2) == "t": - return f"python{m.group(1)}" - else: - return token - def _python_to_tag(token: str) -> str: m = PY_RE.match(token) if m: @@ -186,9 +165,7 @@ def tox_parameters( ) params = [ - nox.param( - *[_expand_python_version(a) for a in args], tags=tags, id=ids - ) + nox.param(*args, tags=tags, id=ids) for args, tags, ids in _recur_param([], [], token_lists) if filter_ is None or filter_(**dict(zip(names, args))) ] -- 2.47.3