]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-88834: Unify the instance check for typing.Union and types.UnionType (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Dec 2024 08:19:45 +0000 (09:19 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Dec 2024 08:19:45 +0000 (08:19 +0000)
commitca017a171a20222c056f87551687da08c3856a3c
tree6072abd5f57d7e77b9424fa01b6bc241a0cfcaae
parentfcc9bc49c4f708a800ba0d67a39ca467c649960f
[3.12] gh-88834: Unify the instance check for typing.Union and types.UnionType (GH-128363) (GH-128371)

Union now uses the instance checks against its parameters instead of
the subclass checks.
(cherry picked from commit b2ac70a62ad1be8e037ce45ccf5f1b753ea5e64b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2024-12-30-20-48-28.gh-issue-88834.RIvgwc.rst [new file with mode: 0644]