[Python-checkins] [python/cpython] 09b6c0: [3.6] bpo-29822: make inspect.isabstract() work du...

GitHub noreply at github.com
Wed Jun 7 00:21:35 EDT 2017


  Branch: refs/heads/3.6
  Home:   https://github.com/python/cpython
  Commit: 09b6c0c71ea944f7e8b46998f3ebaf5b9fbe15f6
      https://github.com/python/cpython/commit/09b6c0c71ea944f7e8b46998f3ebaf5b9fbe15f6
  Author: Nate <nate at so8r.es>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M Lib/inspect.py
    M Lib/test/test_inspect.py
    M Misc/NEWS

  Log Message:
  -----------
  [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)




More information about the Python-checkins mailing list