classification
Title: test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'
Type: Stage: resolved
Components: Tests Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: Arfrever, GreenKey, benjamin.peterson, ddvento@ucar.edu, georg.brandl, ned.deily, orsenthil, python-dev
Priority: high Keywords: patch

Created on 2014-03-15 19:41 by ned.deily, last changed 2014-09-30 14:22 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
issue20939_all_27.patch ned.deily, 2014-03-17 09:49 2.7
issue20939_all_31.patch ned.deily, 2014-03-17 09:49 3.1
issue20939_all_32.patch ned.deily, 2014-03-17 09:49 3.2
issue20939_all_33.patch ned.deily, 2014-03-17 09:50 3.3
issue20939_all_3x.patch ned.deily, 2014-03-17 09:50 3.4 and default review
Messages (11)
msg213677 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-03-15 19:41
It looks like another change to the new python.org website is breaking another test:

======================================================================
FAIL: test_geturl (test.test_urllibnet.urlopenNetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_urllibnet.py", line 86, in test_geturl
    self.assertEqual(gotten_url, URL)
AssertionError: 'https://www.python.org/' != 'http://www.python.org/'
- https://www.python.org/
?     -
+ http://www.python.org/
msg213679 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-15 20:19
New changeset 9b02f23bc129 by Ned Deily in branch '2.7':
Issue #20939: Fix test_geturl failure in test_urllibnet due to
http://hg.python.org/cpython/rev/9b02f23bc129

New changeset 030efedd70ca by Ned Deily in branch '3.3':
Issue #20939: Fix test_geturl failure in test_urllibnet due to
http://hg.python.org/cpython/rev/030efedd70ca

New changeset 9358a41b245b by Ned Deily in branch 'default':
Issue #20939: merge from 3.3
http://hg.python.org/cpython/rev/9358a41b245b
msg213680 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-03-15 20:22
The above changes temporarily fix the problem as long as the build include ssl support.  We should probably change all of the tests to use some other domain that does not redirect to https: www.example.com has been suggested.
msg213795 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-17 06:30
New changeset 7f4fba171a40 by Ned Deily in branch '3.4':
Issue #20939: merge from 3.3
http://hg.python.org/cpython/rev/7f4fba171a40
msg213846 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-03-17 09:49
Here are patches to change network use of www.python.org to www.example.com so that the tests should pass even if the interpreter is built without SSL support.  It turns out that there are references to www.python.org in unexpected places (like test_site) so, while I ran all tests and tested the changes both with and without SSL availability, it wouldn't surprise me if I missed a few spots. Also, as requested by Benjamin, I produced patches for and tested on 3.1 and 3.2.  I'm +0 on applying the changes there as there are other, unrelated test failures with those releases on some platforms, but with the patches no one can blame the new python.org website for them.
msg214177 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-03-20 06:13
The suggested patch(s) looks good to me.
msg214937 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-27 06:34
New changeset 426a7046cdb0 by Ned Deily in branch '2.7':
Issue #20939: Use www.example.com instead of www.python.org to avoid test
http://hg.python.org/cpython/rev/426a7046cdb0

New changeset 31e42208eb99 by Ned Deily in branch '3.4':
Issue #20939: Backout test_urllib2.test_issue16464 disables:
http://hg.python.org/cpython/rev/31e42208eb99

New changeset 6134684ba222 by Ned Deily in branch '3.4':
Issue #20939: Use www.example.com instead of www.python.org to avoid test
http://hg.python.org/cpython/rev/6134684ba222

New changeset 67dcb2d19dc4 by Ned Deily in branch 'default':
Issue #20939: merge from 3.4
http://hg.python.org/cpython/rev/67dcb2d19dc4
msg214938 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-27 06:44
New changeset b533cc11d114 by Ned Deily in branch '3.4':
Issue #20939: remove stray character from comment
http://hg.python.org/cpython/rev/b533cc11d114

New changeset ff27cb871b16 by Ned Deily in branch 'default':
Issue #20939: merge from 3.4
http://hg.python.org/cpython/rev/ff27cb871b16
msg214946 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-03-27 09:24
I've pushed the changes to 2.7, 3.4, and default.  That has exposed a new intermittent failure of test_fileno in test.test_urllibnet (see Issue21069).  I'll leave this issue open until that is resolved.  And I'll leave it up to the respective release managers to decide whether they want to backport to their security-fix-only branches.
msg221331 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-06-23 00:55
Since the original problems reported here have been fixed in current branches, I'm closing this issue.
msg227930 - (view) Author: Roundup Robot (python-dev) Date: 2014-09-30 14:22
New changeset 97c329849ef3 by Ned Deily in branch '3.2':
Issue #20939: Use www.example.com instead of www.python.org to avoid test
https://hg.python.org/cpython/rev/97c329849ef3
History
Date User Action Args
2014-09-30 14:22:56python-devsetmessages: + msg227930
2014-06-23 00:55:16ned.deilysetstatus: open -> closed
versions: - Python 3.1, Python 3.2, Python 3.3
messages: + msg221331

resolution: fixed
stage: commit review -> resolved
2014-04-15 19:26:56ddvento@ucar.edusetnosy: + ddvento@ucar.edu
2014-03-27 09:24:22ned.deilysetmessages: + msg214946
stage: patch review -> commit review
2014-03-27 06:44:49python-devsetmessages: + msg214938
2014-03-27 06:34:27python-devsetmessages: + msg214937
2014-03-20 18:45:34Arfreversetnosy: + Arfrever
2014-03-20 06:13:02orsenthilsetnosy: + orsenthil
messages: + msg214177
2014-03-19 17:42:18ned.deilylinkissue20982 superseder
2014-03-17 09:50:31ned.deilysetfiles: + issue20939_all_3x.patch
2014-03-17 09:50:01ned.deilysetfiles: + issue20939_all_33.patch
2014-03-17 09:49:38ned.deilysetfiles: + issue20939_all_32.patch
2014-03-17 09:49:22ned.deilysetfiles: + issue20939_all_31.patch
2014-03-17 09:49:03ned.deilysetfiles: + issue20939_all_27.patch

assignee: ned.deily
versions: + Python 3.1, Python 3.2, Python 3.5
keywords: + patch
nosy: + georg.brandl, benjamin.peterson

messages: + msg213846
stage: needs patch -> patch review
2014-03-17 06:30:41python-devsetmessages: + msg213795
2014-03-16 23:21:25GreenKeysetnosy: + GreenKey
2014-03-15 20:22:39ned.deilysetmessages: + msg213680
2014-03-15 20:19:53python-devsetnosy: + python-dev
messages: + msg213679
2014-03-15 19:41:17ned.deilycreate