Skip to content

Set the same maximum version for all interpreters #5192

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msimacek
Copy link
Contributor

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

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think this is a reasonable proposal and it seems ok for PyO3 to assume that GraalPy is implementing the C API (& ABI) compatible with CPython; by making this change it gives you the power to do that without being hamstrung by us.

This just needs a "packaging" newsfragment please.

@msimacek
Copy link
Contributor Author

Thank you. Added the newsfragment. The remaining failures don't seem to be caused by my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants