Skip to content

Commit 17435df

Browse files
authored
Add GraalPy and test both GraalPy and Jython env identifiers (#3312)
1 parent e6b9803 commit 17435df

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

docs/changelog/3312.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add "graalpy" prefix as a supported base python

docs/user_guide.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ implementations of Python and provide default values for ``base_python``:
116116
- ``cpythonNM``: configures ``basepython = cpythonN.M``
117117
- ``ironpythonNM``: configures ``basepython = ironpythonN.M``
118118
- ``rustpythonNM``: configures ``basepython = rustpythonN.M``
119+
- ``graalpyNM``: configures ``basepython = graalpyN.M``
119120

120121
You can also specify these factors with a period between the major and minor versions (e.g. ``pyN.M``), without a minor
121122
version (e.g. ``pyN``), or without any version information whatsoever (e.g. ``py``)

src/tox/tox_env/python/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def version_dot(self) -> str:
5151
PY_FACTORS_RE = re.compile(
5252
r"""
5353
^(?!py$) # don't match 'py' as it doesn't provide any info
54-
(?P<impl>py|pypy|cpython|jython|rustpython|ironpython) # the interpreter; most users will simply use 'py'
54+
(?P<impl>py|pypy|cpython|jython|graalpy|rustpython|ironpython) # the interpreter; most users will simply use 'py'
5555
(?P<version>[2-9]\.?[0-9]?[0-9]?)?$ # the version; one of: MAJORMINOR, MAJOR.MINOR
5656
""",
5757
re.VERBOSE,

tests/tox_env/python/test_python_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def test_diff_msg_no_diff() -> None:
8484
("py3.12", "py3.12"),
8585
("pypy2", "pypy2"),
8686
("rustpython3", "rustpython3"),
87+
("graalpy", "graalpy"),
88+
("jython", "jython"),
8789
("cpython3.8", "cpython3.8"),
8890
("ironpython2.7", "ironpython2.7"),
8991
("functional-py310", "py310"),

0 commit comments

Comments
 (0)