]> granicus.if.org Git - python/commit
bpo-29822: Make inspect.isabstract() work during __init_subclass__. (#678)
authorNate <nate@so8r.es>
Mon, 24 Apr 2017 17:06:15 +0000 (10:06 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 24 Apr 2017 17:06:15 +0000 (20:06 +0300)
commitfcfe80ec2592fed8b3941c79056a8737abef7d3b
tree5dc4a68452313e95e2e9bcecac7b9821d14c3a15
parent2e576f5aec1f8f23f07001e2eb3db9276851a4fc
bpo-29822: Make inspect.isabstract() work during __init_subclass__. (#678)

At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
Lib/inspect.py
Lib/test/test_inspect.py
Misc/NEWS