classification
Title: Force urllib2_localnet test not to use http proxies
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: jeffknupp, orsenthil, python-dev
Priority: normal Keywords: patch

Created on 2012-12-17 17:40 by jeffknupp, last changed 2012-12-26 09:48 by orsenthil. 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) 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
2012-12-26 09:48:16orsenthilsetstatus: open -> closed
messages: + msg178196

assignee: orsenthil
resolution: fixed
stage: resolved
2012-12-26 09:47:27python-devsetnosy: + python-dev
messages: + msg178195
2012-12-26 09:01:08orsenthilsetfiles: + Issue16702.patch
nosy: + orsenthil
messages: + msg178191

2012-12-17 17:40:12jeffknuppcreate