Skip to content

Remove outdated ImportError check for warnings#279

Merged
jaraco merged 2 commits intopypa:mainfrom
abravalheri:warnings-exist
Aug 22, 2024
Merged

Remove outdated ImportError check for warnings#279
jaraco merged 2 commits intopypa:mainfrom
abravalheri:warnings-exist

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
@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