{{ message }}
gh-86493: Modernize modules initialization code#106858
Merged
serhiy-storchaka merged 3 commits intoJul 25, 2023
Merged
Conversation
Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().
vstinner
approved these changes
Jul 18, 2023
vstinner
left a comment
Member
There was a problem hiding this comment.
LGTM, but a few compiler warnings should be fixed first: see GHA job results, especially the Ubuntu job which logged many warnings.
Sorry, something went wrong.
corona10
approved these changes
Jul 18, 2023
corona10
left a comment
Member
There was a problem hiding this comment.
lgtm too
Sorry, something went wrong.
vstinner
approved these changes
Jul 18, 2023
vstinner
left a comment
Member
There was a problem hiding this comment.
LGTM. I didn't check individual refcount, I rely on Refleaks buildbots for that and other reviewers 😁 Overall the change LGTM and makes the code shorter and more regular. The old code was really hard to understand with INCREF/DECREF dance.
Sorry, something went wrong.
Member
|
That's a big change, thanks. |
Sorry, something went wrong.
jtcave
pushed a commit
to jtcave/cpython
that referenced
this pull request
Jul 27, 2023
Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().
This was referenced Feb 8, 2024
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
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.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.
Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().
PyModule_AddObject() is only left in two modules:
_testcapiand_testbuffer. But that code ignores any failures for now. They need more significant rewriting.📚 Documentation preview 📚: https://cpython-previews--106858.org.readthedocs.build/