Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  `test_server_not_found` in `http_tests.TestHttpStatus` may fail because 
`requests.exceptions.ConnectionError` is raised. The test should skip in this 
case.
  
  The reason is that requests.exceptions.ConnectionError is not derived from 
the standard library's ConnectionError. Maybe this behaviour has changed since 
using the WMCS SOCKS service.
  
    ======================================================================
    ERROR: test_server_not_found 
(tests.http_tests.TestHttpStatus.test_server_not_found)
    Test server not found exception.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "D:\a\pywikibot\pywikibot\tests\http_tests.py", line 142, in 
test_server_not_found
        http.fetch('http://ru-sib.wikipedia.org/w/api.php',
        ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                   default_error_handling=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\a\pywikibot\pywikibot\pywikibot\comms\http.py", line 516, in 
fetch
        callback(response)
        ~~~~~~~~^^^^^^^^^^
      File "D:\a\pywikibot\pywikibot\pywikibot\comms\http.py", line 396, in 
error_handling_callback
        raise response from None
      File "D:\a\pywikibot\pywikibot\pywikibot\comms\http.py", line 506, in 
fetch
        response = session.request(method, uri,
                                   headers=headers, auth=auth, timeout=timeout,
                                   **kwargs)
      File 
"C:\hostedtoolcache\windows\Python\3.13.15\x64\Lib\site-packages\requests\sessions.py",
 line 651, in request
        resp = self.send(prep, **send_kwargs)
      File 
"C:\hostedtoolcache\windows\Python\3.13.15\x64\Lib\site-packages\requests\sessions.py",
 line 784, in send
        r = adapter.send(request, **kwargs)
      File 
"C:\hostedtoolcache\windows\Python\3.13.15\x64\Lib\site-packages\requests\adapters.py",
 line 729, in send
        raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: 
SOCKSHTTPConnectionPool(host='ru-sib.wikipedia.org', port=80): Max retries 
exceeded with url: /w/api.php (Caused by 
NewConnectionError("SOCKSConnection(host='ru-sib.wikipedia.org', port=80): 
Failed to establish a new connection: Connection closed unexpectedly"))

TASK DETAIL
  https://phabricator.wikimedia.org/T435535

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to