[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-06-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: Unfortunately no. 3.4 is only in security fixes mode and this doesn't qualify as a security fix. Usually the bug fixes and feature additions are incentives for developers to upgrade their python codebase. -- ___

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-06-14 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: In a couple of systems, I have to stick with 3.4. Is there a chance to have this patch in 3.4 as well, if a new release 3.4 is made? -- ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in all versions of Python. Thank you for your contribution, Hans-Peter Jansen. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset c502deb19cb0 by Senthil Kumaran in branch '2.7': backport fix for Issue #26804. https://hg.python.org/cpython/rev/c502deb19cb0 -- ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49b975122022 by Senthil Kumaran in branch '3.5': Issue #26804: urllib.request will prefer lower_case proxy environment variables https://hg.python.org/cpython/rev/49b975122022 New changeset 316593f5bf73 by Senthil Kumaran in branch 'default': merge

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Martin Panter
Martin Panter added the comment: V7 looks good to me -- stage: patch review -> commit review ___ Python tracker ___

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v7: - reorder test code in order to improve edibility -- Added file: http://bugs.python.org/file42586/python-urllib-prefer-lowercase-proxies-v7.diff ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Martin Panter
Martin Panter added the comment: Yes that was my rambling way of saying that I had checked to see if they were in the right place, and reporting that it was all okay :) New patch seems okay to me. -- ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: > In Python 2, it looks like the proxy_bypass_etc() functions are defined > in urllib and imported into urllib2, so it makes sense to include the > tests in test_urllib rather than test_urllib2. The tests are in test_urllib. test_urllib2 is testing proxy

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: * blatant error fixed * one test case added -- Added file: http://bugs.python.org/file42582/python-urllib-prefer-lowercase-proxies-v6.diff ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Martin Panter
Martin Panter added the comment: I found two bugs; see the comments. In Python 2, it looks like the proxy_bypass_etc() functions are defined in urllib and imported into urllib2, so it makes sense to include the tests in test_urllib rather than test_urllib2. Technically I think

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v5: don't require the proxies argument in proxy_bypass_environment() -- Added file: http://bugs.python.org/file42565/python-urllib-prefer-lowercase-proxies-v5.diff ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here's the finalized version of this patch, including unit tests. -- Added file: http://bugs.python.org/file42552/python-urllib-prefer-lowercase-proxies-v4.diff ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here we go: v3 fixes following issues: * prefer lowercase proxy environment settings, if multiple (disagreeing) settings are specified with differing case schemes (e.g. HTTP_PROXY vs. http_proxy) * an empty proxy variable value resets the related setting

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Martin Panter
Martin Panter added the comment: The second patch looks reasonable (I left one minor grammar comment). About getproxies_environment(), I meant that if you set no_proxy="", it may be ignored if NO_PROXY=. . . is also set. E.g. if you already have these set: http_proxy=http://proxy

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, please find a new patch attached, that incorporates your suggestions. * added a comment to get_proxies doc in urllib.rst * documented and fixed the mixed case scheme * added a note to proxy_bypass_environment, that behaves

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, thanks for the valuable comments. Will incorporate your suggestions later today. Yes, Martin, it's a bug, and should be fixed for 2.7 and 3.5 as well, but I was unsure, if I get some feedback at all... Hence, this is a very nice

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Martin Panter
Martin Panter added the comment: It’s not just documentation, it is a real bug. If you run http_proxy="" HTTP_PROXY=http://bad-proxy python . . . the empty value of lowercase “http_proxy” should have priority over the other one. At the moment it depends on the order of os.environ.items(),

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Hans-Peter, I agree with Martin's comments and suggestion. If I understand the suggestion correctly, the only change will be a documentation change. Isn't it? Because getproxies_environment() in it's current form already fetches the lower_case proxy

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Martin Panter
Martin Panter added the comment: I think this should be applied as a bug fix to 2.7 and 3.5 as well. What do you think? Lowercase is the normal way to use these variables. I left some comments on the code review. A similar bug seems to exist for the “no_proxy” variable. Also, it would be

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) -Extension Modules nosy: +orsenthil stage: -> patch review ___ Python tracker

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen : -- versions: +Python 3.6 -Python 3.5 ___ Python tracker ___

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: During programming a function, that replaces a wget call, I noticed, that something is wrong with urllibs proxy handling. I usually use the scheme "http_proxy= wget -N -nd URL" when I need to bypass the proxy. Hence I was pretty confused, that this