bpo-44646: Fix the hash of the union type. (GH-27179) (#27180)

It no longer depends on the order of arguments.
hash(int | str) == hash(str | int)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
(cherry picked from commit aeaa553d650786afc6e68df1f4813ae1a5b71d05)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 files changed