Skip to content

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

Merged
vstinner merged 1 commit into
python:3.13from
hroncok:3.13-121279
Jul 3, 2024
Merged

vstinner merged 1 commit into
python:3.13from
hroncok:3.13-121279

Conversation

@hroncok

@hroncok hroncok commented Jul 2, 2024 •

Copy link
Copy Markdown
Contributor

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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
@hroncok
hroncok deleted the 3.13-121279 branch July 3, 2024 10:00
@vstinner

vstinner commented Jul 3, 2024

Copy link
Copy Markdown
Member

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

vstinner commented Jul 3, 2024

Copy link
Copy Markdown
Member

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

2 participants