python / python/cpython

_osx_support._default_sysroot is dead in CPython but used downstream with no public replacement

Offen
#150,881 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

OS-mac stdlib
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

_osx_support._default_sysroot(cc) has no caller inside CPython, yet several downstream projects import it directly and there is no public replacement to send them to.

Lifecycle

  • GH-23301 (bpo-41116) added it to locate the macOS 11 SDK sysroot when building extensions.
  • Its only in-tree caller lived in distutils. GH-99061 (gh-92584) removed distutils, so nothing in CPython calls it now.

Downstream use

A GitHub code search finds live callers: pyston (setup.py), PyOxidizer (vendored distutils/unixccompiler.py), and the macports and fink Python patches. They call it to discover the SDK sysroot when compiling extensions.

No public replacement

sysconfig does not expose the SDK sysroot and distutils is gone, so a downstream user has nowhere supported to move. They would shell out to xcrun --show-sdk-path or copy the function body.

Question

For this private helper with live downstream use and no public equivalent, which way do we go:

  1. Keep it as-is and document that it is unsupported.
  2. Add a supported public equivalent first, then deprecate and remove.
  3. Remove it now under the "private API carries no guarantee" rule and accept the breakage.

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 Untersuchung von _osx_support._default_sysroot(cc) und der nachgelagerten Einstiegspunkte, die im Issue genannt werden: pystons setup.py, PyOxidizers vendored distutils/unixccompiler.py sowie die macports- und fink-Patches. Ermittle, ob ein unterstützter Ersatz, eine Dokumentation oder ein Entfernungspfad angemessen ist; die Arbeit ist abgeschlossen, wenn die gewählte Richtlinie und der nachgelagerte Migrationspfad klar sind.

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
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

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