← mined_httpx_oracle2

httpx_3312

failed WRONG_FIX UNSUBMITTED wrong_fix_unsubmitted(None) · None tool calls · 0 s · encode/httpx

Task input

(not found in data/tasks.jsonl)

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Patch

--- a/httpx/_utils.py
+++ b/httpx/_utils.py
@@ -50,6 +50,8 @@ def normalize_header_value(value: str | bytes, encoding: str | None = None) -> b
     """
     if isinstance(value, bytes):
         return value
+    if not isinstance(value, str):
+        raise TypeError(f"Header value must be str or bytes, not {type(value)}")
     return value.encode(encoding or "ascii")
 
 

Test output

show
ImportError while loading conftest '/private/tmp/swe_work/mined_httpx_oracle2/httpx_3312/b/workspace/tests/conftest.py'.
tests/conftest.py:20: in <module>
    import httpx
httpx/__init__.py:2: in <module>
    from ._api import *
httpx/_api.py:6: in <module>
    from ._client import Client
httpx/_client.py:30: in <module>
    from ._transports.asgi import ASGITransport
httpx/_transports/__init__.py:3: in <module>
    from .default import *
httpx/_transports/default.py:33: in <module>
    import httpcore
E   ModuleNotFoundError: No module named 'httpcore'