Declarative modules: submodule declarations are not considered covered
From the coverage report on https://github.com/pyca/cryptography/pull/11159
As you can see the mod ... lines are all considered uncovered. This possibly has something to do with the spans on the generated code.
I suspect, but am not positive, that this is because the __pyo3_init functions are generated for submodules, but obviously never called.
Ok, my idea here is:
- Add a new
submoduleparameter topymodule:pymodule(submodule) - Automatically add this attribute for nested modules (users could add it themselves for their own modules)
- When a module is marked
submodule, we no longer emit__pyo3_init
WDYT?
@davidhewitt Once this and #4288 and #4308 are merged, I'd be interested in doing a point release so we can take advantage of declarative modules. Anything else you'd want to get in there?
I just had #4304, agreed a point release would be good. I'll try to review / prep the release tomorrow at the latest.
Cool, thanks!
I assume this is now resolved 😄
Yup! We're all aboard adopting them: https://github.com/pyca/cryptography/issues/11158
On Tue, Jul 9, 2024 at 8:16 AM David Hewitt @.***> wrote:
I assume this is now resolved 😄
— Reply to this email directly, view it on GitHub https://github.com/PyO3/pyo3/issues/4286#issuecomment-2217492564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBDTCZRXOSN2QCHGUR3ZLPIDBAVCNFSM6AAAAABJ4X44VSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXGQ4TENJWGQ . You are receiving this because you authored the thread.Message ID: @.***>
-- All that is necessary for evil to succeed is for good people to do nothing.