types.GenericAlias vs typing._GenericAlias

What’s goal of knowing that? What makes Foo[int] and list[int] related?

If your goal is whether type has type arguments/generic base you can use get_origin/get_args. If get_origin returns None then it’s not a subscripted generic type.