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

bpo-45679: Do not cache typing.Literal with more than one type arg #29333

Closed
wants to merge 1 commit into from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 30, 2021

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually just make _tp_cache(typed=True) a no-op, but in complex way.

Do not change _tp_cache, change _LiteralSpecialForm.__getitem__ and Literal.

@serhiy-storchaka
Copy link
Member

And it is expected that the cache is always enabled.

See alternative PR #29334.

@sobolevn sobolevn closed this Oct 30, 2021
@sobolevn
Copy link
Member Author

Yeap, thanks! A bit sad, that I was not quick enough to send a corrected version.

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.

None yet

4 participants