Source-less python distributions + PEP3147

Offen
#95,827 9 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Dokumentation
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Beginne mit der Lektüre von PEP 3147, insbesondere des Abschnitts über Legacy-pyc-Dateien und Importe ohne Quelldateien, und prüfe anschließend die Beispiele aus Buildroot sowie das im Issue beschriebene Packaging-Verhalten. Kläre, ob Distributionen ohne Quelldateien vollständig unterstützt werden, und dokumentiere die Auswirkungen für Verbraucher, einschließlich Symlinks auf .py-Dateien und Wrapper-Skripte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

docs topic-importlib

PEP 3147 (https://peps.pythondiscord.com/pep-3147/) makes mention of "continue to support source-less distributions" by using legacy pyc file placements when no py file is adjacent. Blurb here: https://peps.pythondiscord.com/pep-3147/#case-4-legacy-pyc-files-and-source-less-imports

What is not clear is if the term "legacy" applies to just the pyc file placement or if it applies to both the pyc file placement and source-less distributions.

Are source-less distributions first-class citizens in terms of support? They're often used for embedded environments (Buildroot, for example, generates a source-less distribution) so it would make sense that they are supported.

If source-less distributions are first-class citizens and should continue to be supported, is there documentation about what that implies for consumers of a distribution? Some things that we've seen are:

  • Packages trying to symlink to .py files vs building a wrapper script that imports a module to execute code
  • Modules making assumptions that a .py file which may-or-may-not exist can be executed directly
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
558

Beitragsleitfaden

Beitragsleitfaden öffnen

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.