You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sync with importlib_metadata for Python 3.15 #132947
The sync for Python 3.13 was with importlib_metadata 7.1.0: #117089 / #117094
The most recent update incorporated changes from importlib_metadata 7.2.1: #120911
@jaraco Are there any changes needed from importlib_metadata 8.6.1 before the Python 3.14 feature freeze on 2025-05-06? If so, please could you take care of it? Thank you!
Just getting to this in my backlog. Obviously the deadline has passed, so whatever changes are to be incorporated will need to happen in 3.15 (with bugfixes potentially backported). I hope to get to it at some point.
The problem occurs even after 9130df2, which has very few changes to the functionality. I'm beginning to wonder if it's the import order that's triggering the error.
In 939cf5a, I've reduced the diff of importlib.metadata.__init__ to almost nothing, but the tests still fail, so I'll keep going until they pass. I'm now thinking it might be the None response for missing metadata.
Simply disabling the test for missing metadata (9853179) allows the tests to pass. These tests have next to nothing to do with the tests for packages_distributions, where disabling those also prevents the failure.
None of these findings indicates any cause of the underlying resource warning. It seems that disabling either 'test_missing_metadata' or 'test_packages_distributions_example2' allows the tests to pass.
Given how tedious it is to replicate these failures and how elusive the cause seems to be, I'm tempted to just provide a workaround and leave the root cause to be discerned later.
Well, it seems that randomly disabling one of the two tests (102a43b) is insufficient to avoid the resource warning.
I do see some tests passing that were failing before, which suggests that simply disabling test_missing_data is insufficient to suppress the issue. At this point, I'm out of good ideas and I'm going to just going to disable the one test we know fixes the issue.
Now I'm completely confused. Even with the most relevant test disabled, the resource warnings are still occurring. Maybe I'm just not detecting the buildbot correctly.
Confirmed - I've yet to find a technique to adequately detect running under buildbot.
I kicked off a conversation to ask about identifying buildbots. It seems there's not currently any way to do that, so my intention is to for now disable the one test that's known to precipitate the issue (except maybe on GitHub actions) and to file a separate issue to track down the failure.
This issue was about bringing in the changes from importlib_metadata, which are now merged in the most recent PR. I specifically wanted to separate this issue from the emergent regression in buildbots, because they are seemingly loosely related. Although these changes were necessary to bring about the ResourceWarnings, they also appear not to be a direct cause but a proximate cause, and in the meantime, these changes are valuable even if the tests can't ever be made to pass in the buildbots.
The issue tracking the ResourceWarnings is #138313.
Activity
jaraco commentedon Aug 12, 2025
Just getting to this in my backlog. Obviously the deadline has passed, so whatever changes are to be incorporated will need to happen in 3.15 (with bugfixes potentially backported). I hope to get to it at some point.
[-]Sync with importlib_metadata for Python 3.14[/-][+]Sync with importlib_metadata for Python 3.15[/+]jaraco commentedon Aug 14, 2025
Today I stumbled on #124033.
hugovk commentedon Aug 15, 2025
Oh look! I've approved it. Feel free to merge it as an incremental step towards 8.7, or update it to include up to 8.7 if you prefer.
gh-132947: Apply changes from importlib_metadata 8.7 (#137885)
jaraco commentedon Aug 18, 2025
I'm going to close this for now, although I may re-open it or reference it should more changes be needed for Python 3.15.
StanFromIreland commentedon Aug 18, 2025
This is causing multiple buildbot failures (how did our CI not catch this ?!).
15 remaining items
jaraco commentedon Aug 23, 2025
Builds are passing on that commit, so I'll restore one file then the other.
jaraco commentedon Aug 24, 2025
The changes in 2afc2e1 are implicated.
jaraco commentedon Aug 24, 2025
The problem occurs even after 9130df2, which has very few changes to the functionality. I'm beginning to wonder if it's the import order that's triggering the error.
jaraco commentedon Aug 24, 2025
In 939cf5a, I've reduced the diff of
importlib.metadata.__init__to almost nothing, but the tests still fail, so I'll keep going until they pass. I'm now thinking it might be the None response for missing metadata.jaraco commentedon Aug 24, 2025
Simply disabling the test for missing metadata (9853179) allows the tests to pass. These tests have next to nothing to do with the tests for packages_distributions, where disabling those also prevents the failure.
None of these findings indicates any cause of the underlying resource warning. It seems that disabling either 'test_missing_metadata' or 'test_packages_distributions_example2' allows the tests to pass.
Given how tedious it is to replicate these failures and how elusive the cause seems to be, I'm tempted to just provide a workaround and leave the root cause to be discerned later.
jaraco commentedon Aug 25, 2025
Well, it seems that randomly disabling one of the two tests (102a43b) is insufficient to avoid the resource warning.
I do see some tests passing that were failing before, which suggests that simply disabling
test_missing_datais insufficient to suppress the issue. At this point, I'm out of good ideas and I'm going to just going to disable the one test we know fixes the issue.jaraco commentedon Aug 25, 2025
Now I'm completely confused. Even with the most relevant test disabled, the resource warnings are still occurring. Maybe I'm just not detecting the buildbot correctly.
Confirmed - I've yet to find a technique to adequately detect running under buildbot.
jaraco commentedon Aug 31, 2025
I kicked off a conversation to ask about identifying buildbots. It seems there's not currently any way to do that, so my intention is to for now disable the one test that's known to precipitate the issue (except maybe on GitHub actions) and to file a separate issue to track down the failure.
Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)…
jaraco commentedon Sep 1, 2025
Revised PR is merged with the workaround.
hugovk commentedon Sep 1, 2025
Thank you!
StanFromIreland commentedon Sep 1, 2025
Should this not be kept open till the workaround is fixed?
jaraco commentedon Sep 6, 2025
This issue was about bringing in the changes from importlib_metadata, which are now merged in the most recent PR. I specifically wanted to separate this issue from the emergent regression in buildbots, because they are seemingly loosely related. Although these changes were necessary to bring about the ResourceWarnings, they also appear not to be a direct cause but a proximate cause, and in the meantime, these changes are valuable even if the tests can't ever be made to pass in the buildbots.
The issue tracking the ResourceWarnings is #138313.
Reapply "pythongh-132947: Apply changes from importlib_metadata 8.7 (p…