This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyType_IsSubtype doesn't call __subclasscheck__
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, ionelmc, python-dev
Priority: normal Keywords:

Created on 2014-09-27 18:23 by ionelmc, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg227706 - (view) Author: Ionel Cristian Mărieș (ionelmc) Date: 2014-09-27 18:23
It appears it just does a reference check: https://hg.python.org/cpython/file/3.4/Objects/typeobject.c#l1300

It appears it's the same in 2.7: https://hg.python.org/cpython/file/2.7/Objects/typeobject.c#l1161

But this is not the intended behaviour right?
msg228668 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-10-06 12:14
This is indeed intended. I'll update the docs.
msg228669 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-06 12:15
New changeset dbf2a52575ee by Georg Brandl in branch '3.4':
Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__.
https://hg.python.org/cpython/rev/dbf2a52575ee
msg228670 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-06 12:18
New changeset af18f1e1ade2 by Georg Brandl in branch '2.7':
Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__.
https://hg.python.org/cpython/rev/af18f1e1ade2
History
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66697
2014-10-06 12:18:01python-devsetmessages: + msg228670
2014-10-06 12:15:20python-devsetnosy: + python-dev
messages: + msg228669

resolution: not a bug -> fixed
stage: resolved
2014-10-06 12:14:42georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg228668

resolution: not a bug
2014-09-27 18:23:51ionelmccreate