Skip to content

bpo-40275: Add warnings_helper submodule in test.support #20797

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 2 commits into from
Jun 11, 2020

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Jun 11, 2020

move the following functions, classes to warnings_helper:

  • check_syntax_warning()
  • ignore_warnings()
  • WarningsRecorder
  • check_warnings(), _filterwarnings()
  • check_no_warnings()
  • check_no_resource_warning()

https://bugs.python.org/issue40275

@shihai1991
Copy link
Member Author

@vstinner Hi, victor. Pls take a look if you have free times. Thanks.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

In support/init.py, "import warnings" is only used by _MemoryWatchdog. Can you please move the import inside _MemoryWatchdog.start()? That's the whole purpose of https://bugs.python.org/issue40275 : remove imports.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@shihai1991
Copy link
Member Author

In support/init.py, "import warnings" is only used by _MemoryWatchdog. Can you please move the import inside _MemoryWatchdog.start()? That's the whole purpose of https://bugs.python.org/issue40275 : remove imports.

make sense, done.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@shihai1991
Copy link
Member Author

LGTM.

thanks, victor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants