python / python/cpython

Convert `_sysconfigdata` to a JSON file

Offen
#127,178 8 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

stdlib topic-sysconfig type-feature
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Feature or enhancement

Proposal:

Currently, as part of the sysconfig internals, we generate a _sysconfigdata Python module containing the variables for sysconfig.get_config_vars(). This data is consists of all Makefile variables, which can be encoded as JSON data.

The use of a module instead of a text file is historic, and adds unnecessary complexity. Converting _sysconfigdata to a JSON file would simplify the sysconfig implementation. Additionally, it also makes it easier for tools to introspect the Python installation, as this would remove the necessity to execute Python code to read _sysconfigdata.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-127180
  • gh-127302
  • gh-128558

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der Lektüre der sysconfig-Interna, die das Python-Modul _sysconfigdata erzeugen und verwenden, und prüfe anschließend die verknüpften PRs gh-127180, gh-127302 und gh-128558. Die Aufgabe ist abgeschlossen, wenn die Konfigurationsdaten als JSON dargestellt werden, sysconfig.get_config_vars() weiterhin funktioniert und Tools die Installation untersuchen können, ohne Python-Code auszuführen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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