]> granicus.if.org Git - python/commit
[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)
authorNate <nate@so8r.es>
Wed, 7 Jun 2017 04:21:34 +0000 (21:21 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 7 Jun 2017 04:21:34 +0000 (07:21 +0300)
commit09b6c0c71ea944f7e8b46998f3ebaf5b9fbe15f6
treed739191285cb0132915499694eb6b8b97c1fe4f0
parent6fb12b5c43945f61f3da82e33eafb4ddae2296ee
[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)

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.
(cherry picked from commit fcfe80ec2592fed8b3941c79056a8737abef7d3b)
Lib/inspect.py
Lib/test/test_inspect.py
Misc/NEWS