Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

bgilbert
Copy link
Contributor

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

These are sometimes useful in cast() expressions, which requires them to
be exposed at runtime.
@bgilbert
Copy link
Contributor Author

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 bgilbert marked this pull request as draft November 22, 2023 03:43
@bgilbert
Copy link
Contributor Author

bgilbert commented Nov 22, 2023

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.

@bgilbert bgilbert closed this Nov 22, 2023
@bgilbert bgilbert deleted the type_checking branch November 22, 2023 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant