chore: update CI workflow to use Python pypy-3.11 and adjust exclusions accordingly - #132
Conversation
WalkthroughThe tox workflow updates its Python test matrix to use PyPy 3.11 and changes Windows-specific exclusions from Python 3.10 to 3.11. ChangesCI Matrix Configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/run-tox-tests.yml:
- Around line 28-29: Align the PyPy version between the workflow matrix and tox
configuration: either change the matrix entry in the workflow to pypy-3.10, or
update pyproject.toml’s tool.tox.envlist and gh-actions mapping to define
pypy-3.11. Ensure both configurations select the same intended interpreter.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 05f5b2af-8840-4065-91fa-da2bbf645f03
📒 Files selected for processing (1)
.github/workflows/run-tox-tests.yml
| "pypy-3.11", | ||
| ] |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
rg -n -C3 'envlist|pypy-3\.(10|11)' pyproject.tomlRepository: miurahr/pyppmd
Length of output: 303
🏁 Script executed:
sed -n '1,220p' .github/workflows/run-tox-tests.yml && printf '\n--- PYPROJECT ---\n' && sed -n '130,220p' pyproject.tomlRepository: miurahr/pyppmd
Length of output: 2331
🌐 Web query:
tox-gh-actions pypy-3.11 envlist mapping pypy-3.10 GitHub Actions python-version
💡 Result:
To map PyPy 3.11 in tox-gh-actions, add the pypy-3.11 key to the [gh-actions] python section in your tox.ini (or pyproject.toml) configuration file [1][2][3]. Example configuration: [gh-actions] python = pypy-3.11: pypy3 In your GitHub Actions workflow file (e.g., .github/workflows/tests.yml), ensure pypy-3.11 is included in the python-version matrix [4]: jobs: tests: runs-on: ubuntu-latest strategy: matrix: python-version: ['3.10', '3.11', 'pypy-3.11'] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - run: pip install tox tox-gh-actions - run: tox The tox-gh-actions plugin uses this mapping to detect the environment (e.g., when the GitHub Action runs with PyPy 3.11, it will select the pypy3 tox environment as defined in your mapping) [1][2]. Ensure that pypy3 is listed in your envlist in the [tox] section of your configuration [1][2].
Citations:
- 1: https://github.com/ymyzk/tox-gh-actions
- 2: https://github.com/ymyzk/tox-gh-actions/blob/master/README.md
- 3: https://pypi.org/project/tox-gh-actions/
- 4: ymyzk/tox-gh-actions@a2fd0ca
🏁 Script executed:
rg -n -C4 '\[gh-actions\]|tox-gh-actions|pypy-3\.11|pypy-3\.10' pyproject.toml .github/workflows/run-tox-tests.yml tox.ini setup.cfg tox.ini tox.tomlRepository: miurahr/pyppmd
Length of output: 2576
🏁 Script executed:
rg -n -C4 '\[gh-actions\]|tox-gh-actions|pypy-3\.11|pypy-3\.10' pyproject.toml .github/workflows/run-tox-tests.yml tox.ini setup.cfg tox.tomlRepository: miurahr/pyppmd
Length of output: 2528
🌐 Web query:
tox-gh-actions default mapping pypy-3.11 tox envlist missing env behavior
💡 Result:
To configure PyPy 3.11 with the tox-gh-actions plugin, you must explicitly map the version key in the [gh-actions] section of your configuration file (e.g., tox.ini) [1][2]. The plugin does not have a hardcoded default mapping for "pypy-3.11" that automatically selects environments [1][3]. Configuration and Behavior Rules: 1. Mapping Requirement: You must add an explicit entry under the [gh-actions] python section. For example: [gh-actions] python = pypy-3.11: pypy3 2. envlist Constraint: The tox-gh-actions plugin only executes environments that are explicitly listed in your tox.ini's [tox] envlist [4][5]. Even if you map "pypy-3.11" to an environment (e.g., pypy3) in the [gh-actions] block, the plugin will not run that environment if it is missing from the global envlist [4][6]. 3. Missing Environment Behavior: If an environment configured in the [gh-actions] block is not present in the envlist, it is ignored during the GitHub Actions workflow execution [4]. The plugin first gathers the list of all available environments from envlist, filters them based on the active Python version factors defined in the [gh-actions] section, and then executes the resulting selection [4]. If you find that your jobs are not running as expected, ensure that: - The target environment (e.g., pypy3) is included in the [tox] envlist [5]. - The mapping in [gh-actions] uses the correct version key format (pypy-3.11) [1][2]. Note: If you are migrating to tox 4, consider using the successor plugin tox-gh, which simplifies configuration by automatically detecting Python versions and mapping them based on a prioritized list of keys [7][8].
Citations:
- 1: https://github.com/ymyzk/tox-gh-actions/blob/master/README.md
- 2: https://github.com/ymyzk/tox-gh-actions
- 3: https://tessl.io/registry/tessl/pypi-tox-gh-actions
- 4: Non-listed environment not used even if configured in gh-actions block of tox.ini ymyzk/tox-gh-actions#44
- 5: Tox step not executed ymyzk/tox-gh-actions#180
- 6: Can't run envs that aren't in envlist? ymyzk/tox-gh-actions#11
- 7: https://p.rst.im/q/github.com/tox-dev/tox-gh
- 8: https://pypi.org/project/tox-gh/1.7.1/
🌐 Web query:
tox-gh-actions README gh-actions section envlist pypy-3.11 ignored if missing
💡 Result:
In tox-gh-actions, if an environment listed in the [gh-actions] section is missing from the [tox] envlist, it will not be executed [1][2]. The plugin operates by first identifying the candidate environments from the project's envlist and then filtering or selecting from those candidates based on the factors defined in the [gh-actions] configuration [1][2]. If you configure a mapping (such as pypy-3.11: pypy3) but pypy3 is not included in your [tox] envlist, tox-gh-actions will not attempt to run it because it is not part of the valid candidate pool [1][2]. This behavior is a design choice of the plugin [1]. To resolve this, you must ensure that all environments referenced in the [gh-actions] block are also present in your [tox] envlist [2]. Note that this is separate from tox's core skip_missing_interpreters setting, which governs how tox handles interpreters that are missing from the local system, rather than environments that are missing from the configuration definition [1][3]. If you are using tox 4 or later, you might consider using the newer tox-gh plugin, which handles environment selection differently by replacing the envlist entirely rather than filtering it, though it has different configuration requirements [4].
Citations:
- 1: Non-listed environment not used even if configured in gh-actions block of tox.ini ymyzk/tox-gh-actions#44
- 2: Tox step not executed ymyzk/tox-gh-actions#180
- 3: https://tox.wiki/en/latest/config.html
- 4: https://github.com/tox-dev/tox-gh
🌐 Web query:
tox-gh-actions pypy-3.11 maps to pypy-3.10 default version key pyproject envlist
💡 Result:
The tox-gh-actions plugin does not automatically map PyPy 3.11 to a PyPy 3.10 default key; rather, it requires explicit configuration to handle specific Python versions [1][2]. If you are using tox-gh-actions, you must define the mapping in your configuration file (e.g., tox.ini) under the [gh-actions] section [1][2]. Example configuration: [gh-actions] python = pypy-3.11: pypy3 If you are using the newer tox-gh plugin (for tox 4+), the mapping is defined in your pyproject.toml under [tool.tox.gh.python] [3][4]. The version keys for PyPy in that plugin are "pypy-3.13", "pypy-3", or "pypy3" [3][5]. If you find that your CI is defaulting to PyPy 3.10 when you expect PyPy 3.11, ensure that you have: 1. Explicitly added pypy-3.11 to your GitHub Actions matrix (e.g., in the python-version list) [6][7]. 2. Configured the corresponding key in your tox configuration file to point to the desired environment [1][3]. Without an explicit mapping, tox-gh-actions or tox-gh will not assume that a "pypy-3.11" job should run the environments configured for "pypy-3.10". If you are encountering this behavior, it is likely because the job is falling back to a broader configuration key or missing the specific "pypy-3.11" key entirely [1][2][3].
Citations:
- 1: https://pypi.org/project/tox-gh-actions/
- 2: https://github.com/ymyzk/tox-gh-actions/blob/master/README.md
- 3: https://github.com/tox-dev/tox-gh
- 4: https://pypi.org/project/tox-gh/1.7.1/
- 5: https://p.rst.im/q/github.com/tox-dev/tox-gh
- 6: ymyzk/tox-gh-actions@a2fd0ca
- 7: ymyzk/tox-gh-actions@8dcc23f
Align the PyPy matrix with tox config. .github/workflows/run-tox-tests.yml now schedules pypy-3.11, but pyproject.toml only defines pypy-3.10 in tool.tox.envlist and no PyPy 3.11 gh-actions mapping. Add the matching tox env/mapping, or keep the matrix on pypy-3.10; otherwise this job won’t run the intended interpreter.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/run-tox-tests.yml around lines 28 - 29, Align the PyPy
version between the workflow matrix and tox configuration: either change the
matrix entry in the workflow to pypy-3.10, or update pyproject.toml’s
tool.tox.envlist and gh-actions mapping to define pypy-3.11. Ensure both
configurations select the same intended interpreter.
No description provided.