Skip to content

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

Merged
corona10 merged 1 commit into
python:mainfrom
youknowone:del-breakpointhook
Aug 23, 2022
Merged

gh-96197: Add del sys.breakpointhook behavior test#96198
corona10 merged 1 commit into
python:mainfrom
youknowone:del-breakpointhook

Conversation

@youknowone

@youknowone youknowone commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

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

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

corona10 commented Aug 23, 2022

Copy link
Copy Markdown
Member

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.

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@youknowone

Copy link
Copy Markdown
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