forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Raise an error when importing modules compiled for an older Python #139
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
Merged
befeleme
merged 1 commit into
fedora-python:fedora-3.14
from
befeleme:disallow-running-update
Feb 9, 2026
Merged
Raise an error when importing modules compiled for an older Python #139
befeleme
merged 1 commit into
fedora-python:fedora-3.14
from
befeleme:disallow-running-update
Feb 9, 2026
Conversation
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
28a5464 to
9dc0ede
Compare
hroncok
reviewed
Feb 6, 2026
hroncok
reviewed
Feb 6, 2026
hroncok
reviewed
Feb 6, 2026
Member
|
9dc0ede to
0505ac8
Compare
vstinner
reviewed
Feb 6, 2026
bc8e27a to
54a4259
Compare
Author
All five of them contain: hence use stable ABI. |
457ecc7 to
73b4b0b
Compare
vstinner
approved these changes
Feb 9, 2026
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
All five of them contain (...) hence use stable ABI.
In this case, they are not affected by the issue python#128341 and we are good.
73b4b0b to
70108fb
Compare
…fferent Python version This is a downstream workaround "implementing" python#137212 - the mechanism for the check exists in Python 3.15+, where it needs to be added to the standard library modules. In Fedora, we need it also in previous Python versions, as we experience segmentation fault when importing stdlib modules after update while Python is running. _tkinter, _tracemalloc and readline are not calling PyModuleDef_Init, which is modified with this patch, hence they need a direct call to the check function. Co-Authored-By: Karolina Surma <[email protected]>
70108fb to
d3057db
Compare
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.
This is a downstream workaround for
python#128341 -
it is resolved for Python 3.15+, but the issue happened again in the update from 3.14.2 to 3.14.3 (segfault when importing _pickle).