Skip to content

PEP 702: Runtime warnings - #112

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
JelleZijlstra:pep702
Feb 7, 2023
Merged

JelleZijlstra merged 2 commits into
python:mainfrom
JelleZijlstra:pep702

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented Feb 5, 2023 •

Copy link
Copy Markdown
Member

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great!

I was a little surprised by the choice of category=None as a way to spell no warning, since with warnings.warn, category=None is UserWarning. But I think it's fine, the behaviour will be clearly visible + the documentation will make clear that category=None will disable the warning.

@hauntsaninja

Copy link
Copy Markdown
Collaborator

If you wanted, could add a test for a method as well

@JelleZijlstra
JelleZijlstra merged commit e81cb82 into python:main Feb 7, 2023
@JelleZijlstra
JelleZijlstra deleted the pep702 branch February 7, 2023 04:36
@JelleZijlstra
JelleZijlstra restored the pep702 branch September 10, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants