gabrielfalcao / HTTPretty

Intercept HTTP requests at the Python socket level. Fakes the whole socket module

Home Page:https://httpretty.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requests upgrade to v2.29.0 causes the test case test_httpretty_should_allow_registering_regexes_with_streaming_responses to fail

liyanan1001 opened this issue · comments

======================================================================
[ 37s] ERROR: tests.functional.test_requests.test_httpretty_should_allow_registering_regexes_with_streaming_responses
[ 37s] HTTPretty should allow registering regexes with streaming responses
[ 37s] ----------------------------------------------------------------------
[ 37s] Traceback (most recent call last):
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
[ 37s] httplib_response = self._make_request(
[ 37s] ^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 466, in _make_request
[ 37s] six.raise_from(e, None)
[ 37s] File "", line 3, in raise_from
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 461, in _make_request
[ 37s] httplib_response = conn.getresponse()
[ 37s] ^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 1378, in getresponse
[ 37s] response.begin()
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 318, in begin
[ 37s] version, status, reason = self._read_status()
[ 37s] ^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 287, in _read_status
[ 37s] raise RemoteDisconnected("Remote end closed connection without"
[ 37s] http.client.RemoteDisconnected: Remote end closed connection without response
[ 37s]
[ 37s] During handling of the above exception, another exception occurred:
[ 37s]
[ 37s] Traceback (most recent call last):
[ 37s] File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
[ 37s] resp = conn.urlopen(
[ 37s] ^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
[ 37s] retries = retries.increment(
[ 37s] ^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
[ 37s] raise six.reraise(type(error), error, _stacktrace)
[ 37s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/packages/six.py", line 718, in reraise
[ 37s] raise value.with_traceback(tb)
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
[ 37s] httplib_response = self._make_request(
[ 37s] ^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 466, in _make_request
[ 37s] six.raise_from(e, None)
[ 37s] File "", line 3, in raise_from
[ 37s] File "/usr/lib/python3.11/site-packages/urllib3/connectionpool.py", line 461, in _make_request
[ 37s] httplib_response = conn.getresponse()
[ 37s] ^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 1378, in getresponse
[ 37s] response.begin()
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 318, in begin
[ 37s] version, status, reason = self._read_status()
[ 37s] ^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib64/python3.11/http/client.py", line 287, in _read_status
[ 37s] raise RemoteDisconnected("Remote end closed connection without"
[ 37s] urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
[ 37s]
[ 37s] During handling of the above exception, another exception occurred:
[ 37s]
[ 37s] Traceback (most recent call last):
[ 37s] File "/home/abuild/rpmbuild/BUILD/httpretty-1.1.4/httpretty/core.py", line 2075, in wrapper
[ 37s] return test(*args, **kw)
[ 37s] ^^^^^^^^^^^^^^^^^
[ 37s] File "/home/abuild/rpmbuild/BUILD/httpretty-1.1.4/tests/functional/test_requests.py", line 694, in test_httpretty_should_allow_registering_regexes_with_streaming_responses
[ 37s] response = requests.post(
[ 37s] ^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/requests/api.py", line 115, in post
[ 37s] return request("post", url, data=data, json=json, **kwargs)
[ 37s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/requests/api.py", line 59, in request
[ 37s] return session.request(method=method, url=url, **kwargs)
[ 37s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
[ 37s] resp = self.send(prep, **send_kwargs)
[ 37s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
[ 37s] r = adapter.send(request, **kwargs)
[ 37s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 37s] File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 501, in send
[ 37s] raise ConnectionError(err, request=request)
[ 37s] requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
[ 37s]

psf/requests#3844
psf/requests@26bea1e