← mined_oracle

httpx_3376

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/_urls.py
+++ b/httpx/_urls.py
@@ -12,20 +12,6 @@ from ._utils import primitive_value_to_str
 __all__ = ["URL", "QueryParams"]
 
 
-# To urlencode query parameters, we use the whatwg query percent-encode set
-# and additionally escape U+0025 (%), U+0026 (&), U+002B (+) and U+003D (=).
-
-# https://url.spec.whatwg.org/#percent-encoded-bytes
-
-URLENCODE_SAFE = "".join(
-    [
-        chr(i)
-        for i in range(0x20, 0x7F)
-        if i not in (0x20, 0x22, 0x23, 0x25, 0x26, 0x2B, 0x3C, 0x3D, 0x3E)
-    ]
-)
-
-
 class URL:
     """
     url = httpx.URL("HTTPS://jo%40email.com:a%20secret@müller.de:1234/pa%20th?search=ab#anchorlink")
@@ -619,7 +605,7 @@ class QueryParams(typing.Mapping[str, str]):
         return sorted(self.multi_items()) == sorted(other.multi_items())
 
     def __str__(self) -> str:
-        return urlencode(self.multi_items(), safe=URLENCODE_SAFE)
+        return urlencode(self.multi_items())
 
     def __repr__(self) -> str:
         class_name = self.__class__.__name__

Test output

show
ImportError while loading conftest '/private/tmp/swe_work/mined_oracle/httpx_3376/b/workspace/tests/conftest.py'.
tests/conftest.py:9: in <module>
    import trustme
E   ModuleNotFoundError: No module named 'trustme'