Title: _osx_support._default_sysroot is dead in CPython but used downstream with no public replacement · Issue #150881 · python/cpython · GitHub
Open Graph Title: _osx_support._default_sysroot is dead in CPython but used downstream with no public replacement · Issue #150881 · python/cpython
X Title: _osx_support._default_sysroot is dead in CPython but used downstream with no public replacement · Issue #150881 · python/cpython
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 sys...
Open Graph 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)...
X 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)...
Opengraph URL: https://github.com/python/cpython/issues/150881
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"_osx_support._default_sysroot is dead in CPython but used downstream with no public replacement","articleBody":"`_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.\n\n## Lifecycle\n\n- GH-23301 (bpo-41116) added it to locate the macOS 11 SDK sysroot when building extensions.\n- Its only in-tree caller lived in `distutils`. GH-99061 (gh-92584) removed `distutils`, so nothing in CPython calls it now.\n\n## Downstream use\n\nA 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.\n\n## No public replacement\n\n`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.\n\n## Question\n\nFor this private helper with live downstream use and no public equivalent, which way do we go:\n\n1. Keep it as-is and document that it is unsupported.\n2. Add a supported public equivalent first, then deprecate and remove.\n3. Remove it now under the \"private API carries no guarantee\" rule and accept the breakage.\n","author":{"url":"https://github.com/gaborbernat","@type":"Person","name":"gaborbernat"},"datePublished":"2026-06-03T19:39:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/150881/cpython/issues/150881"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:085296aa-67fb-1775-81cf-4a0be1d4bd8e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 835E:14011B:788470E:A8FC498:6A508B6D |
| html-safe-nonce | 76db78bf03af00793d027c801e0eaec536596ae5f8b35a5c2dea5b3bd4dedce2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzVFOjE0MDExQjo3ODg0NzBFOkE4RkM0OTg6NkE1MDhCNkQiLCJ2aXNpdG9yX2lkIjoiMjM2NDYyMzk2Nzc3MDE1MTc4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 83d87e1b00ab1c03a0a35178e2b8ce8213440fa68e13efb821a9b4d1923febe6 |
| hovercard-subject-tag | issue:4583076117 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/150881/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bec01688ac9487379ad6f810cd5978a04765147998c086e3a3261a22301a3c13/python/cpython/issues/150881 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bec01688ac9487379ad6f810cd5978a04765147998c086e3a3261a22301a3c13/python/cpython/issues/150881 |
| og:image:alt | _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)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gaborbernat |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width