Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog/1374.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``PythonSpec`` detection of ``python3.10`` - by :user:`asottile`
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tox/interpreters/py_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def from_name(cls, base_python):
if os.path.isabs(base_python):
path = base_python
else:
match = re.match(r"(python|pypy|jython)(\d)?(?:\.(\d))?(-(32|64))?", base_python)
match = re.match(r"(python|pypy|jython)(\d)?(?:\.(\d+))?(-(32|64))?", base_python)
if match:
groups = match.groups()
name = groups[0]
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/interpreters/test_py_spec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from tox.interpreters.py_spec import PythonSpec


def test_py_3_10():
spec = PythonSpec.from_name("python3.10")
assert (spec.major, spec.minor) == (3, 10)