bpo-44490: Improve typing module compatibility with types.Union (GH-27048) (#27222)

(cherry picked from commit bf89ff96e6ba21bb52b8597b5e51e8ffc57e6589)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
5 files changed