Uh oh!
There was an error while loading. Please reload this page.
gh-140550: allow slots that repeat information from PyModuleDef - #144340
Conversation
When integrating slots-based module creation is with the inittab, which currently requires PyModuleDef, it would be convenient to reuse the the same slots array for the MethodDef. Allow slots that match what's already present in the PyModuleDef.
I can confirm that with this PR the PyO3 tests all pass on my |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ngoldbaum
commented
Feb 6, 2026
Hi all - it'd be nice to have this merged by next week so this can be in 3.15a6 due out on Feb 10th. It'd be nice to not have the workaround for the old behavior committed to PyO3, see PyO3/pyo3#5753 (comment). |
Uh oh!
There was an error while loading. Please reload this page.
…pythonGH-144340) When integrating slots-based module creation is with the inittab, which currently requires PyModuleDef, it would be convenient to reuse the the same slots array for the MethodDef. Allow slots that match what's already present in the PyModuleDef.
…pythonGH-144340) When integrating slots-based module creation is with the inittab, which currently requires PyModuleDef, it would be convenient to reuse the the same slots array for the MethodDef. Allow slots that match what's already present in the PyModuleDef.
From feedback on the discussion thread:
When integrating slots-based module creation is with the inittab, which currently requires PyModuleDef, it would be convenient to reuse the the same slots array for the MethodDef.
This PR allows slots that match what's already present in the PyModuleDef.
cc @ngoldbaum
📚 Documentation preview 📚: https://cpython-previews--144340.org.readthedocs.build/