Page MenuHomePhabricator

TestHttpStatus.test_follow_redirects of http_tests often fails with ConnectionError
Closed, ResolvedPublicBUG REPORT

Description

17:48:59 ERROR: test_follow_redirects (tests.http_tests.TestHttpStatus)
17:48:59 Test follow 301 redirects correctly.
17:48:59 ----------------------------------------------------------------------
17:48:59 Traceback (most recent call last):
17:48:59   File "/src/tests/http_tests.py", line 163, in test_follow_redirects
17:48:59     r = http.fetch(self.httpbin
17:48:59   File "/src/pywikibot/comms/http.py", line 516, in fetch
17:48:59     callback(response)
17:48:59   File "/src/pywikibot/comms/http.py", line 381, in error_handling_callback
17:48:59     raise ConnectionError(response)
17:48:59 ConnectionError: HTTPConnectionPool(host='httpbin.orgredirect-to', port=80): Max retries exceeded with url: /?url=https://www.wikidata.org (Caused by NameResolutionError("HTTPConnection(host='httpbin.orgredirect-to', port=80): Failed to resolve 'httpbin.orgredirect-to' ([Errno -2] Name or service not known)"))

Details

Event Timeline

Xqt renamed this task from TestHttpStatus.test_follow_redirects of TestHttpStatus often fails with ConnectionError to TestHttpStatus.test_follow_redirects of http_tests often fails with ConnectionError.Jul 24 2026, 4:04 PM
Xqt triaged this task as Medium priority.

Change #1315961 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Fix URL of TestHttpStatus.test_follow_redirects

https://gerrit.wikimedia.org/r/1315961

Xqt changed the task status from Open to In Progress.Jul 24 2026, 4:14 PM
Xqt claimed this task.
Xqt moved this task from Backlog to CI test failures on the Pywikibot-tests board.

Change #1315961 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Fix URL of TestHttpStatus.test_follow_redirects

https://gerrit.wikimedia.org/r/1315961