Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Sync with importlib_metadata for Python 3.16

Offen
#160,386 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
backend, tooling

Rechercherichtung

Read the upstream importlib_metadata 9.0.1 and 9.1.0 changelogs linked in the issue, then compare their changes with Lib/importlib/metadata and its tests. Check each listed behavior and cleanup against the current Python 3.16 implementation; done when the applicable upstream changes are reflected and the relevant tests pass. The issue names _typing.py but does not identify specific test files.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

stdlib topic-importlib type-feature

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 9.0.1 and 9.1.0:

  • Prefer the greater metadata directory when a path supplies more than one. Children are now considered in reverse lexicographic order, so stale metadata left behind by an interrupted or unclean upgrade no longer shadows the version in use (#100666).
  • Identify the distribution when a required metadata field is missing. Distribution.name and .version now raise a KeyError naming both the field and the distribution, and PathDistribution renders itself as its metadata path.
  • Defer EntryPoint.value validation until use. Construction no longer validates, so one malformed entry point no longer prevents entry points in other groups from being selected (python/importlib_metadata#523).
  • importlib.metadata.diagnose no longer crashes on a metadata directory with no metadata file, or whose metadata declares no name; such distributions are reported by their location (python/importlib_metadata#548).
  • SimplePath.joinpath and SimplePath.__truediv__ take other positional-only, so pathlib.Path satisfies the protocol under type checkers that compare parameter names (python/importlib_metadata#542).

Two further items that are cleanups rather than behavior changes:

  • Prepared.normalize returns to the re.sub implementation. The hand-rolled version from #143658 was reverted upstream, so keeping it here would be fresh drift.
  • Lib/importlib/metadata/_typing.py is removed along with its import. Its only export, md_none, lost its last call site when Distribution.metadata began raising MetadataNotFound (#143387), but the import line survived the merge that landed that change, leaving an unused module imported by nothing.
Linked PRs
  • gh-160387
Vorherrschende Sprache
Python
Sterne
77.7k
Forks
38.3k
Ø Merge
13 Std. 43 Min.
Gemergte PRs (30 T.)
704

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python/cpython

Alle Issues in python/cpython

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.