pyo3
pyo3 copied to clipboard
Declarative modules submodules don't work with `#[pyo3::prelude::pymodule]`
pyca/cryptography avoids using the prelude, and instead references things with their full name.
This does not work with declarative modules's submodules:
#[pyo3::prelude::pymodule]
mod foo {
// `submod` won't actually be registered!
#[pyo3::prelude::pymodule]
mod submod {}
}
This is because we specifically look for #[pymodule], but don't allow the full name: https://github.com/PyO3/pyo3/blob/main/pyo3-macros-backend/src/module.rs#L213
We should allow the full name to work.