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
No explicit way to create a TypeAliasType instance with a __module__ of choice #151607
So the only ways to create a type alias with a __module__ of choice is by managing globals()["__name__"] using e.g. eval(..., globals=...), temporarily setting globals()["name"] = ..., or defining a custom module with that __name__.
It would make more sense to just make __module__ mutable.
Activity
picnixz commentedon Jun 17, 2026
Isn't it a duplicate of an exisint issue already?
picnixz commentedon Jun 17, 2026
It is a dup of #149171 was changed in 3.15+.
flying-sheep commentedon Jun 18, 2026
Oops sorry!