Set the same maximum version for all interpreters #5192
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.
Hi PyO3 maintainers. We're in progress of updating GraalPy to support Python 3.12 and we've run into the version check that hardcodes the maximum supported Python version on GraalPy to 3.11, which prevents any pyo3-based extension from building against our 3.12 snapshots. I'd like to propose setting the maximum supported version of alternative interpreters to the same as CPython. Here's why:
Having to bump the maximum supported version in PyO3 for GraalPy independently of CPython means that even if we do it while our version update is still in development, by the time we release, many packages will not have updated yet and thus won't work. In case of CPython, package maintainers typically work to update their PyO3 version to support the new CPython version soon after it's released or even before that. But GraalPy is not yet widespread enough, so we cannot realistically expect the same would happen for a new GraalPy release. When we merged GraalPy support in PyO3, it took many months for packages to update to the compatible PyO3 version and we still sometimes encounter packages that haven't updated to that version even though it's been more than a year.
The API exposed by GraalPy (and PyPy) should be mostly the same as CPython, so once PyO3 has been updated to support CPython 3.XY, there isn't much reason why it wouldn't work with the same Python version on GraalPy. In the case of 3.12, everything I've tried works fine with no PyO3 changes, except the version check.
CC @timfel