summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-07-14 17:09:15 (GMT)
committerGitHub <noreply@github.com>2021-07-14 17:09:15 (GMT)
commita158b20019b50e3ece6e4743ec4e6ae8d818b690 (patch)
treede618499ddf29130bc329bee132e370741c2d0c5 /Objects
parentb81cac05606c84958b52ada09f690463a3c7e949 (diff)
downloadcpython-a158b20019b50e3ece6e4743ec4e6ae8d818b690.zip
cpython-a158b20019b50e3ece6e4743ec4e6ae8d818b690.tar.gz
cpython-a158b20019b50e3ece6e4743ec4e6ae8d818b690.tar.bz2
bpo-44632: Fix support of TypeVar in the union type (GH-27139)
int | TypeVar('T') returns now an instance of types.Union instead of typing.Union.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unionobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unionobject.c b/Objects/unionobject.c
index bdcdb74..8818cc2 100644
--- a/Objects/unionobject.c
+++ b/Objects/unionobject.c
@@ -127,7 +127,7 @@ is_typing_name(PyObject *obj, char *name)
if (strcmp(type->tp_name, name) != 0) {
return 0;
}
- return is_typing_module(obj);
+ return is_typing_module((PyObject *)type);
}
static PyObject *