libfuse / pyfuse3

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

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

Closed bgilbert closed 10 months ago

bgilbert commented 10 months ago

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

bgilbert commented 10 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 10 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.