PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Other
11.44k stars 693 forks source link

refs #4286 -- allow setting submodule on declarative pymodules #4301

Closed alex closed 20 hours ago

davidhewitt commented 1 day ago

This makes a lot of sense, thanks. I wonder, should we go further and make it so that submodule is set by default when nested, similar to what we already do with module setting?

That way, explicitly marking submodule is only necessary if the module is "top-level" as far as Rust source structure goes.

Maybe that makes the rules too magical and complex 🤔. I think it's hopefully quite intuitive though?

alex commented 1 day ago

I would like to auto-set submodule, but figured I would do this in two parts. On Mon, Jul 1, 2024, 9:20 AM David Hewitt @.***> wrote:

This makes a lot of sense, thanks. I wonder, should we go further and make it so that submodule is set by default when nested, similar to what we already do with module setting?

That way, explicitly marking submodule is only necessary if the module is "top-level" as far as Rust source structure goes.

Maybe that makes the rules too magical and complex 🤔. I think it's hopefully quite intuitive though?

— Reply to this email directly, view it on GitHub https://github.com/PyO3/pyo3/pull/4301#issuecomment-2200124543, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBE4XDWCAM3K27HSUKLZKFJSBAVCNFSM6AAAAABKDOUMZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBQGEZDINJUGM . You are receiving this because you authored the thread.Message ID: @.***>