[Patches] [ python-Patches-523415 ] Explict proxies for urllib.urlopen()
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 04 Mar 2002 01:33:17 -0800
Patches item #523415, was opened at 2002-02-27 14:53
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=523415&group_id=5470
Category: Library (Lib)
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Andy Gimblett (gimbo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Explict proxies for urllib.urlopen()
Initial Comment:
This patch extends urllib.urlopen() so that
proxies may be specified explicitly. This is
achieved by adding an optional "proxies"
parameter. If this parameter is omitted,
urlopen() acts exactly as before, ie gets
proxy settings from the environment.
This is useful if you want to tell urlopen()
not to use the proxy: just pass an empty
dictionary.
Also included is a patch to the urllib
documentation explaining the new parameter.
Apologies if patch format is not exactly as
required: this is my first submission. All
feedback appreciated. :-)
----------------------------------------------------------------------
>Comment By: Andy Gimblett (gimbo)
Date: 2002-03-04 09:33
Message:
Logged In: YES
user_id=262849
Thanks for feedback re: diffs. Have now found out
about context diffs and attached new version - hope
this is better.
Regarding the patch itself, this arose out of a newbie
question on c.l.py and I was reminded that this was an
issue I'd come across in my early days too. Personally
I'd never picked up the hint that you should use
FancyURLopener directly.
If preferred, I could have a go at patching the docs
to make that clearer?
----------------------------------------------------------------------
Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-03-03 03:34
Message:
Logged In: YES
user_id=250749
BTW, the patch guidelines indicate a strong preference for context diffs with unified diffs a poor second.
----------------------------------------------------------------------
Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-03-03 03:32
Message:
Logged In: YES
user_id=250749
Having just looked at this myself, I can understand where you're coming from, however my reading between the lines of the
docs is that if you care about the proxies then you are supposed to use urllib.FancyURLopener (or urllib.URLopener)
directly. If this is the intent, the docs could be a little clearer about this.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=523415&group_id=5470