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

Fix handling of tuple type context with unpacks #16444

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

ilevkivskyi
Copy link
Member

Fixes #16425

Fix is straightforward.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM (assuming tests pass).

This comment has been minimized.

@JukkaL
Copy link
Collaborator

JukkaL commented Nov 10, 2023

The test failure look real. I guess the test case needs to skipped on older Python versions.

@ilevkivskyi
Copy link
Member Author

I guess the test case needs to skipped on older Python versions.

Oh, I wrote the test using repro in the issue. I totally forgot I need to use backwards-compatible syntax (crash affects all Python versions).

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

anyio (https://github.com/agronholm/anyio): typechecking got 3.28x faster (16.8s -> 5.1s)
(Performance measurements are based on a single noisy sample)

@ilevkivskyi ilevkivskyi changed the title Fix handling on tuple type context with unpacks Fix handling of tuple type context with unpacks Nov 10, 2023
@ilevkivskyi ilevkivskyi merged commit f05663d into python:master Nov 10, 2023
18 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-tvt-ctx-crash branch November 10, 2023 11:32
JukkaL pushed a commit that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants