Bug report
I think #105499 was a mistake. types.UnionType was intentionally named so to avoid confusion with typing.Union (see #88895). types.UnionType should not be subscriptable because it is not generic type (and if it was a generic type, subscription would have different semantic than for typing.Union). types.UnionType corresponds to typing._UnionGenericAlias, not typing.Union (see #89581 (comment)).
So we should restore typing.Union, make typing._UnionGenericAlias an alias of types.UnionType, and make types.UnionType non-subscriptable again.
Linked PRs
Bug report
I think #105499 was a mistake.
types.UnionTypewas intentionally named so to avoid confusion withtyping.Union(see #88895).types.UnionTypeshould not be subscriptable because it is not generic type (and if it was a generic type, subscription would have different semantic than fortyping.Union).types.UnionTypecorresponds totyping._UnionGenericAlias, nottyping.Union(see #89581 (comment)).So we should restore
typing.Union, maketyping._UnionGenericAliasan alias oftypes.UnionType, and maketypes.UnionTypenon-subscriptable again.Linked PRs