Use NETRC environment variable
Đang mở
@picnixz đang làm issue này rồi.
Từ ngày 16/8/2025.
stdlib
type-feature
- 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ả
Feature or enhancement
Proposal:
Hi,
I'd like to add support to the NETRC environment variable as documented in GNU inetuils v2.6 (https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html). Other tools and libraries are already supporting that envvar and I think it would be nice to aligned as well in that regard.
Supporting the envvar should be as simple as changing:
https://github.com/python/cpython/blob/7c4361564c3881946a5eca677607b4ffec0a566d/Lib/netrc.py#L70
with
file = os.environ.get("NETRC", None) or os.path.join(os.path.expanduser("~"), ".netrc")
Best regards,
Berthin
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-135802
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.