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

2020-01-04 Thread Frew Schmidt
Change by Frew Schmidt : -- nosy: -Frew Schmidt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-01-04 Thread Tibor Baranya
Change by Tibor Baranya : -- pull_requests: +17249 pull_request: https://github.com/python/cpython/pull/17823 ___ Python tracker ___

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

2020-01-04 Thread Tibor Baranya
Tibor Baranya added the comment: Just for further clarification on how .netrc is supposed to work, I tested some other implementations. Sorry if this comment gets too long, but it seems netrc is not really a standardized solution. In my last comment I referred curl and wget, but of course

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

2019-12-22 Thread Tibor Baranya
Tibor Baranya added the comment: As I understand this issue is there up to 3.8 (and will live into 3.9). As urllib3 supports netrc and requests uses urllib3, this issue can potentially cause a lot of inconsistencies. In case of multile entries (with no user provided), curl and wget takes

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

2018-01-16 Thread Yuri Bochkarev
Change by Yuri Bochkarev : -- nosy: +Yuri.Bochkarev ___ Python tracker ___ ___

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

2016-04-18 Thread Frew Schmidt
Frew Schmidt added the comment: This issue is causing a problem in OfflineIMAP. I wrote a patch that I think is a little simpler than the existing one, including tests and docs, though honestly I don't care one way or another. See attached. Note that the patch is for Python 2.7 but it

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

2014-03-18 Thread Berker Peksag
Berker Peksag added the comment: I've updated the tests to match the changes in issue 12009 and documentation a bit. -- nosy: +berker.peksag versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file34485/issue11416.diff ___ Python

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

2014-03-12 Thread Lucas Hoffmann
Lucas Hoffmann added the comment: What is the status of this issue? On version 3.3 I still can not get more than one entry per host. The stopping issue #12009 seems to be closed. (Sorry, if I violate some etiquette by bumping this, just tell me.) -- nosy: +luc

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

2014-03-12 Thread Éric Araujo
Éric Araujo added the comment: This patch hasn’t been committed. The comment before yours says that it needs to be edited a bit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-06-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: This should not be applied until after the patch for #12009 is applied, at which point the test will need to be adjusted. #12009 completely refactors the netrc test suite. I wonder if the 'hosts' attribute should be deprecated, but

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

2011-06-01 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___ ___

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

2011-05-30 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks good. One remark: instead of using keys() + getitem in Lib/netrc.py:109, you can use this: for host, attrs in self.allhosts.items() -- ___ Python tracker rep...@bugs.python.org

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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. rep = -for

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com added the comment: Patch slightly updated after Eric's comments. -- Added file: http://bugs.python.org/file22193/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416

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

2011-05-30 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’m surprised self.assert_ does not produce a DeprecationWarning (in favor of assertTrue). The tests should use assertEqual(expected, computed) anyway, to let developers see a useful diff when the test fails. Could you change this in the

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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 tracker

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

2011-05-30 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ah, okay. Your patch needs to apply to 2.7 or 3.2, which use assertEqual and not assert_. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com added the comment: Here is a patch against 2.7. -- Added file: http://bugs.python.org/file22195/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416

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

2011-05-30 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file21444/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-05-30 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file22193/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-05-30 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file22194/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-05-30 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great! Could you expand the docstrings and reST documentation to mention the new behavior? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416

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

2011-05-30 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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 rep...@bugs.python.org

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

2011-05-29 Thread Jean-Marc Saffroy
Changes by Jean-Marc Saffroy saff...@gmail.com: Removed file: http://bugs.python.org/file21443/netrc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-05-29 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com added the comment: Ping? A patch is available for review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-05-29 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-03-28 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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

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

2011-03-28 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Can you add your tests to Lib/test/test_netrc.py? -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___

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

2011-03-28 Thread Jean-Marc Saffroy
Jean-Marc Saffroy saff...@gmail.com 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:

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

2011-03-12 Thread saffroy
saffroy saff...@gmail.com 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

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

2011-03-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Would you like to work on a patch? Guidelines are found at http://docs.python.org/devguide -- nosy: +eric.araujo, rhettinger versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6

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

2011-03-06 Thread saffroy
New submission from saffroy saff...@gmail.com: 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

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

2011-03-06 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11416 ___ ___