← mined_httpx_oracle2

httpx_2999

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/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 ### Fixed
 
 * Allow URLs where username or password contains unescaped '@'. (#2986)
+* Ensure ASGI `raw_path` does not include URL query component. (#2999)
 
 ## 0.25.2 (24th November, 2023)
 
--- a/httpx/_transports/asgi.py
+++ b/httpx/_transports/asgi.py
@@ -103,7 +103,7 @@ class ASGITransport(AsyncBaseTransport):
             "headers": [(k.lower(), v) for (k, v) in request.headers.raw],
             "scheme": request.url.scheme,
             "path": request.url.path,
-            "raw_path": request.url.raw_path,
+            "raw_path": request.url.raw_path.split(b"?")[0],
             "query_string": request.url.query,
             "server": (request.url.host, request.url.port),
             "client": self.client,

Test output

show
ImportError while loading conftest '/private/tmp/swe_work/mined_httpx_oracle2/httpx_2999/b/workspace/tests/conftest.py'.
tests/conftest.py:20: in <module>
    import httpx
httpx/__init__.py:2: in <module>
    from ._api import delete, get, head, options, patch, post, put, request, stream
httpx/_api.py:4: in <module>
    from ._client import Client
httpx/_client.py:30: in <module>
    from ._transports.default import AsyncHTTPTransport, HTTPTransport
httpx/_transports/default.py:30: in <module>
    import httpcore
E   ModuleNotFoundError: No module named 'httpcore'