Jean-Marc Saffroy added the comment:
Additional patch for docstrings and documentation. Applies on top of previous
patch.
--
Added file: http://bugs.python.org/file22204/netrc-doc.patch
___
Python tracker
<http://bugs.python.org/issue11
Jean-Marc Saffroy added the comment:
Here is a patch against 2.7.
--
Added file: http://bugs.python.org/file22195/netrc.patch
___
Python tracker
<http://bugs.python.org/issue11
Jean-Marc Saffroy added the comment:
Eric: yes I can look into the asserts, but note I generated and tested my patch
from a checkout of 2.6 (see my first report), so maybe that's why I didn't see
any warning.
--
___
Python trac
Jean-Marc Saffroy added the comment:
Patch formatting changed to be more review-friendly (looks like MQ-style patch
isn't?), otherwise same as 2011-05-30 16:14.
--
Added file: http://bugs.python.org/file22194/netrc.patch
___
Python tracker
Jean-Marc Saffroy added the comment:
Patch slightly updated after Eric's comments.
--
Added file: http://bugs.python.org/file22193/netrc.patch
___
Python tracker
<http://bugs.python.org/is
Jean-Marc Saffroy added the comment:
You are suggesting something like this, I suppose?
--- a/Lib/netrc.py
+++ b/Lib/netrc.py
@@ -105,8 +105,8 @@ class netrc:
def __repr__(self):
"""Dump the class data in the format of a .netrc file."""
Jean-Marc Saffroy added the comment:
Ping? A patch is available for review.
--
___
Python tracker
<http://bugs.python.org/issue11416>
___
___
Python-bugs-list m
Changes by Jean-Marc Saffroy :
Removed file: http://bugs.python.org/file21443/netrc.patch
___
Python tracker
<http://bugs.python.org/issue11416>
___
___
Python-bugs-list m
Jean-Marc Saffroy added the comment:
Good that you mentioned the official tests, they let me see that netrc.hosts is
actually part of the API, and my first patch broke it.
Here is an updated patch, with extra tests.
--
Added file: http://bugs.python.org/file21444/netrc.patch
Jean-Marc Saffroy added the comment:
So I finally cooked a little patch for netrc.py in python 2.6.
The patch extends netrc.authenticators() with an extra parameter to select a
login name, but otherwise the behaviour remains the same (still returns the
last entry for a given host).
Lightly
saffroy added the comment:
I could spend some time on a small patch.
Here are the changes I would consider:
- netrc.authenticators() could return the first entry matching a given host
(now it returns the last)
- it could also accept an extra parameter (with default=None), a login to
select
New submission from saffroy :
I have a netrc file with two entries for the same host. The netrc module only
returns the last entry.
$ cat > .netrc
machine host.com
login foo
password foo
machine host.com
login bar
password bar
$ python -c 'import netr
12 matches
Mail list logo