GeezerVison is showing github.com — Sync with importlib_metadata for Python 3.15 · Issue #132947 · python/cpython
Sync with importlib_metadata for Python 3.15 #132947DescriptionThe 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!
Linked PRs
Activityjaraco commented on 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. Reacted by Hugo van Kemenade changed the title [-]Sync with importlib_metadata for Python 3.14[/-] [+]Sync with importlib_metadata for Python 3.15[/+] on Aug 12, 2025jaraco commented on Aug 14, 2025 hugovk commented on 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. jaraco commented on 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 commented on Aug 18, 2025 This is causing multiple buildbot failures (how did our CI not catch this ?!). jaraco commented on Aug 23, 2025 Builds are passing on that commit, so I'll restore one file then the other. jaraco commented on Aug 24, 2025 The changes in 2afc2e1 are implicated. jaraco commented on 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 commented on 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 commented on 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 commented on 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_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. jaraco commented on 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 commented on 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. Reacted by Hugo van Kemenade jaraco commented on Sep 1, 2025 Revised PR is merged with the workaround. hugovk commented on Sep 1, 2025 StanFromIreland commented on Sep 1, 2025 Should this not be kept open till the workaround is fixed? jaraco commented on 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.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|