aviramha/ormsgpack

Broken typing in latest (0.3.2)

pejter opened this issue · 3 comments

I saw you updated maturin in #23 so it can generate type stubs for you but there was no release build triggered and as such the latest version on PyPI still has broken types, because it's missing the "py.typed" file.

I don't know if you'd prefer to include the "py.typed" file or remove the .pyi stub and let maturin generate everything, but either way it'd be nice to release a fixed version. If you let me know which you'd prefer I can make a quick PR.

Hi!
Sorry for this. I didn't think it was worth a release.
I prefer the latter - if you'll open a PR I'll create a release after merging it.
Thanks 🙏

So it appears maturin can't generate it's own .pyi from Rust's types, my bad. But it does pick up the existing definition as-is.
However there is a problem I encountered when it comes to Python version flags in PyO3. At least in my environment using the existing #[cfg(not(python37))] doesn't work, however #[cfg(not(Py_3_7))] does, as per the PyO3 docs.
I've created a PR for it, feel free to merge or reject based on your own findings.

Oh wow! That's a nice catch. Thank you.
I'm closing this issue and will release a version with your PR ASAP.
Thanks again!