Issue 7155: urllib2 and python 3 urllib do not document default use of system proxy configuration (original) (raw)

Issue7155

Created on 2009-10-16 23:45 by ned.deily, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue7155-docspatch.diff orsenthil,2009-10-17 03:24
Messages (4)
msg94155 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-10-16 23:45
Several issues with urllib/urllib2 documentation regarding proxy usage: 1. The Macintosh proxy description in section 21.5.1 is out-of-date: "In a Macintosh environment, urlopen() will retrieve proxy information from Internet Config." Suggest something like: "In a Mac OS X environment, urlopen() will retrieve proxy information from the OS X System Configuration framework, which can be managed with the Network system preference panel." 2. In general, urllib/urllib2 on Python 2 and urllib.request on Python 3 are supposed to default to using the OS's proxy configuration on Windows and OS X if not overridden by environment variables or if not supplied as an argument. This is described in python 2 docs section 21.5.1. urllib2 has the same default behavior since under the covers it uses urllib's proxy functions. But that behavior is not documented in 21.6 for urllib2 in the various spots where proxy is mentioned. 3. Likewise, the corresponding sections of the Python 3 documentation for urllib.request (section 20.5) do not mention the default system proxy configuration behavior and should since that code was carried over from Python 2 (although, at the moment, the OS X code is broken - see Issue7154).
msg94161 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-17 03:24
I have attached a docs patch against the trunk. Please provide your review comments. If its okay, I can commit it and have the information (urllib2.rst) for the Python 3k too.
msg94162 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-10-17 04:17
One comment: + :envvar:`_proxy`. In a Windows environment, if no proxy + environment variables are set, proxy settings are obtained from the + registry's Internet Settings section. In a Mac OS X environment, proxy + information is retrieved from from the OS X System Configuration Framework. The "if no proxy environment variables are set" part applies to OS X as well so perhaps: If no proxy environment variables are set, in a Windows environment ... and in a Mac OS X environment ... . Otherwise looks good. Thanks!
msg94197 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-18 02:02
Thanks for the comments. Fixed and committed the changes trunk - 75478. and merged into release26-maint - 75479. py3k - r75476 release31-maint - r75477
History
Date User Action Args
2022-04-11 14:56:54 admin set github: 51404
2009-10-18 02:02:10 orsenthil set status: open -> closedresolution: accepted -> fixedmessages: +
2009-10-17 04:17:28 ned.deily set messages: +
2009-10-17 03:24:17 orsenthil set files: + issue7155-docspatch.diffassignee: georg.brandl -> orsenthilkeywords: + patchnosy: + orsenthilmessages: + resolution: accepted
2009-10-16 23:45:26 ned.deily create