python-tox/py39.patch
Miro Hrončok 341cb9cf4b Fix invocation with Python 3.9 (#1798929)
Backported from Fedora 31:
https://src.fedoraproject.org/rpms/python-tox/c/aa466cd2d67b5ca7e5f4f58d0fbc704b38c97d94?branch=f31

Added 3.10 and 3.11 as well.

With this tox.ini:

    [tox]
    skipsdist = True
    [testenv]
    commands = python -c 'import sys; print(sys.version)'

Before:

    $ tox -e py39
    ...
    3.6.8 (default, Aug 24 2020, 17:57:11)
    ...
      py39: commands succeeded
      congratulations :)

After:

    $ tox -e py39
    ...
    3.9.1 (default, Jan 18 2021, 16:14:01)
    ...
      py39: commands succeeded
      congratulations :)

The Python 3.10+ addition remains untested, as I have no Python 3.10+ build for EL 8 available.
2021-01-19 17:03:05 +01:00

13 lines
728 B
Diff

diff --git a/src/tox/constants.py b/src/tox/constants.py
index bd21562..3b5e57f 100644
--- a/src/tox/constants.py
+++ b/src/tox/constants.py
@@ -28,7 +28,7 @@ def _construct_default_factors(cpython_versions, pypy_versions, other_interprete
class PYTHON:
PY_FACTORS_RE = re.compile("^(?!py$)(py|pypy|jython)([2-9][0-9]?)?$")
PY_FACTORS_MAP = {"py": "python", "pypy": "pypy", "jython": "jython"}
- CPYTHON_VERSION_TUPLES = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8)]
+ CPYTHON_VERSION_TUPLES = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (3, 11)]
PYPY_VERSION_TUPLES = [(2, 7), (3, 5)]
OTHER_PYTHON_INTERPRETERS = ["jython"]
DEFAULT_FACTORS = _construct_default_factors(