This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author frispete
Recipients frispete, martin.panter, orsenthil
Date 2016-04-20.19:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461179626.31.0.459225987864.issue26804@psf.upfronthosting.co.za>
In-reply-to
Content
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 slightly 
   different in this respect

Yes, mixed case situations are not handled in proxy_bypass_environment,
just lowercase and uppercase, while lowercase is preferred correctly.
I think, that the mixed case situation is pathologic enough and deserves to be ignored here. 

BTW, while looking at the code, I noticed, that most docstrings of the callers of proxy_bypass_environment are wrong: they say, that the proxies dict is returned, but they return the value of proxy_bypass_environment(), not get_proxies().

A follow up patch could do this in order to clean up this mess:
since there's always a call to get_proxies preceding the call to proxy_bypass_environment, we could add a second argument to the latter, passing in the proxy dict, that is thrown away at the moment. Since that carries a 'no' key already, if it exists, using it here would fix this ambiguity. While at it, fix up the affected docstrings.

What do you think about the attached patch and the last paragraph?
History
Date User Action Args
2016-04-20 19:13:46frispetesetrecipients: + frispete, orsenthil, martin.panter
2016-04-20 19:13:46frispetesetmessageid: <1461179626.31.0.459225987864.issue26804@psf.upfronthosting.co.za>
2016-04-20 19:13:46frispetelinkissue26804 messages
2016-04-20 19:13:46frispetecreate