Visitar URL original
bpo-38085: Fix throw exception in __init__subclass__ causes wrong isinstance() a… by hongweipeng · Pull Request #30112 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20250906090054/https://github.com/python/cpython/pull/30112
Skip to content

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