python / python/cpython

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

オープン
#150,881 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

OS-mac stdlib
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

_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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず _osx_support._default_sysroot(cc) と、issue で挙げられている下流のエントリーポイント(pyston の setup.py、PyOxidizer に vendored された distutils/unixccompiler.py、macports および fink のパッチ)を調査します。サポート対象の置き換え、ドキュメント化、削除のいずれの方針が適切かを判断します。選択したポリシーと下流の移行経路が明確になれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。