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.16 · Issue #160386 · python/cpython

Sync with importlib_metadata for Python 3.16 #160386

New issue
Copy link
New issue
Copy link
Open
Open
Sync with importlib_metadata for Python 3.16#160386
Copy link
Labels
stdlibStandard 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

@jaraco
jaraco
opened on Oct 22, 2026
Issue body actions

Tracking issue for applying importlib_metadata changes to importlib.metadata in 3.16, continuing the pattern of #132947 (3.15) and #117089 (3.13).

This covers importlib_metadata 10.0.0, a change in functionality rather than a fix:

  • Shared protocols for consumers. IDistribution and IPackagePath join
    the existing PackageMetadata in _meta.py, and the functions returning
    distributions and files are annotated with them. A consumer can target one
    interface across importlib.metadata and the backport instead of either
    library's concrete classes, which is what a custom provider's objects
    require: the provider serves consumers of both libraries and cannot subclass
    its way into satisfying both (API incompatibility with importlib.metadata (or at least the API is not type-safe?) importlib_metadata#486,
    Enforce local versions of objects and introduce shared protocols importlib_metadata#505). All three protocols are
    @runtime_checkable, so isinstance answers the question without
    evaluating a distribution's properties on 3.12 and later.

    What does not come downstream is the other half of that release. The backport
    substitutes its own classes for the importlib.metadata objects a provider
    supplies, and warns where a provider's class omits a member IDistribution
    requires; both live in its _compat package, which is excluded from the
    port. Only the protocols those mechanisms are defined against are synced, so
    the guidance for providers is documented here as the backport's behavior
    (Expand documentation for importlib.metadata custom providers to include caveats regarding backports #123976).

Linked PRs

  • gh-160386: Apply changes from importlib_metadata 9.1 #160387
  • gh-160386: Apply changes from importlib_metadata 10.0 and document the shared protocols #160344

Activity

  1. NekoAsakura
    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
    topic-importlib
    on Oct 23, 2026
  2. jaraco
    added 2 commits that reference this issue on Oct 31, 2026

    gh-160386: Apply changes from importlib_metadata 9.1 (#160387)

    5a97efe

    pythongh-160386: Apply changes from importlib_metadata 10.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard 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 01402503 — 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.