Use NETRC environment variable
Abierto
@picnixz ya está trabajando en esto.
Desde el 16/8/2025.
stdlib
type-feature
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.