Skip to content

gh-86493: Modernize modules initialization code#106858

Merged
serhiy-storchaka merged 3 commits intopython:mainfrom
serhiy-storchaka:use-PyModule_Add
Jul 25, 2023
Merged

gh-86493: Modernize modules initialization code#106858
serhiy-storchaka merged 3 commits intopython:mainfrom
serhiy-storchaka:use-PyModule_Add

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 18, 2023

Use PyModule_Add() or PyModule_AddObjectRef() instead of soft deprecated PyModule_AddObject().

PyModule_AddObject() is only left in two modules: _testcapi and _testbuffer. But that code ignores any failures for now. They need more significant rewriting.


📚 Documentation preview 📚: https://cpython-previews--106858.org.readthedocs.build/

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants