Issue 16702: Force urllib2_localnet test not to use http proxies (original) (raw)

Issue16702

Created on 2012-12-17 17:40 by jeffknupp, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_proxy.patch jeffknupp,2012-12-17 17:40 review
Issue16702.patch orsenthil,2012-12-26 09:01
Messages (4)
msg177654 - (view) Author: Jeff Knupp (jeffknupp) * Date: 2012-12-17 17:40
test_urllib2_localnet is concerned with testing connections only using 'localhost' or '127.0.0.1' hosts. If a user has the "http_proxy" environment variable set, these test will likely fail as the proxy won't have any idea where to send a request for 'localhost'. Patch makes urllib.request.urlopen ignore proxies set in the environment. Note that this only works for http proxies. https proxies are trickier and require more work.
msg178191 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-12-26 09:01
Jeff, Thanks for raising this issue. The aspect of skipping localhost for proxies in urllib2_localnet tests can be handled in a different way as well, namely by setting the environment varible NO_PROXY to "*". By this the skip_proxies in urllib2 returns True and proxies are skipped for both HTTP and HTTPS.
msg178195 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-26 09:47
New changeset 6c186caa6285 by Senthil Kumaran in branch '2.7': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/6c186caa6285 New changeset 0eccfb237364 by Senthil Kumaran in branch '3.2': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/0eccfb237364 New changeset 8a524faeb7ae by Senthil Kumaran in branch '3.3': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/8a524faeb7ae New changeset 43b19d9f9af4 by Senthil Kumaran in branch 'default': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/43b19d9f9af4
msg178196 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-12-26 09:48
Fixed in all branches of CPython. Thanks.
History
Date User Action Args
2022-04-11 14:57:39 admin set github: 60906
2012-12-26 09:48:16 orsenthil set status: open -> closedmessages: + assignee: orsenthilresolution: fixedstage: resolved
2012-12-26 09:47:27 python-dev set nosy: + python-devmessages: +
2012-12-26 09:01:08 orsenthil set files: + Issue16702.patchnosy: + orsenthilmessages: +
2012-12-17 17:40:12 jeffknupp create