python / python/cpython

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

Đang mở
#150,881 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

OS-mac stdlib
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra _osx_support._default_sysroot(cc) và các entry point downstream được nêu trong issue: setup.py của pyston, distutils/unixccompiler.py được vendored bởi PyOxidizer, cùng các bản patch của macports và fink. Xác định xem việc thay thế được hỗ trợ, bổ sung tài liệu hay loại bỏ có phù hợp hay không; công việc hoàn tất khi policy được chọn và lộ trình migration downstream đã rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.