Skip to content

[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc #121281

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 1 commit into from
Jul 3, 2024

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jul 2, 2024

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, thanks for the fix @hroncok.

@vstinner vstinner merged commit dacf4ff into python:3.13 Jul 3, 2024
37 checks passed
@hroncok hroncok deleted the 3.13-121279 branch July 3, 2024 10:00
@vstinner
Copy link
Member

vstinner commented Jul 3, 2024

Oh. Sadly, the test fails when run more than once with -R 3:3 (refleak):

Example:

$ ./python -m test test_importlib -R 3:3 -v -m Frozen_DeprecatedAttrsTests -m Frozen_DeprecatedAttrsTests
(...)
FAIL: test_deprecated_attr_ResourceReader (test.test_importlib.test_abc.Frozen_DeprecatedAttrsTests.test_deprecated_attr_ResourceReader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/3.13/Lib/test/test_importlib/test_abc.py", line 921, in test_deprecated_attr_ResourceReader
    with self.assertWarns(DeprecationWarning):
        self.abc.ResourceReader
AssertionError: DeprecationWarning not triggered
(...)

@vstinner
Copy link
Member

vstinner commented Jul 3, 2024

Oh. Sadly, the test fails when run more than once with -R 3:3 (refleak): (...)

I propose PR gh-121319 to fix the test.

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