Skip to content

bpo-38085: Fix throw exception in __init__subclass__ causes wrong isinstance() a… #30112

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

Closed

Conversation

hongweipeng
Copy link
Contributor

@hongweipeng hongweipeng commented Dec 15, 2021

…nd issubclass() results in subclasses of abc.ABCMeta.

https://bugs.python.org/issue38085

…nd issubclass() results in subclasses of abc.ABCMeta.
@cfbolz
Copy link
Contributor

cfbolz commented Dec 23, 2021

see my comments on the issue. imo this is solving the symptom of the problem, but not the root problem, which is that a broken class appears in its base classes .__subclasses__() list.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jan 24, 2022
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. All tests passed for me:
./python -m test -v test_abc
Ran 72 tests in 0.019s
OK
== Tests result: SUCCESS ==
1 test OK.
Total duration: 96 ms
Tests result: SUCCESS
cpython on  abc-init-subclass-exception [$] via 🐍 v3.11.0a3+

@hongweipeng
Copy link
Contributor Author

The root problem is that a broken class appears in its base classes .__subclasses__() list. so I close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants