Include a py.typed marker file with the Python client#100
Conversation
|
I've created #101 as a possible followup step. |
| features = ["pyo3/extension-module"] | ||
| python-source = "python" | ||
| module-name = "opsqueue.opsqueue_internal" | ||
| include = ["**/py.typed"] |
There was a problem hiding this comment.
I don't know how to check if this does what I expect it to; I don't know how to inspect the results of just build-python. Would appreciate pointers!
There was a problem hiding this comment.
It didn't per se, but I figured it out: just build-python builds a wheel in /tmp and cleans it up before finishing, so instead I used maturin build which outputs it locally. It turns out that .whl files are secretly just zip archives, so I checked and the py.typed is indeed included. 🎉
|
Thank you very much for this improvement! I'll combine it into the next release together with the other open PRs. That way our users don't need to bump multiple times in quick succession. @OpsBotPrime merge |
|
Rebased as a79b0d8, waiting for CI … |
|
CI job 🟡 started. |
Closes #8. I've checked that the
py.typedfile is included when building via Nix, and then usingreveal_typeonProducerClient.get_submission_statuschanges mypy reportinginto
So this doesn't entirely make types available, due to PyO3/pyo3#5137, but it improves the situation.