_osx_support._default_sysroot is dead in CPython but used downstream with no public replacement
Dieses Issue hat noch niemand übernommen.
- 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) removeddistutils, 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:
- Keep it as-is and document that it is unsupported.
- Add a supported public equivalent first, then deprecate and remove.
- Remove it now under the "private API carries no guarantee" rule and accept the breakage.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Ö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