failed WRONG_FIX UNSUBMITTED wrong_fix_unsubmitted(None) · None tool calls · 0 s · encode/httpx
(not found in data/tasks.jsonl)
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
--- a/httpx/_decoders.py
+++ b/httpx/_decoders.py
@@ -212,7 +212,7 @@ class TextChunker:
def decode(self, content: str) -> typing.List[str]:
if self._chunk_size is None:
- return [content]
+ return [content] if content else []
self._buffer.write(content)
if self._buffer.tell() >= self._chunk_size:
@@ -280,7 +280,9 @@ class LineDecoder:
text = text[:-1]
if not text:
- return []
+ # NOTE: the edge case input of empty text doesn't occur in practice,
+ # because other httpx internals filter out this value
+ return [] # pragma: no cover
trailing_newline = text[-1] in NEWLINE_CHARS
lines = text.splitlines()
--- a/httpx/_models.py
+++ b/httpx/_models.py
@@ -853,7 +853,7 @@ class Response:
yield chunk
text_content = decoder.flush()
for chunk in chunker.decode(text_content):
- yield chunk
+ yield chunk # pragma: no cover
for chunk in chunker.flush():
yield chunk
@@ -957,7 +957,7 @@ class Response:
yield chunk
text_content = decoder.flush()
for chunk in chunker.decode(text_content):
- yield chunk
+ yield chunk # pragma: no cover
for chunk in chunker.flush():
yield chunk
ImportError while loading conftest '/private/tmp/swe_work/mined_httpx_oracle2/httpx_2998/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'