You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
disable test_robotparser test that uses an invalid URL #64952
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/orsenthil'closed_at=<Date2014-06-25.10:00:15.762>created_at=<Date2014-02-23.23:25:13.231>labels= ['type-bug']
title='disable test_robotparser test that uses an invalid URL'updated_at=<Date2014-06-29.12:56:21.393>user='https://github.com/larryhastings'
This should be disabled for 3.4, and the test rewritten for 3.5. If we get a patch quickly I would probably cherry-pick it for 3.4 final.
Aside: it is REALLY IRRITATING that we have tests in the standard library that hit external web sites. The standard library regression test suite should *not* rely on network access. Can the rewritten test please spin up a local web server (http.server) and serve a robotx.txt that way?
There are tests where we have good reasons why we hit external servers, and this is why the 'network' resource is not on by default.
That said, this doesn't appear to be a test that has a good reason to hit an external resource, since it should certainly be possible to serve a password protected 'site' locally.
vajrasky commented on Feb 24, 2014
vajraskymannequin
Mannequin
More actions
Okay, here is my attempt to rewrite the test using local web server. I copied and modified the code from Lib/test/test_socketserver.py. The website mueblesmoraleda can not be accessed so I could only guess what the intention of this test was.
I am not sure whether I should remove the duplicate comment and using daemon or not.
Activity
larryhastings commentedon Feb 23, 2014
Lib/tests/test_robotparser.py uses the following url:
http://mueblesmoraleda.com/robots.txt
That file now serves a 404.
This should be disabled for 3.4, and the test rewritten for 3.5. If we get a patch quickly I would probably cherry-pick it for 3.4 final.
Aside: it is REALLY IRRITATING that we have tests in the standard library that hit external web sites. The standard library regression test suite should *not* rely on network access. Can the rewritten test please spin up a local web server (http.server) and serve a robotx.txt that way?
[-]disable test_robotparser[/-][+]disable test_robotparser test that uses an invalid URL[/+]bitdancer commentedon Feb 24, 2014
There are tests where we have good reasons why we hit external servers, and this is why the 'network' resource is not on by default.
That said, this doesn't appear to be a test that has a good reason to hit an external resource, since it should certainly be possible to serve a password protected 'site' locally.
vajrasky commentedon Feb 24, 2014
Okay, here is my attempt to rewrite the test using local web server. I copied and modified the code from Lib/test/test_socketserver.py. The website mueblesmoraleda can not be accessed so I could only guess what the intention of this test was.
I am not sure whether I should remove the duplicate comment and using daemon or not.
python-dev commentedon Jun 25, 2014
New changeset 16d8240ff841 by Senthil Kumaran in branch '3.4':
bpo-20753 - robotparser tests should not rely upon external resource when not required.
http://hg.python.org/cpython/rev/16d8240ff841
New changeset 74cd8abcc302 by Senthil Kumaran in branch 'default':
merge from 3.4
http://hg.python.org/cpython/rev/74cd8abcc302
orsenthil commentedon Jun 25, 2014
The patch was good and captured what was required. I made some minor modifications and committed it in 3.4 and 3.5
Thanks for the patch, Vajrasky Kok.
python-dev commentedon Jun 29, 2014
New changeset 0e08ca451b34 by Berker Peksag in branch '3.4':
Issue bpo-20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.
http://hg.python.org/cpython/rev/0e08ca451b34
New changeset 394e6bda5a70 by Berker Peksag in branch 'default':
Issue bpo-20753: Merge with 3.4.
http://hg.python.org/cpython/rev/394e6bda5a70