GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #132947

New issue
Copy link
New issue
Copy link
Closed
Closed
Sync with importlib_metadata for Python 3.15#132947
Copy link
Assignees
jaraco
Labels
3.15bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-importlibtype-featureA feature request or enhancementA feature request or enhancement

Description

@hugovk
hugovk
opened on Apr 25, 2025
Issue body actions

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!

Linked PRs

  • gh-132947: Apply changes from importlib_metadata 8.7 #137885
  • Revert "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" #137924
  • Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924) #137930

Activity

Next
  1. hugovk
    added
    type-featureA feature request or enhancementA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    3.14bugs and security fixesbugs and security fixes
    on Apr 25, 2025
  2. jaraco commented on Aug 12, 2025

    @jaraco
    jaraco
    on Aug 12, 2025
    Member
    More actions

    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
  3. jaraco
    self-assigned this
    on Aug 12, 2025
  4. hugovk
    changed the title [-]Sync with importlib_metadata for Python 3.14[/-] [+]Sync with importlib_metadata for Python 3.15[/+] on Aug 12, 2025
  5. hugovk
    added
    3.15bugs and security fixesbugs and security fixes
    and removed
    3.14bugs and security fixesbugs and security fixes
    on Aug 12, 2025
  6. jaraco commented on Aug 14, 2025

    @jaraco
    jaraco
    on Aug 14, 2025
    Member
    More actions

    Today I stumbled on #124033.

  7. hugovk commented on Aug 15, 2025

    @hugovk
    hugovk
    on Aug 15, 2025
    MemberAuthor
    More actions

    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.

  8. jaraco
    added a commit that references this issue on Aug 18, 2025

    gh-132947: Apply changes from importlib_metadata 8.7 (#137885)

    5292fc0
  9. jaraco commented on Aug 18, 2025

    @jaraco
    jaraco
    on Aug 18, 2025
    Member
    More actions

    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.

  10. jaraco
    closed this as completedon Aug 18, 2025
  11. StanFromIreland
    reopened this on Aug 18, 2025
  12. StanFromIreland commented on Aug 18, 2025

    @StanFromIreland
    StanFromIreland
    on Aug 18, 2025
    Member
    More actions

    This is causing multiple buildbot failures (how did our CI not catch this ?!).

  13. 15 remaining items

  14. jaraco commented on Aug 23, 2025

    @jaraco
    jaraco
    on Aug 23, 2025
    Member
    More actions

    Builds are passing on that commit, so I'll restore one file then the other.

  15. jaraco commented on Aug 24, 2025

    @jaraco
    jaraco
    on Aug 24, 2025
    Member
    More actions

    The changes in 2afc2e1 are implicated.

  16. jaraco commented on Aug 24, 2025

    @jaraco
    jaraco
    on Aug 24, 2025
    Member
    More actions

    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.

  17. jaraco commented on Aug 24, 2025

    @jaraco
    jaraco
    on Aug 24, 2025
    Member
    More actions

    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.

  18. jaraco commented on Aug 24, 2025

    @jaraco
    jaraco
    on Aug 24, 2025
    Member
    More actions

    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.

  19. jaraco commented on Aug 25, 2025

    @jaraco
    jaraco
    on Aug 25, 2025
    Member
    More actions

    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.

  20. jaraco commented on Aug 25, 2025

    @jaraco
    jaraco
    on Aug 25, 2025
    Member
    More actions

    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.

  21. jaraco commented on Aug 31, 2025

    @jaraco
    jaraco
    on Aug 31, 2025
    Member
    More actions

    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
  22. jaraco
    added a commit that references this issue on Sep 1, 2025

    Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)…

    9b38c66
  23. jaraco commented on Sep 1, 2025

    @jaraco
    jaraco
    on Sep 1, 2025
    Member
    More actions

    Revised PR is merged with the workaround.

  24. jaraco
    closed this as completedon Sep 1, 2025
  25. hugovk commented on Sep 1, 2025

    @hugovk
    hugovk
    on Sep 1, 2025
    MemberAuthor
    More actions

    Thank you!

  26. StanFromIreland commented on Sep 1, 2025

    @StanFromIreland
    StanFromIreland
    on Sep 1, 2025
    Member
    More actions

    Should this not be kept open till the workaround is fixed?

  27. jaraco commented on Sep 6, 2025

    @jaraco
    jaraco
    on Sep 6, 2025
    Member
    More actions

    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.

  28. lkollar
    added a commit that references this issue on Sep 9, 2025

    Reapply "pythongh-132947: Apply changes from importlib_metadata 8.7 (p…

    e2dfba2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jaraco
    jaraco

Labels

3.15bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-importlibtype-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.