[issue43980] netrc module looks for .netrc even on Windows where the convention is _netrc

Jerry Heiselman report at bugs.python.org
Thu Apr 29 17:42:22 EDT 2021


Jerry Heiselman <jerry at heiselman.com> added the comment:

The netrc file has no formal standard, but the following supports the claim of its conventional naming.

Excerpt from https://curl.se/docs/manpage.html#-n:
"Makes curl scan the .netrc (_netrc on Windows) file in the user's home directory for login name and password."

Excerpt from https://www.labkey.org/Documentation/wiki-page.view?name=netrc:
"On a Mac, UNIX, or Linux system the netrc file should be named .netrc (dot netrc) and on Windows it should be named _netrc (underscore netrc)."

And a 9+ year old stack overflow post indicating that the use of _netrc on Windows is quite well established and has been for some time. I know it's not authoritative, but it does establish the length of history for this.
https://stackoverflow.com/questions/6031214/git-how-to-use-netrc-file-on-windows-to-save-user-and-password

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43980>
_______________________________________


More information about the Python-bugs-list mailing list