Skip to content

request: Explicitly-reexport @type_check_only in typing_extensions #10829

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

Closed
bzoracler opened this issue Oct 3, 2023 · 2 comments
Closed

request: Explicitly-reexport @type_check_only in typing_extensions #10829

bzoracler opened this issue Oct 3, 2023 · 2 comments

Comments

@bzoracler
Copy link
Contributor

@typing.type_check_only was not explicitly-reexported from typing_extensions as part of the typing-extensions 4.7.* update:

type_check_only,

As it is public API in typing.pyi with no indication of being deprecated, would there be any issues in re-exporting this symbol? I understand that it's still not available as a runtime object in typing_extensions.py, if that affects anything.

@JelleZijlstra
Copy link
Member

I don't think we should claim it's in typing-extensions when it isn't.

And I wouldn't want to add it to typing-extensions before it is in typing in reality.

@bzoracler
Copy link
Contributor Author

I get the impression from the Python docs that typing.type_check_only will remain a non-runtime object, with no plans to put an existent symbol in typing.py. However, since the symbol is wholly defined in typing.pyi, I assumed that the motivation for re-exporting the other symbols from typing would equally apply to type_check_only, allowing one to use typing_extensions in lieu of typing in all situations.

Not a big issue though, since there's plenty of workarounds. Thanks for the response.

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

No branches or pull requests

2 participants