[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ronald Oussoren ronaldousso...@mac.com added the comment: Fixed in r75483 (2.6), 75482 (trunk) -- resolution: accepted - fixed stage: - committed/rejected type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Changes by Ronald Oussoren ronaldousso...@mac.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ned Deily n...@acm.org added the comment: Verified that test_urllib2 no longer fails with 2.6.4rc2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Barry A. Warsaw ba...@python.org added the comment: Ronald, please apply asap. This is the last thing I'm waiting on before I tag 2.6.4rc2. -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ronald Oussoren ronaldousso...@mac.com added the comment: I've attached a patch for the trunk that fixes the issue and passes test_urllib.py on the trunk. What I haven't done yet is write some unittests that actually test different proxy configurations, that would require changing the SystemConfigation proxy settings (that is, the settings you set using the Network panel in System Preferences). Doing that is non-trivial, especially because running the tests should affect the rest of the system. It should be possible though to temporarily change the settings for the currently running process. -- Added file: http://bugs.python.org/file15145/urllib-hostIP-error.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ned Deily n...@acm.org added the comment: I'll test it on 2.6 later today. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Barry A. Warsaw ba...@python.org added the comment: Agreed this is a release blocker for 2.6.4rc2. I plan on tagging the release some time Saturday, probably around 1600 UTC. Do you think you can add a test and apply the patch by then? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Changes by jweber ja...@jacobweber.com: -- nosy: +jweber ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ned Deily n...@acm.org added the comment: The supplied patch looks good and applies cleanly to 2.6 as well. I built and tested it with both 2.6 and trunk and the tests now all pass as expected. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ned Deily n...@acm.org added the comment: BTW, I did test manually changing the system proxy configuration via the Network preference panel and verified that urllib/urllib2 used the default proxy settings. I suppose it would be possible to set up some tests using the OS X scutil command but it would be tricky to do 100% safely, I'd think. In any case, it's clear that the urllib2 tests do provide some test coverage in this area, witness this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
New submission from Ned Deily n...@acm.org: Possible Release Blocker A number of proxy test cases in test_urllib2 are now failing with: ERROR: test_proxy (test.test_urllib2.HandlerTests) -- Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/te st_urllib2.py, line 940, in test_proxy r = o.open(req) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2 .py, line 389, in open response = self._open(req, data) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2 .py, line 407, in _open '_open', req) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2 .py, line 367, in _call_chain result = func(*args) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2 .py, line 696, in lambda meth(r, proxy, type)) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2 .py, line 705, in proxy_open if req.host and proxy_bypass(req.host): File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib. py, line 1398, in proxy_bypass return proxy_bypass_macosx_sysconf(host) File /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib. py, line 1367, in proxy_bypass_macosx_sysconf if hostIP is None: UnboundLocalError: local variable 'hostIP' referenced before assignment The root cause is the problem identified in Issue7044. This is now showing up in test_urllib2 because of the changes in urllib2 introduced by Issue6894 which was checked into the release-26maint branch during the window between the release of 2.6.3 and the freezing for 2.6.4. -- assignee: ronaldoussoren components: Library (Lib), Macintosh messages: 94124 nosy: barry, ned.deily, orsenthil, ronaldoussoren severity: normal status: open title: 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Ronald Oussoren ronaldousso...@mac.com added the comment: Barry: this should be a release blocker, I introduced the problem around or after 2.6.3 :-( When do you cut rc2? I probably won't be able to provide a patch myself until Saturday afternoon (CEST). -- priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError
Senthil Kumaran orsent...@gmail.com added the comment: In the Issue7044, the reporter has identified the root cause and possible fix too. In Python 2.6.3 on Mac OS 10.6.1, there is a bug in lib/python2.6/urllib.py, line 1367. The variable hostIP is used before it's defined. You can fix it by adding hostIP = None at around line 1355. That change might fix both the issues. I don't have a OS X to verify the fix tough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com