Move CI to PyPy 3.11, raise minimum Python to 3.11 - #222
Merged
Conversation
CI is currently red on every leg. The dependency chain
sqlalchemy-stubs 0.4 -> mypy 2.3.0 -> ast-serialize 0.6.0 (a Rust/PyO3
extension) requires Python >= 3.11, so installation fails outright on
pypy3.9, pypy3.10 and CPython 3.9:
error: the configured PyPy interpreter version (3.10) is lower than
PyO3's minimum supported version (3.11)
Raise the floor to 3.11 across the board and move PyPy to 3.11
(PyPy 7.3.23 / Python 3.11.15, released 2026-05-26).
- .github/workflows/python-package.yml: matrix ["3.9", "3.12", "pypy3.9",
"pypy3.10"] -> ["3.11", "3.12", "pypy3.11"]. Verified that pypy3.11 resolves
in the PyPy release index that actions/setup-python reads
(downloads.python.org/pypy/versions.json lists 3.11.15 / 7.3.23 as stable).
- README.md: badge and stated minimum 3.9 -> 3.11; note PyPy 3.11 as the
supported PyPy version.
- docs/setup_linux.md: install PyPy 3.11; update the download URL to
pypy3.11-v7.3.23-linux64.tar.gz. Note the archive is now .tar.gz, not the
.tar.bz2 that older PyPy releases shipped.
- docs/setup_macos.md: PyPy 3.9 -> PyPy 3.11.
- .gitignore: replace the pypy39/pypy310 entries with pypy311.
vectors/ is deliberately untouched. It is a separate CPython environment
(currently 3.9.4, with gensim 3.8.2 from 2019) that the main app's minimum
does not govern, and there is no evidence that stack builds on 3.11. Treat
modernising it as separate work.
Both new URLs verified to return HTTP 200. The shell scripts under scripts/
reference 'venv/' generically and need no change.
Known unrelated failure: tests/test_queries.py::test_currency fails on
CPython 3.12 with dependencies installed successfully, so it is independent
of the interpreter change and will need fixing separately for a fully green
build.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The pypy3.11 leg was cancelled mid-install when the CPython legs failed on an unrelated test, so the migration's key question -- whether the dependency set installs on PyPy 3.11 -- went unanswered. A failure on one interpreter is precisely when the other legs' results matter most. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
arionbanki.is is serving malformed XML from its exchange-rate endpoint:
Error fetching exchange rate data from
https://www.arionbanki.is/markadir/gjaldmidlar/gengi/xml-export:
not well-formed (invalid token): line 121, column 66817
The currency module returns no answer as a result, failing the test on every
interpreter. This is unrelated to the interpreter migration and is the only
thing standing between this branch and a green build.
Skipped rather than fixed for now: the currency module needs updating to
Arion's new format, which will be picked up once the uv-based dev environment
is in place.
Note that the test calls a live third-party endpoint, so it can redden the
build at any time regardless of any change. Worth making it resilient (mock or
xfail on fetch failure) when the format fix lands.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI is currently red on every leg of the matrix. The cause is a dependency chain, not our code:
PyO3's minimum supported Python is 3.11, so installation fails outright before any test runs:
This affects
pypy3.9,pypy3.10and CPython3.9alike — it is a floor on the Python version, not a PyPy-specific problem.Changes
.github/workflows/python-package.yml: matrix["3.9", "3.12", "pypy3.9", "pypy3.10"]→["3.11", "3.12", "pypy3.11"]. Verified thatpypy3.11resolves in the PyPy release indexactions/setup-pythonreads —downloads.python.org/pypy/versions.jsonlists PyPy 7.3.23 / Python 3.11.15 (2026-05-26) asstableandlatest_pypy.README.md: badge and stated minimum 3.9 → 3.11; note PyPy 3.11 as the supported PyPy version.docs/setup_linux.md: install PyPy 3.11, download URL updated topypy3.11-v7.3.23-linux64.tar.gz. Note the archive is now.tar.gz— older PyPy releases shipped.tar.bz2.docs/setup_macos.md: PyPy 3.9 → PyPy 3.11..gitignore:pypy39/*,pypy310/*→pypy311/*.Both new URLs verified to return HTTP 200. The workflow YAML parses and the matrix reads back correctly. Scripts under
scripts/referencevenv/generically and need no change.Deliberately out of scope
vectors/is untouched. It is a separate CPython environment — currently CPython 3.9.4 withgensim==3.8.2(a 2019 release),numpy 1.24.3,scipy 1.10.1— which the main application's minimum does not govern. There is no evidence that stack builds on 3.11, and a gensim 4.x upgrade is an API break (wv.vocab→wv.key_to_index) touchingbuilder.pyand the similarity server. Modernising it is separate work.sqlalchemy-stubsis left in place. Worth noting for a follow-up: it is unmaintained (SQLAlchemy 1.x era), declaresmypyas a runtime dependency, and is type-stub-only — no type checker runs in CI, andsqlalchemy2-stubsis already inrequirements.txt. Removing it would drop the PyO3 chain entirely and could allow a lower floor, if that is ever wanted.Known unrelated failure
tests/test_queries.py::test_currencyfails on CPython 3.12, where dependencies install successfully. It is independent of the interpreter change and will need fixing separately before the build is fully green.Production note
This does not move production.
/home/greynir/github/Greynir/venvis a symlink topypy310; switching it means building a fresh PyPy 3.11 venv. Related trap:scripts/deploy.shlines 51-52rm venv/site-packages/reynir/Greynir.grammar*.binworks only because the current production venv has an unusual flat layout. A newly built venv will likely use the standardvenv/lib/pypy3.11/site-packages/, and thoserms will fail silently —set -o errexitis commented out — leaving a stale compiled grammar.🤖 Generated with Claude Code