Skip to content
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

Remove outdated ImportError check for warnings #279

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

abravalheri
Copy link
Contributor

If I am not mistaken warnings is a valid import in any supported version of Python, so there is no need for handling an ImportError.

This seems to have been introduced in c3c5a89, 31th Oct 2002 (so the commit might have been accounting for versions of Python prior to 2.1, which was released on 17th Apr 2001).

@abravalheri
Copy link
Contributor Author

The change in 8c6015c is unrelated but seems to be necessary to satisfy the ruff linter given the existing configurations.

@abravalheri abravalheri changed the title Remove outdated ImportError check for warnings Remove outdated ImportError check for warnings Aug 12, 2024
@abravalheri
Copy link
Contributor Author

The diffcov fail seems to be a false positive (the conditional block seems to never have been exercised in tests, so in that regard, not much have changed).

@jaraco jaraco merged commit 7f0e0c9 into pypa:main Aug 22, 2024
19 of 21 checks passed
@abravalheri abravalheri deleted the warnings-exist branch August 22, 2024 15:36
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