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

[1.0 backport] Fix internal crash when resolve same partial type twice (#14552) #14553

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jan 29, 2023

Fixes: #14548

Fixed case when untyped list item type resolving can lead to an internal crash.

Code to reproduce this issue:

arr = []
arr.append(arr.append(1))

Basically, the issue is that after the first resolving of arr.append method, var is deleted from partial_types, and as war as arr.append is a nested call we try to delete the same var that was already deleted.

Fixes: python#14548

Fixed case when untyped list item type resolving can lead to an internal
crash.

Code to reproduce this issue:
```py
arr = []
arr.append(arr.append(1))
```

Basically, the issue is that after the first resolving of `arr.append`
method, `var` is deleted from `partial_types`, and as war as
`arr.append` is a nested call we try to delete the same `var` that was
already deleted.
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@hauntsaninja hauntsaninja merged commit 332616c into python:release-1.0 Jan 29, 2023
@hauntsaninja hauntsaninja deleted the release-1.0 branch January 29, 2023 20:29
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.

2 participants