Mock socket.shutdown for compatibility with urllib3 >= 2.3#485
Open
carlsmedstad wants to merge 1 commit intogabrielfalcao:mainfrom
Open
Mock socket.shutdown for compatibility with urllib3 >= 2.3#485carlsmedstad wants to merge 1 commit intogabrielfalcao:mainfrom
carlsmedstad wants to merge 1 commit intogabrielfalcao:mainfrom
Conversation
Version 2.3.0 of urllib3 gets the attribute socket.shutdown which
HTTPretty does no mock. See the following call stack:
/usr/lib/python3.13/site-packages/requests/sessions.py:602: in get
return self.request("GET", url, **kwargs)
/usr/lib/python3.13/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python3.13/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
/usr/lib/python3.13/site-packages/requests/adapters.py:667: in send
resp = conn.urlopen(
/usr/lib/python3.13/site-packages/urllib3/connectionpool.py:787: in urlopen
response = self._make_request(
/usr/lib/python3.13/site-packages/urllib3/connectionpool.py:534: in _make_request
response = conn.getresponse()
/usr/lib/python3.13/site-packages/urllib3/connection.py:513: in getresponse
_shutdown = getattr(self.sock, "shutdown", None)
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Jan 6, 2025
Pull-Request: gabrielfalcao/HTTPretty#485 Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
@gabrielfalcao is there a chance to get HTTPretty compatible with urllib3 >= 2.3? |
|
Fixes #484. |
DavidKorczynski
pushed a commit
to google/oss-fuzz
that referenced
this pull request
Jan 4, 2026
urllib3's `fuzz_requests` has been broken for over a year because it uses HTTPretty which does not support modern urllib3 gabrielfalcao/HTTPretty#485. In this PR, I'm replacing HTTPretty with a simple server in a separate thread, the approach is borrowed from [a httpx fuzzer](https://github.com/google/oss-fuzz/blob/5b14ead1ed0b85d5a21ce30c993a22d71b415b35/projects/httpx/fuzz_api.py). Also, I'm adding myself as the primary contact for urllib3 because I'm its current lead maintainer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version 2.3.0 of urllib3 gets the attribute socket.shutdown which HTTPretty does no mock. See the following call stack: