Skip to content

[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ #1979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 7, 2017

Conversation

Soares
Copy link
Contributor

@Soares Soares commented Jun 7, 2017

This is a backport of #678 to python 3.6. It depends on #527, which was only recently backported (#1282), and I might have made this backport too soon, in which case I apologized.

Also, I'm not entirely sure that I used the cherry picker tool correctly, because (e.g) a new news item snuck into Misc/NEWS when the backport was generated; I'll clean that up shortly, but I recommend having someone double-check that I'm doing this right :-)

Nate added 2 commits June 6, 2017 17:16
…s__. (pythonGH-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..
(cherry picked from commit fcfe80e)
Nate and others added 3 commits June 6, 2017 17:21
This PR was generated by cherry_picker.py. There was a merge conflict in Misc/NEWS that I thought I resolved correctly, but the diff of this branch with master shows that the news item is new-to-this-PR. I'm not sure what's going on, but this commit removes the news item. I'd appreciate a second pair of eyes making sure that I'm doing things right.
The cherry-pick apparently introduced a duplicate item in Misc/NEWS, not sure exactly how. The previous commit removed one copy, but I accidentally removed the spurious copy. I *think* this commit will set things right.
@serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Jun 7, 2017
@serhiy-storchaka serhiy-storchaka merged commit 09b6c0c into python:3.6 Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants