Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox4: Drop support of old-style PyPy key (breaking change) #77

Merged
merged 1 commit into from
Sep 4, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -192,7 +192,6 @@ envlist = py3, pypy3
[gh-actions]
python =
3: py3, mypy
# pypy3 are still supported for backward compatibility
pypy-3: pypy3

[testenv]
Expand All @@ -203,6 +202,8 @@ If there are multiple matching Python versions in the configuration, only the mo
For example, if you are running CPython 3.8 and `gh-actions.python` has both `3` and `3.8`,
tox-gh-actions gets factors only from the key `3.8`.

_Changed in 3.0_: `pypy3` is not supported in the configuration anymore. Please use `pypy-3` instead.

#### Factor-Conditional Settings: Environment Variable
You can also use environment variable to decide which environment to run.
The following is an example to install different dependency based on platform.
Expand Down
4 changes: 0 additions & 4 deletions src/tox_gh_actions/plugin.py
Expand Up @@ -119,17 +119,13 @@ def get_python_version_keys():
- CPython 3.8.z => [3.8, 3]
- PyPy 3.6 (v7.3.z) => [pypy-3.6, pypy-3, pypy3]
- Pyston based on Python CPython 3.8.8 (v2.2) => [pyston-3.8, pyston-3]

Support of "pypy2" and "pypy3" is for backward compatibility with
tox-gh-actions v2.2.0 and before.
"""
major_version = str(sys.version_info[0])
major_minor_version = ".".join([str(i) for i in sys.version_info[:2]])
if "PyPy" in sys.version:
return [
"pypy-" + major_minor_version,
"pypy-" + major_version,
"pypy" + major_version,
]
elif hasattr(sys, "pyston_version_info"): # Pyston
return [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugin.py
Expand Up @@ -314,7 +314,7 @@ def test_get_envlist_from_factors(envlist, factors, expected):
"3.6.9 (1608da62bfc7, Dec 23 2019, 10:50:04)\n"
"[PyPy 7.3.0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]",
(3, 6, 9, "final", 0),
["pypy-3.6", "pypy-3", "pypy3"],
["pypy-3.6", "pypy-3"],
),
],
)
Expand Down