[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-30 Thread Jean-Marc Saffroy
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."""

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-29 Thread Jean-Marc Saffroy
Jean-Marc Saffroy added the comment: Ping? A patch is available for review. -- ___ Python tracker <http://bugs.python.org/issue11416> ___ ___ Python-bugs-list m

[issue11416] netrc module does not handle multiple entries for a single host

2011-05-29 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-03-28 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-03-28 Thread Jean-Marc Saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-03-12 Thread saffroy
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

[issue11416] netrc module does not handle multiple entries for a single host

2011-03-06 Thread saffroy
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