| Dalba created this task. Dalba added projects: Pywikibot-tests, Pywikibot-core. Herald added subscribers: pywikibot-bugs-list, Aklapper. |
TASK DESCRIPTION
https://travis-ci.org/magul/pywikibot-core/jobs/259066794#L4621
======================================================================ERROR: test_https_cert_error (tests.http_tests.HttpsCertificateTestCase) Test if http.fetch respects disable_ssl_certificate_validation. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "/home/travis/build/magul/pywikibot-core/.eggs/pyOpenSSL-17.2.0-py3.4.egg/OpenSSL/SSL.py", line 1716, in do_handshake self._raise_ssl_error(self._ssl, result) File "/home/travis/build/magul/pywikibot-core/.eggs/pyOpenSSL-17.2.0-py3.4.egg/OpenSSL/SSL.py", line 1456, in _raise_ssl_error _raise_current_error() File "/home/travis/build/magul/pywikibot-core/.eggs/pyOpenSSL-17.2.0-py3.4.egg/OpenSSL/_util.py", line 54, in exception_from_error_queue raise exception_type(errors) OpenSSL.SSL.Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/connection.py", line 326, in connect ssl_context=context) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/requests/adapters.py", line 440, in send timeout=timeout File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='testssl-expire-r2i2.disig.sk', port=443): Max retries exceeded with url: /index.en.html (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/magul/pywikibot-core/tests/http_tests.py", line 141, in test_https_cert_error uri='https://testssl-expire-r2i2.disig.sk/index.en.html') File "/opt/python/3.4.6/lib/python3.4/unittest/case.py", line 1241, in assertRaisesRegex return context.handle('assertRaisesRegex', callable_obj, args, kwargs) File "/opt/python/3.4.6/lib/python3.4/unittest/case.py", line 162, in handle callable_obj(*args, **kwargs) File "/home/travis/build/magul/pywikibot-core/pywikibot/comms/http.py", line 509, in fetch error_handling_callback(request) File "/home/travis/build/magul/pywikibot-core/pywikibot/comms/http.py", line 396, in error_handling_callback raise request.data File "/home/travis/build/magul/pywikibot-core/pywikibot/comms/http.py", line 375, in _http_process verify=not ignore_validation) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/requests/sessions.py", line 502, in request resp = self.send(prep, **send_kwargs) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/requests/sessions.py", line 612, in send r = adapter.send(request, **kwargs) File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/requests/adapters.py", line 504, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='testssl-expire-r2i2.disig.sk', port=443): Max retries exceeded with url: /index.en.html (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",),))
The issue is caused by a bug in requests package. See https://github.com/requests/requests/issues/4209 for more info. It will be fixed in the next version, but until then we can also fix it in pywikibot by avoiding requests-2.18.2.
TASK DETAIL
EMAIL PREFERENCES
To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Masti, Alchimista, Rxy
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
