You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f24678f
Browse filesBrowse the repository at this point in the historyBrowse files
Fix crashes caused by typevarlikes defaults in-place modifications (python#20139)
Fixespython#19185. Fixespython#19186.
Replaces python#19382 (not closing that yet, need to extract another part
related to `applytype` from there to another PR).
When a `TypeVar` defaults to another `TypeVar`, that default should
already be in scope. Fortunately we already analyze them in the correct
order, so the active scope has all the necessary information. This fixes
the namespace drift problem because the bound typevars are already
adjusted to use the correct namespace, and we do not need to touch their
global definitions.
I am not super happy about making TypeVarLikeScope impure here - any
suggestions? Would passing `self.msg` to every `bind_new` call look
saner?
---------
Co-authored-by: Ivan Levkivskyi <[email protected]>
0 commit comments