Skip to content

gh-96197: Add del sys.breakpointhook behavior test #96198

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 1 commit into from
Aug 23, 2022

Conversation

youknowone
Copy link
Contributor

@youknowone youknowone commented Aug 23, 2022

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Aug 23, 2022
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

I would like to check PyPy's behavior also.

@youknowone
Copy link
Contributor Author

Python 3.9.12 (05fbe3aa5b0845e6c37239768aa455451aa5faba, Mar 29 2022, 09:54:47)
[PyPy 7.3.9 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import sys
>>>> del sys.breakpointhook 
>>>> breakpoint()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: lost sys.breakpointhook
>>>> 

I think this is not a part to leave as implementation details. Debugging tools will expect a single way to check problems across multiple python versions.

@corona10
Copy link
Member

corona10 commented Aug 23, 2022

I think this is not a part to leave as implementation details.

This could be. I needed to check what's happening on PyPy when we del the sys.breakpointhook.
But looks like the same behavior.

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

lgtm

@youknowone
Copy link
Contributor Author

It could be, but it should not be. This is a sort of external api

@youknowone youknowone deleted the del-breakpointhook branch August 23, 2022 08:59
mdboom pushed a commit to mdboom/cpython that referenced this pull request Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants