Use NETRC environment variable
Aperta
@picnixz ci sta già lavorando.
Dal 16/8/2025.
stdlib
type-feature
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.