_osx_support._default_sysroot is dead in CPython but used downstream with no public replacement
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
_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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting _osx_support._default_sysroot(cc) and the downstream entry points named in the issue: pyston's setup.py, PyOxidizer's vendored distutils/unixccompiler.py, and the macports and fink patches. Determine whether a supported replacement, documentation, or removal path is appropriate; the work is done when the chosen policy and downstream migration path are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100