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

2021-04-29 Thread Jerry Heiselman


New submission from Jerry Heiselman :

The netrc library defaults to looking for the .netrc file in the user's home 
directory. On Windows, this file is conventionally named _netrc. While one 
could pass the correct path to the library, the conventionally correct path 
should be used on all supported platforms.

--
components: Library (Lib)
messages: 392348
nosy: jheiselman
priority: normal
severity: normal
status: open
title: netrc module looks for .netrc even on Windows where the convention is 
_netrc
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue43980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-04-29 Thread Jerry Heiselman


Jerry Heiselman  added the comment:

Created a simple PR to correct this.

--
keywords: +patch
message_count: 1.0 -> 2.0
pull_requests: +24423
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25732

___
Python tracker 
<https://bugs.python.org/issue43980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-04-29 Thread Jerry Heiselman


Jerry Heiselman  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 
<https://bugs.python.org/issue43980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2824] zipfile to handle duplicate files in archive

2021-01-27 Thread Jerry Heiselman


Jerry Heiselman  added the comment:

This just bit us too. I don't feel like a warning is enough. In our case, we 
want to prevent it from happening to begin with so that a developer who isn't 
expecting this doesn't have to know ahead of time to check for a file.

Once a duplicate is in the zip file, it is maintained in the listing of files, 
but deleting one of the entries using Windows explorer results in both entries 
being deleted which can (and has) led to a loss of data. So preventing it from 
happening in the first place seems more prudent. Of course, allow an override 
with a parameter to .write() perhaps.

--
nosy: +jheiselman

___
Python tracker 
<https://bugs.python.org/issue2824>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2824] zipfile to handle duplicate files in archive

2021-01-27 Thread Jerry Heiselman


Jerry Heiselman  added the comment:

Further, some tools like zipgrep, seem to iterate over the toc in the zipfile 
and end up running the grep part once per entry leading to some duplication of 
data returned without it being obvious that there wasn't actually duplicate 
data in the zip archive.

Interestingly, the zipfile module does not expose the duplicate toc entries 
using 'python -m zipfile -l ', so it's hiding the issue itself.

--

___
Python tracker 
<https://bugs.python.org/issue2824>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com