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
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() #29048
Conversation
Thanks @sweeneyde for the PR, and @gpshead for merging it |
* Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <[email protected]> [Google] (cherry picked from commit 423fa1c) Co-authored-by: Dennis Sweeney <[email protected]>
GH-29175 is a backport of this pull request to the 3.10 branch. |
* Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <[email protected]> [Google] (cherry picked from commit 423fa1c) Co-authored-by: Dennis Sweeney <[email protected]>
Thanks @sweeneyde for the PR, and @gpshead for merging it |
GH-29178 is a backport of this pull request to the 3.9 branch. |
* Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <[email protected]> [Google] (cherry picked from commit 423fa1c) Co-authored-by: Dennis Sweeney <[email protected]>
|
…-29178) * Use Py_EnterRecursiveCall() in issubclass() Reviewed-by: Gregory P. Smith <[email protected]> [Google] (cherry picked from commit 423fa1c) Co-authored-by: Dennis Sweeney <[email protected]>
This is an alternative to GH-29017. This shouldn't affect performance too much because the recursion checks only occur once for each time a length>=2
__bases__
tuple is found (i.e. for multiple inheritance). Note that if we get stuck in thewhile (1) {...}
loop, as long as the pathological__bases__
implementation is in Python, we can still interrupt with a KeyboardInterrupt.https://bugs.python.org/issue30570