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

Move Literal alias into TYPE_CHECKING block #45345

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Jan 2, 2025

This allows us to always import Literal from typing, which has received quite some bug fixes between different versions. Doing this in the typing block avoids loading the runtime version at all, thus eliminating differences between runtime Python versions.

@potiuk
Copy link
Member

potiuk commented Jan 2, 2025

@uranusjr - can you please rebase that one -> we found and issue with @jscheffl with the new caching scheme - fixed in #45347 that would run "main" version of the tests. I am asking in all affected PRs to rebase.

This allows us to always import Literal from typing, which has received
quite some bug fixes between different versions. Doing this in the
typing block avoids loading the runtime version at all, thus eliminating
differences between runtime Python versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants