3.7: Don’t remove explicit subclasses from unions at runtime.
3.10: Unions can now be written as X | Y. See union type expressions.
3.14: types.UnionType is now an alias for Union, and both Union[int, str] and int | str create instances of the same class. To check whether an object is a Union at runtime, use isinstance(obj, Union). For compatibility with earlier versions of Python, use get_origin(obj) is typing.Union or get_origin(obj) is types.UnionType.