mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
gh-101162: Forbid using issubclass() with GenericAlias as the 1st arg (GH-103369)
This commit is contained in:
parent
666b68e8f2
commit
d93b4ac2ff
4 changed files with 20 additions and 1 deletions
|
|
@ -2812,7 +2812,7 @@ object_issubclass(PyThreadState *tstate, PyObject *derived, PyObject *cls)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* Probably never reached anymore. */
|
||||
/* Can be reached when infinite recursion happens. */
|
||||
return recursive_issubclass(derived, cls);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -626,6 +626,7 @@ ga_vectorcall(PyObject *self, PyObject *const *args,
|
|||
|
||||
static const char* const attr_exceptions[] = {
|
||||
"__class__",
|
||||
"__bases__",
|
||||
"__origin__",
|
||||
"__args__",
|
||||
"__unpacked__",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue