libfuse / pyfuse3

Python 3 bindings for libfuse 3 with asynchronous API (Trio compatible)
https://pyfuse3.readthedocs.io/
Other
167 stars 48 forks source link

Expose primitive type subclasses even when not type-checking #94

Closed bgilbert closed 11 months ago

bgilbert commented 11 months ago

These are sometimes useful in cast() expressions, which requires them to be exposed at runtime.

bgilbert commented 11 months ago

On second thought, this may not be a good idea. I've been typechecking my code using pyfuse3-stubs, and noticed that runtime casts weren't working. But those stubs seem to be a one-off upload by a third party, and since pyfuse3 doesn't export a py.typed file, types aren't part of the pyfuse3 API. So, this change is only useful when coupled with the unofficial stubs.

It'd be useful to provide py.typed, but that isn't possible without restructuring pyfuse3 into a package.

bgilbert commented 11 months ago

This is also completely wrong, because the exports from the .pyi file are what matter here, not the contents of the .pyx.

Sorry for the noise. I'm working on adding py.typed; RFC PR in #95.