Skip to content

Conversation

@ilevkivskyi
Copy link
Member

This avoids possible crashes during calculations of meets and joins on a cold update.

We do this by rejecting a fake ad-hoc TypeInfo created by fixup.py if a file containing the typed dict fallback was deleted, and instead using the generic typing._TypedDict fallback.

@ilevkivskyi ilevkivskyi requested a review from JukkaL July 11, 2019 16:10
@ilevkivskyi
Copy link
Member Author

@JukkaL if you think this is relatively safe, then we can merge this in release branch, otherwise I think it is not critical because this is kind of an old issue (see e.g. the second test).

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 for the quick fix! This looks safe enough to cherry-pick, but it's up to you. I agree that it doesn't look urgent.

Is a similar issue possible with named tuples?

@ilevkivskyi
Copy link
Member Author

I played more with the named tuples and they seem safe (mostly because fallbacks are computed on the fly, but also several places are guarded with if foo.tuple_type is not None).

@ilevkivskyi ilevkivskyi merged commit ac24ed3 into python:master Jul 11, 2019
@ilevkivskyi ilevkivskyi deleted the fix-typeddict-fallback branch July 11, 2019 16:58
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