bialy-dataset / coderank /dumps /project_search-model-httpx.jsonl
paintedwolf-ai's picture
Release open1-b5-e4-bialy
24918f7 verified
Raw History Blame Contribute Delete
442 kB
{"site":"project_search","repo":"httpx","task":"Verificar que un cliente asíncrono que se cierra explícitamente (aclose) no permita realizar nuevas solicitudes y que intentar reabrirlo genere una excepción Runtime Error.","query":"closed client error","file":"tests/client/test_async_client.py","symbol":"test_client_closed_state_using_implicit_open","line":260,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 460: * Closed clients now raise a runtime error if attempting to send a request. (Pull #1346)","file":"CHANGELOG.md","line":460,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 901: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":901,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1616: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":1616,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Adicione lógica para ignorar o cabeçalho Transfer-Encoding quando o Content-Length for definido explicitamente. Também inclua a adição automática dos cabeçalhos Host e Content-Length quando necessário.","query":"prepare default headers","file":"httpx/_models.py","symbol":"_prepare","line":441,"lang":"pt","candidates":[{"text":"File: httpx/_models.py\nLine 441: def _prepare(self, default_headers: dict[str, str]) -> None:","file":"httpx/_models.py","line":441,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 571: def _prepare(self, default_headers: dict[str, str]) -> None:","file":"httpx/_models.py","line":571,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"合并客户端cookie和请求cookie","query":"merge cookies","file":"httpx/_client.py","symbol":"_merge_cookies","line":413,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 612: * `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`","file":"CHANGELOG.md","line":612,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 368: cookies = self._merge_cookies(cookies)","file":"httpx/_client.py","line":368,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_client.py\nLine 413: def _merge_cookies(self, cookies: CookieTypes | None = None) -> CookieTypes | None:","file":"httpx/_client.py","line":413,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 415: Merge a cookies argument together with any cookies on the client,","file":"httpx/_client.py","line":415,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 419: merged_cookies = Cookies(self.cookies)","file":"httpx/_client.py","line":419,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 420: merged_cookies.update(cookies)","file":"httpx/_client.py","line":420,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 421: return merged_cookies","file":"httpx/_client.py","line":421,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Ich arbeite gerade an der Erweiterung der asynchronen Client-Logik. Wo ist die abstrakte Basisklasse definiert, die das Interface für die asynchrone Anfrageverarbeitung und das Context-Management vorgibt?","query":"async request base","file":"httpx/_transports/base.py","symbol":"AsyncBaseTransport","line":65,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 834: * Async codebases should always use a client instance to make requests, instead of the top-level API.","file":"CHANGELOG.md","line":834,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 185: If you _do_ need to perform I/O other than HTTP requests, such as accessing a disk-based cache, or you need to use concurrency primitives, such as locks, then you should override `.sync_auth_flow()` and `.async_auth_flow()` (instead of `.auth_flow()`). The…","file":"docs/advanced/authentication.md","line":185,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"当输入的字符串包含不可打印的 ASCII 控制字符(如换行符或制表符)时,程序应该抛出包含具体字符及其所在位置的异常,并对超长字符串进行长度限制,请确认处理这类非法字符逻辑的地方。","query":"invalid non-printable ASCII","file":"httpx/_urlparse.py","symbol":"urlparse","line":213,"lang":"zh","candidates":[{"text":"File: httpx/_urlparse.py\nLine 227: f\"Invalid non-printable ASCII character in URL, {char!r} at position {idx}.\"","file":"httpx/_urlparse.py","line":227,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urlparse.py\nLine 279: f\"Invalid non-printable ASCII character in URL {key} component, \"","file":"httpx/_urlparse.py","line":279,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 367: \"Invalid non-printable ASCII character in URL, '\\\\n' at position 24.\"","file":"tests/models/test_url.py","line":367,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 375: \"Invalid non-printable ASCII character in URL path component, \"","file":"tests/models/test_url.py","line":375,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"クライアント送信時のリクエストヘッダーが正しくデコードされているか検証したいです。リクエストに含まれる生のヘッダー情報を取得して、そのままレスポンスとして返すユーティリティはどこにありますか?","query":"echo raw headers","file":"tests/client/test_client.py","symbol":"echo_raw_headers","line":336,"lang":"ja","candidates":[{"text":"File: tests/client/test_client.py\nLine 336: def echo_raw_headers(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_client.py","line":336,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_client.py\nLine 352: transport=httpx.MockTransport(echo_raw_headers), headers=headers","file":"tests/client/test_client.py","line":352,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"这个负责将异步字节流和响应关联起来的初始化方法是在哪里定义的?","query":"AsyncByteStream response","file":"httpx/_client.py","symbol":"__init__","line":168,"lang":"zh","candidates":[{"text":"File: httpx/_client.py\nLine 169: self, stream: AsyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":169,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_client.py\nLine 1732: assert isinstance(response.stream, AsyncByteStream)","file":"httpx/_client.py","line":1732,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 55: class ASGIResponseStream(AsyncByteStream):","file":"httpx/_transports/asgi.py","line":55,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 265: class AsyncResponseStream(AsyncByteStream):","file":"httpx/_transports/default.py","line":265,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Wie konvertiere ich einen String in eine URL-kodierte Zeichenfolge mit Prozentzeichen?","query":"percent encoding","file":"httpx/_urlparse.py","symbol":"PERCENT","line":478,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 140: * Fix optional percent-encoding behaviour. (#2671)","file":"CHANGELOG.md","line":140,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 484: Use percent-encoding to quote a string.","file":"httpx/_urlparse.py","line":484,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_urlparse.py\nLine 499: Use percent-encoding to quote a string, omitting existing '%xx' escape sequences.","file":"httpx/_urlparse.py","line":499,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 70: # Tests for percent encoding across path, query, and fragment...","file":"tests/models/test_url.py","line":70,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 281: # Tests for query parameter percent encoding.","file":"tests/models/test_url.py","line":281,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 283: # Percent-encoding in `params={}` should match browser form behavior.","file":"tests/models/test_url.py","line":283,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 315: # Tests for query parameter percent encoding.","file":"tests/models/test_url.py","line":315,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 317: # Percent-encoding in `url={}` should match browser URL bar behavior.","file":"tests/models/test_url.py","line":317,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 320: def test_query_with_existing_percent_encoding():","file":"tests/models/test_url.py","line":320,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 326: def test_query_requiring_percent_encoding():","file":"tests/models/test_url.py","line":326,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 327: # Characters that require percent encoding should be encoded.","file":"tests/models/test_url.py","line":327,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 332: def test_query_with_mixed_percent_encoding():","file":"tests/models/test_url.py","line":332,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 334: # characters that require percent encoding should be encoded,","file":"tests/models/test_url.py","line":334,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_whatwg.py\nLine 26: # WHATWG cases where are not using percent-encoding for the space character.","file":"tests/models/test_whatwg.py","line":26,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 4735: \"# unknown scheme with bogus percent-encoding\",","file":"tests/models/whatwg.json","line":4735,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 5382: \"# Hosts and percent-encoding\",","file":"tests/models/whatwg.json","line":5382,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 5566: \"# Percent encoding of fragments\",","file":"tests/models/whatwg.json","line":5566,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"空のバイト列が含まれるストリームの挙動を確認したい","query":"iter_bytes empty","file":"tests/models/test_responses.py","symbol":"test_iter_bytes_doesnt_return_empty_chunks","line":559,"lang":"ja","candidates":[{"text":"File: tests/models/test_responses.py\nLine 553: def test_iter_bytes_with_empty_response():","file":"tests/models/test_responses.py","line":553,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_responses.py\nLine 559: def test_iter_bytes_doesnt_return_empty_chunks():","file":"tests/models/test_responses.py","line":559,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"프록시 설정을 기반으로 전송 계층을 생성하는 로직 찾아줘","query":"proxy transport init","file":"httpx/_client.py","symbol":"_init_proxy_transport","line":740,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 616: * `.init_transport()`, `.init_proxy_transport()`","file":"CHANGELOG.md","line":616,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 700: else self._init_proxy_transport(","file":"httpx/_client.py","line":700,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 740: def _init_proxy_transport(","file":"httpx/_client.py","line":740,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1415: else self._init_proxy_transport(","file":"httpx/_client.py","line":1415,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1454: def _init_proxy_transport(","file":"httpx/_client.py","line":1454,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"I need to find the main class used for making synchronous network requests that supports connection pooling and cookie persistence. Where is the primary implementation for the synchronous HTTP interface located?","query":"synchronous http client","file":"httpx/_client.py","symbol":"Client","line":594,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 843: - Added `httpx.Client()` for synchronous clients, with `httpx.AsyncClient` being used for async clients.","file":"CHANGELOG.md","line":843,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 1065: - Enforce using `httpx.AsyncioBackend` for the synchronous client. (Pull #232)","file":"CHANGELOG.md","line":1065,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1309: An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,","file":"httpx/_client.py","line":1309,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"define el iterador asíncrono que produce el contenido","query":"async content iterator","file":"tests/test_content.py","symbol":"__aiter__","line":77,"lang":"es","candidates":[{"text":"File: docs/api.md\nLine 103: * `.content` - **byte**, **byte iterator**, or **byte async iterator**","file":"docs/api.md","line":103,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 94: async def test_iterator_content():","file":"tests/test_content.py","line":94,"lexical":0.65,"target":true},{"text":"File: tests/test_content.py\nLine 130: async def test_aiterator_content():","file":"tests/test_content.py","line":130,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 447: async def test_response_iterator_content():","file":"tests/test_content.py","line":447,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 466: async def test_response_aiterator_content():","file":"tests/test_content.py","line":466,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"I'm trying to figure out how to perform a request to check for allowed methods on a server without sending a body. Can you show me the implementation for the standard method used for this?","query":"send OPTIONS request","file":"httpx/_api.py","symbol":"options","line":210,"lang":"en","candidates":[{"text":"File: docs/api.md\nLine 42: :members: headers cookies params auth request get head options post put patch delete stream build_request send close","file":"docs/api.md","line":42,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 48: :members: headers cookies params auth request get head options post put patch delete stream build_request send aclose","file":"docs/api.md","line":48,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 224: Sends an `OPTIONS` request.","file":"httpx/_api.py","line":224,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 1078: Send an `OPTIONS` request.","file":"httpx/_client.py","line":1078,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1793: Send an `OPTIONS` request.","file":"httpx/_client.py","line":1793,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"URLのクエリパラメータを既存のものと結合して新しいインスタンスを作成する処理はどこにありますか?既存の値を上書きする挙動を確認したいです。","query":"merge query params","file":"httpx/_urls.py","symbol":"merge","line":582,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 47: * Bugfix: When passing `params={}`, always strictly update rather than merge with an existing querystring. (#3364)","file":"CHANGELOG.md","line":47,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 400: * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.updat…","file":"CHANGELOG.md","line":400,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 612: * `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`","file":"CHANGELOG.md","line":612,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 899: - Query Params on the URL string are merged with any `params=...` argument. (Pull #653)","file":"CHANGELOG.md","line":899,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 369: params = self._merge_queryparams(params)","file":"httpx/_client.py","line":369,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 433: def _merge_queryparams(","file":"httpx/_client.py","line":433,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 437: Merge a queryparams argument together with any queryparams on the client,","file":"httpx/_client.py","line":437,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 441: merged_queryparams = QueryParams(self.params)","file":"httpx/_client.py","line":441,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 442: return merged_queryparams.merge(params)","file":"httpx/_client.py","line":442,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 351: def copy_merge_params(self, params: QueryParamTypes) -> URL:","file":"httpx/_urls.py","line":351,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 582: def merge(self, params: QueryParamTypes | None = None) -> QueryParams:","file":"httpx/_urls.py","line":582,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 요청 헤더 중 보안이 필요한 항목들이 로그나 디버그 출력 시 특정 문구로 마스킹 처리되지 않고 그대로 노출되는 문제가 있습니다. 민감한 헤더 값을 식별하여 가려주는 로직을 확인해 주세요.","query":"obfuscate sensitive headers","file":"httpx/_models.py","symbol":"_obfuscate_sensitive_headers","line":130,"lang":"ko","candidates":[{"text":"File: httpx/_models.py\nLine 130: def _obfuscate_sensitive_headers(","file":"httpx/_models.py","line":130,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 373: as_list = list(_obfuscate_sensitive_headers(self.multi_items()))","file":"httpx/_models.py","line":373,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_headers.py\nLine 172: Some headers should be obfuscated because they contain sensitive data.","file":"tests/models/test_headers.py","line":172,"lexical":0.65,"target":false},{"text":"File: tests/models/test_headers.py\nLine 187: def test_obfuscate_sensitive_headers(headers, output):","file":"tests/models/test_headers.py","line":187,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"create an async iterator that yields the provided bytes","query":"streaming body async","file":"tests/models/test_requests.py","symbol":"streaming_body","line":112,"lang":"en","candidates":[{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 696: async def test_digest_auth_unavailable_streaming_body():","file":"tests/client/test_auth.py","line":696,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 444: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":444,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 454: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":454,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 472: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":472,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 482: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":482,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 487: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":487,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 492: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":492,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 522: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":522,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 587: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":587,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 591: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":591,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 595: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":595,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 704: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":704,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 735: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":735,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 761: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":761,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 773: content=async_streaming_body(),","file":"tests/models/test_responses.py","line":773,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 978: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":978,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 988: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":988,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy revisando la lógica de las peticiones de red. ¿Podrías mostrarme la prueba que verifica que el modo de streaming funcione correctamente cuando se desactiva el seguimiento de redirecciones?","query":"stream no redirect","file":"tests/client/test_redirects.py","symbol":"test_can_stream_if_no_redirect","line":336,"lang":"es","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 336: def test_can_stream_if_no_redirect():","file":"tests/client/test_redirects.py","line":336,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 352: def test_cannot_redirect_streaming_body():","file":"tests/client/test_redirects.py","line":352,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"동기 방식의 인증 메커니즘을 사용할 때 클라이언트 요청이 정상적으로 처리되고 기대한 응답 데이터가 반환되는지 확인하는 테스트 케이스가 필요합니다.","query":"sync auth test","file":"tests/client/test_auth.py","symbol":"test_sync_auth","line":760,"lang":"ko","candidates":[{"text":"File: tests/client/test_auth.py\nLine 163: async def test_basic_auth() -> None:","file":"tests/client/test_auth.py","line":163,"lexical":0.65,"target":true},{"text":"File: tests/client/test_auth.py\nLine 176: async def test_basic_auth_with_stream() -> None:","file":"tests/client/test_auth.py","line":176,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 195: async def test_basic_auth_in_url() -> None:","file":"tests/client/test_auth.py","line":195,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 207: async def test_basic_auth_on_session() -> None:","file":"tests/client/test_auth.py","line":207,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 222: async def test_custom_auth() -> None:","file":"tests/client/test_auth.py","line":222,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 289: async def test_auth_disable_per_request() -> None:","file":"tests/client/test_auth.py","line":289,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 311: async def test_auth_hidden_header() -> None:","file":"tests/client/test_auth.py","line":311,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 323: async def test_auth_property() -> None:","file":"tests/client/test_auth.py","line":323,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 339: async def test_auth_invalid_type() -> None:","file":"tests/client/test_auth.py","line":339,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 357: async def test_digest_auth_returns_no_auth_if_no_digest_header_in_response() -> None:","file":"tests/client/test_auth.py","line":357,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 385: async def test_digest_auth_200_response_including_digest_auth_header() -> None:","file":"tests/client/test_auth.py","line":385,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 400: async def test_digest_auth_401_response_without_digest_auth_header() -> None:","file":"tests/client/test_auth.py","line":400,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 427: async def test_digest_auth(","file":"tests/client/test_auth.py","line":427,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 460: async def test_digest_auth_no_specified_qop() -> None:","file":"tests/client/test_auth.py","line":460,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 492: async def test_digest_auth_qop_including_spaces_and_auth_returns_auth(qop: str) -> None:","file":"tests/client/test_auth.py","line":492,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 505: async def test_digest_auth_qop_auth_int_not_implemented() -> None:","file":"tests/client/test_auth.py","line":505,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 516: async def test_digest_auth_qop_must_be_auth_or_auth_int() -> None:","file":"tests/client/test_auth.py","line":516,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 527: async def test_digest_auth_incorrect_credentials() -> None:","file":"tests/client/test_auth.py","line":527,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 540: async def test_digest_auth_reuses_challenge() -> None:","file":"tests/client/test_auth.py","line":540,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 557: async def test_digest_auth_resets_nonce_count_after_401() -> None:","file":"tests/client/test_auth.py","line":557,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 604: async def test_async_digest_auth_raises_protocol_error_on_malformed_header(","file":"tests/client/test_auth.py","line":604,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 623: def test_sync_digest_auth_raises_protocol_error_on_malformed_header(","file":"tests/client/test_auth.py","line":623,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 636: async def test_async_auth_history() -> None:","file":"tests/client/test_auth.py","line":636,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 662: def test_sync_auth_history() -> None:","file":"tests/client/test_auth.py","line":662,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 696: async def test_digest_auth_unavailable_streaming_body():","file":"tests/client/test_auth.py","line":696,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 710: async def test_async_auth_reads_response_body() -> None:","file":"tests/client/test_auth.py","line":710,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 726: def test_sync_auth_reads_response_body() -> None:","file":"tests/client/test_auth.py","line":726,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 743: async def test_async_auth() -> None:","file":"tests/client/test_auth.py","line":743,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 745: Test that we can use an auth implementation specific to the async case, to","file":"tests/client/test_auth.py","line":745,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 760: def test_sync_auth() -> None:","file":"tests/client/test_auth.py","line":760,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 762: Test that we can use an auth implementation specific to the sync case.","file":"tests/client/test_auth.py","line":762,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"cómo capturar excepciones de tiempo de espera al escribir datos","query":"write timeout","file":"httpx/_exceptions.py","symbol":"WriteTimeout","line":152,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 1126: - Implement read and write timeouts (Pull #104)","file":"CHANGELOG.md","line":1126,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 211: * `write(buffer, timeout = None)`","file":"docs/advanced/extensions.md","line":211,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/timeouts.md\nLine 46: **read**, **write**, and **pool** timeouts.","file":"docs/advanced/timeouts.md","line":46,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/timeouts.md\nLine 54: * The **write** timeout specifies the maximum duration to wait for a chunk of","file":"docs/advanced/timeouts.md","line":54,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/timeouts.md\nLine 56: to send data within this time frame, a `WriteTimeout` exception is raised.","file":"docs/advanced/timeouts.md","line":56,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/transports.md\nLine 17: …er of times in case an `httpx.ConnectError` or an `httpx.ConnectTimeout` occurs, allowing smoother operation under flaky networks. If you need other forms of retry behaviors, such as handling read/write errors or reacting to `503 Service Unavailable`, cons…","file":"docs/advanced/transports.md","line":17,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/exceptions.md\nLine 15: * WriteTimeout","file":"docs/exceptions.md","line":15,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/exceptions.md\nLine 60: ::: httpx.WriteTimeout","file":"docs/exceptions.md","line":60,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/__init__.py\nLine 98: \"WriteTimeout\",","file":"httpx/__init__.py","line":98,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_config.py\nLine 103: self.write = timeout.write # type: typing.Optional[float]","file":"httpx/_config.py","line":103,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_config.py\nLine 109: self.write = None if len(timeout) < 3 else timeout[2]","file":"httpx/_config.py","line":109,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_config.py\nLine 129: self.write = timeout if isinstance(write, UnsetType) else write","file":"httpx/_config.py","line":129,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_exceptions.py\nLine 10: · WriteTimeout","file":"httpx/_exceptions.py","line":10,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_exceptions.py\nLine 70: \"WriteTimeout\",","file":"httpx/_exceptions.py","line":70,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_exceptions.py\nLine 152: class WriteTimeout(TimeoutException):","file":"httpx/_exceptions.py","line":152,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 53: WriteTimeout,","file":"httpx/_transports/default.py","line":53,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 81: httpcore.WriteTimeout: WriteTimeout,","file":"httpx/_transports/default.py","line":81,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_properties.py\nLine 50: assert client.timeout.write == expected_timeout","file":"tests/client/test_properties.py","line":50,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_config.py\nLine 109: timeout = httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=5.0)","file":"tests/test_config.py","line":109,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_config.py\nLine 117: assert timeout.write is None","file":"tests/test_config.py","line":117,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_config.py\nLine 161: assert repr(timeout) == \"Timeout(connect=None, read=5.0, write=None, pool=None)\"","file":"tests/test_config.py","line":161,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_timeouts.py\nLine 16: async def test_write_timeout(server):","file":"tests/test_timeouts.py","line":16,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_timeouts.py\nLine 17: timeout = httpx.Timeout(None, write=1e-6)","file":"tests/test_timeouts.py","line":17,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_timeouts.py\nLine 20: with pytest.raises(httpx.WriteTimeout):","file":"tests/test_timeouts.py","line":20,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找初始化网络响应对象的构造函数","query":"response init","file":"httpx/_models.py","symbol":"__init__","line":516,"lang":"zh","candidates":[{"text":"File: httpx/_exceptions.py\nLine 265: def __init__(self, message: str, *, request: Request, response: Response) -> None:","file":"httpx/_exceptions.py","line":265,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1267: def __init__(self, response: Response) -> None:","file":"httpx/_models.py","line":1267,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"http 응답 객체의 데이터 읽기 동작 확인하는 테스트 찾아줘","query":"httpx response read","file":"tests/models/test_responses.py","symbol":"test_read","line":318,"lang":"ko","candidates":[{"text":"File: docs/exceptions.md\nLine 120: ::: httpx.ResponseNotRead","file":"docs/exceptions.md","line":120,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 88: with pytest.raises(httpx.ResponseNotRead):","file":"tests/client/test_async_client.py","line":88,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 980: with pytest.raises(httpx.ResponseNotRead):","file":"tests/models/test_responses.py","line":980,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"实现一个字节流,同时支持同步迭代和异步迭代。","query":"byte stream async","file":"httpx/_content.py","symbol":"ByteStream","line":31,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 199: * Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. (#2407)","file":"CHANGELOG.md","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 238: * Fix streaming uploads using `SyncByteStream` or `AsyncByteStream`. Regression in 0.21.2. (#2016)","file":"CHANGELOG.md","line":238,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.65,"target":false},{"text":"File: httpx/__init__.py\nLine 35: \"AsyncByteStream\",","file":"httpx/__init__.py","line":35,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 34: AsyncByteStream,","file":"httpx/_client.py","line":34,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 162: class BoundAsyncStream(AsyncByteStream):","file":"httpx/_client.py","line":162,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 164: An async byte stream that is bound to a given response instance, and that","file":"httpx/_client.py","line":164,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 169: self, stream: AsyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 575: ) -> SyncByteStream | AsyncByteStream | None:","file":"httpx/_client.py","line":575,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1724: if not isinstance(request.stream, AsyncByteStream):","file":"httpx/_client.py","line":1724,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1732: assert isinstance(response.stream, AsyncByteStream)","file":"httpx/_client.py","line":1732,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 19: AsyncByteStream,","file":"httpx/_content.py","line":19,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 31: class ByteStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":31,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 92: class UnattachedStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":92,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 109: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":109,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 192: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":192,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 226: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":226,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 36: AsyncByteStream,","file":"httpx/_models.py","line":36,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 395: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":395,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 525: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":525,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1047: if not isinstance(self.stream, AsyncByteStream):","file":"httpx/_models.py","line":1047,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1055: async for raw_stream_bytes in self.stream:","file":"httpx/_models.py","line":1055,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1070: if not isinstance(self.stream, AsyncByteStream):","file":"httpx/_models.py","line":1070,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 11: AsyncByteStream,","file":"httpx/_multipart.py","line":11,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 224: class MultipartStream(SyncByteStream, AsyncByteStream):","file":"httpx/_multipart.py","line":224,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 6: from .._types import AsyncByteStream","file":"httpx/_transports/asgi.py","line":6,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 55: class ASGIResponseStream(AsyncByteStream):","file":"httpx/_transports/asgi.py","line":55,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 103: assert isinstance(request.stream, AsyncByteStream)","file":"httpx/_transports/asgi.py","line":103,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 56: from .._types import AsyncByteStream, CertTypes, ProxyTypes, SyncByteStream","file":"httpx/_transports/default.py","line":56,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"asynchrone ressourcen schließen","query":"async close","file":"httpx/_types.py","symbol":"aclose","line":113,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 513: * Unclosed `AsyncClient` instances will now raise warnings if garbage collected. (Pull #1197)","file":"CHANGELOG.md","line":513,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 1003: - Wait for the `asyncio` stream to close when closing a connection. (Pull #494)","file":"CHANGELOG.md","line":1003,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 179: async def aclose(self) -> None:","file":"httpx/_client.py","line":179,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1978: async def aclose(self) -> None:","file":"httpx/_client.py","line":1978,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 967: raise RuntimeError(\"Attempted to call a sync close on an async stream.\")","file":"httpx/_models.py","line":967,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1065: async def aclose(self) -> None:","file":"httpx/_models.py","line":1065,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1071: raise RuntimeError(\"Attempted to call an async close on a sync stream.\")","file":"httpx/_models.py","line":1071,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/base.py\nLine 85: async def aclose(self) -> None:","file":"httpx/_transports/base.py","line":85,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 274: async def aclose(self) -> None:","file":"httpx/_transports/default.py","line":274,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 405: async def aclose(self) -> None:","file":"httpx/_transports/default.py","line":405,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_types.py\nLine 113: async def aclose(self) -> None:","file":"httpx/_types.py","line":113,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 188: async def aclose(self):","file":"tests/client/test_async_client.py","line":188,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 221: async def aclose(self):","file":"tests/client/test_async_client.py","line":221,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 260: async def test_client_closed_state_using_implicit_open():","file":"tests/client/test_async_client.py","line":260,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 281: async def test_client_closed_state_using_with_block():","file":"tests/client/test_async_client.py","line":281,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 353: async def aclose(self) -> None:","file":"tests/client/test_async_client.py","line":353,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_proxies.py\nLine 104: async def test_async_proxy_close():","file":"tests/client/test_proxies.py","line":104,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 451: def test_close_on_async():","file":"tests/models/test_responses.py","line":451,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 510: async def test_aclose_on_sync():","file":"tests/models/test_responses.py","line":510,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 758: async def test_cannot_aread_after_response_closed():","file":"tests/models/test_responses.py","line":758,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 770: async def test_elapsed_not_available_until_closed():","file":"tests/models/test_responses.py","line":770,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 응답 본문을 바이트 단위로 순차적으로 읽어오는 기능이 정상적으로 동작하는지 확인하는 테스트 케이스를 찾아주세요.","query":"iter bytes response","file":"tests/models/test_responses.py","symbol":"test_iter_bytes","line":530,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 334: * `response.iter_bytes()` no longer raises a ValueError when called on a response with no content. (Pull #1827)","file":"CHANGELOG.md","line":334,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 626: * Drop `Response.stream` and` `Response.raw`, which have been replaced by ``.aiter_bytes` and `.aiter_raw`.","file":"CHANGELOG.md","line":626,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 183: …erly determining download progress, because the total number of bytes returned by `response.content` or `response.iter_content()` will not always correspond with the raw content length of the response if HTTP response compression is being used.","file":"docs/advanced/clients.md","line":183,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 200: for chunk in response.iter_bytes():","file":"docs/advanced/clients.md","line":200,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 227: for chunk in response.iter_bytes():","file":"docs/advanced/clients.md","line":227,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 74: ... async for chunk in response.aiter_bytes():","file":"docs/async.md","line":74,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 81: * `Response.aiter_bytes()` - For streaming the response content as bytes.","file":"docs/async.md","line":81,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 84: * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.","file":"docs/async.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 142: * `.iter_bytes()` - Instead of `response.iter_content()`","file":"docs/compatibility.md","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 268: for chunk in response.iter_bytes():","file":"httpx/_main.py","line":268,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 69: ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]","file":"httpx/_types.py","line":69,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 105: for chunk in response.iter_bytes():","file":"tests/client/test_client.py","line":105,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 534: for part in response.iter_bytes():","file":"tests/models/test_responses.py","line":534,"lexical":0.65,"target":true},{"text":"File: tests/models/test_responses.py\nLine 541: parts = list(response.iter_bytes(chunk_size=5))","file":"tests/models/test_responses.py","line":541,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 545: parts = list(response.iter_bytes(chunk_size=13))","file":"tests/models/test_responses.py","line":545,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 549: parts = list(response.iter_bytes(chunk_size=20))","file":"tests/models/test_responses.py","line":549,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 553: def test_iter_bytes_with_empty_response():","file":"tests/models/test_responses.py","line":553,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 555: parts = list(response.iter_bytes())","file":"tests/models/test_responses.py","line":555,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 568: parts = list(response.iter_bytes())","file":"tests/models/test_responses.py","line":568,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 580: async for part in response.aiter_bytes():","file":"tests/models/test_responses.py","line":580,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 588: parts = [part async for part in response.aiter_bytes(chunk_size=5)]","file":"tests/models/test_responses.py","line":588,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 592: parts = [part async for part in response.aiter_bytes(chunk_size=13)]","file":"tests/models/test_responses.py","line":592,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 596: parts = [part async for part in response.aiter_bytes(chunk_size=20)]","file":"tests/models/test_responses.py","line":596,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 724: for part in response.iter_bytes():","file":"tests/models/test_responses.py","line":724,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 739: async for part in response.aiter_bytes():","file":"tests/models/test_responses.py","line":739,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"サーバーに文字列を送信して成功するかテストするコードを探して","query":"test post httpx","file":"tests/test_api.py","symbol":"test_post","line":16,"lang":"ja","candidates":[{"text":"File: tests/models/test_requests.py\nLine 20: request = httpx.Request(\"POST\", \"http://example.org\", content=b\"test 123\")","file":"tests/models/test_requests.py","line":20,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 53: request = httpx.Request(\"POST\", \"http://example.org\", data={\"test\": \"123\"})","file":"tests/models/test_requests.py","line":53,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 61: request = httpx.Request(\"POST\", \"http://example.org\", json={\"test\": 123})","file":"tests/models/test_requests.py","line":61,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 69: request = httpx.Request(\"POST\", \"http://example.org\", json={\"test\": 123})","file":"tests/models/test_requests.py","line":69,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 81: request = httpx.Request(\"POST\", \"http://example.org\", json={\"test\": 123})","file":"tests/models/test_requests.py","line":81,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 93: request = httpx.Request(\"POST\", \"http://example.org\", json={\"test\": 123})","file":"tests/models/test_requests.py","line":93,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 181: request = httpx.Request(\"POST\", \"http://example.org\", json={\"test\": 123})","file":"tests/models/test_requests.py","line":181,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"get headers as key value pairs merging duplicates","query":"headers items","file":"httpx/_models.py","symbol":"items","line":216,"lang":"en","candidates":[{"text":"File: httpx/_models.py\nLine 154: for k, v in headers.items():","file":"httpx/_models.py","line":154,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_models.py\nLine 218: Return `(key, value)` items of headers. Concatenate headers","file":"httpx/_models.py","line":218,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 373: as_list = list(_obfuscate_sensitive_headers(self.multi_items()))","file":"httpx/_models.py","line":373,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 442: for key, value in default_headers.items():","file":"httpx/_models.py","line":442,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 572: for key, value in default_headers.items():","file":"httpx/_models.py","line":572,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1272: for key, value in self.response.headers.multi_items():","file":"httpx/_models.py","line":1272,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_multipart.py\nLine 195: for header_name, header_value in self.headers.items():","file":"httpx/_multipart.py","line":195,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_headers.py\nLine 13: def echo_repeated_headers_multi_items(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_headers.py","line":13,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_headers.py\nLine 14: data = {\"headers\": list(request.headers.multi_items())}","file":"tests/client/test_headers.py","line":14,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_headers.py\nLine 18: def echo_repeated_headers_items(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_headers.py","line":18,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_headers.py\nLine 19: data = {\"headers\": list(request.headers.items())}","file":"tests/client/test_headers.py","line":19,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_headers.py\nLine 125: client = httpx.Client(transport=httpx.MockTransport(echo_repeated_headers_items))","file":"tests/client/test_headers.py","line":125,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_headers.py\nLine 141: transport=httpx.MockTransport(echo_repeated_headers_multi_items)","file":"tests/client/test_headers.py","line":141,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"I'm trying to implement a way to pull credentials from a local configuration file. Where is the logic that handles reading authentication data from a system file for these types of requests?","query":"netrc authentication","file":"httpx/_auth.py","symbol":"__init__","line":150,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 154: * NetRC authentication is no longer automatically handled, but is instead supported by an explicit `httpx.NetRCAuth()` authentication class. See the documentation at https://www.python-httpx.org/advanced/authentication/#netrc-authentication (#2525)","file":"CHANGELOG.md","line":154,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 951: - Request 'Authorization' headers now have priority over `.netrc` authentication info. (Commit 095b691)","file":"CHANGELOG.md","line":951,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 1001: - Cache NETRC authentication per-client. (Pull #400)","file":"CHANGELOG.md","line":1001,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 43: ## NetRC authentication","file":"docs/advanced/authentication.md","line":43,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 45: HTTPX can be configured to use [a `.netrc` config file](https://everything.curl.dev/usingcurl/netrc) for authentication.","file":"docs/advanced/authentication.md","line":45,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 47: The `.netrc` config file allows authentication credentials to be associated with specified hosts. When a request is made to a host that is found in the netrc file, the username and password will be included using HTTP basic authentication.","file":"docs/advanced/authentication.md","line":47,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 61: Some examples of configuring `.netrc` authentication with `httpx`.","file":"docs/advanced/authentication.md","line":61,"lexical":0.6000000000000001,"target":false},{"text":"File: httpx/_auth.py\nLine 160: # The netrc file did not have authentication credentials for this host.","file":"httpx/_auth.py","line":160,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Comment libérer les ressources réseau après un cycle de requête/réponse ?","query":"release network resources","file":"httpx/_types.py","symbol":"close","line":99,"lang":"fr","candidates":[{"text":"File: httpx/_transports/base.py\nLine 34: In order to properly release any network resources, the response","file":"httpx/_transports/base.py","line":34,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 101: Subclasses can override this method to release any network resources","file":"httpx/_types.py","line":101,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"객체 정보를 문자열로 반환할 때 민감한 헤더를 숨기고 인코딩 정보를 포함하는 로직 찾아줘","query":"obfuscate sensitive headers","file":"httpx/_models.py","symbol":"__repr__","line":366,"lang":"ko","candidates":[{"text":"File: httpx/_models.py\nLine 130: def _obfuscate_sensitive_headers(","file":"httpx/_models.py","line":130,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 373: as_list = list(_obfuscate_sensitive_headers(self.multi_items()))","file":"httpx/_models.py","line":373,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_headers.py\nLine 172: Some headers should be obfuscated because they contain sensitive data.","file":"tests/models/test_headers.py","line":172,"lexical":0.65,"target":false},{"text":"File: tests/models/test_headers.py\nLine 187: def test_obfuscate_sensitive_headers(headers, output):","file":"tests/models/test_headers.py","line":187,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"busca la función que vacía el búfer de decodificación","query":"decoder flush","file":"httpx/_decoders.py","symbol":"flush","line":317,"lang":"es","candidates":[{"text":"File: httpx/_models.py\nLine 649: self._text = \"\".join([decoder.decode(self.content), decoder.flush()])","file":"httpx/_models.py","line":649,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 901: decoded = decoder.flush()","file":"httpx/_models.py","line":901,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 920: text_content = decoder.flush()","file":"httpx/_models.py","line":920,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 932: for line in decoder.flush():","file":"httpx/_models.py","line":932,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1001: decoded = decoder.flush()","file":"httpx/_models.py","line":1001,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1022: text_content = decoder.flush()","file":"httpx/_models.py","line":1022,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1034: for line in decoder.flush():","file":"httpx/_models.py","line":1034,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"encontra a função assíncrona que simula uma resposta http de sucesso para testes","query":"async http response","file":"tests/conftest.py","symbol":"hello_world","line":79,"lang":"pt","candidates":[{"text":"File: docs/async.md\nLine 73: >>> async with client.stream('GET', 'https://www.example.com/') as response:","file":"docs/async.md","line":73,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 318: async def hello_world(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_async_client.py","line":318,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 156: ) -> typing.AsyncGenerator[httpx.Request, httpx.Response]:","file":"tests/client/test_auth.py","line":156,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 689: async def handle_async_request(self, request: httpx.Request) -> httpx.Response:","file":"tests/client/test_auth.py","line":689,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 472: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":472,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 482: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":482,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 487: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":487,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 492: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":492,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 522: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":522,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 587: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":587,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 591: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":591,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 595: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":595,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 978: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":978,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 988: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":988,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Cómo se actualizan los parámetros de consulta en las nuevas versiones de httpx?","query":"update QueryParams","file":"httpx/_urls.py","symbol":"update","line":631,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 400: * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.updat…","file":"CHANGELOG.md","line":400,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urls.py\nLine 584: Return a new QueryParams instance, updated with.","file":"httpx/_urls.py","line":584,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"获取指定键的所有header值,支持按逗号拆分","query":"get header values","file":"httpx/_models.py","symbol":"get_list","line":252,"lang":"zh","candidates":[{"text":"File: docs/advanced/clients.md\nLine 96: - For headers, query parameters and cookies, the values are combined together. For example:","file":"docs/advanced/clients.md","line":96,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 706: values = self.headers.get_list(\"content-encoding\", split_commas=True)","file":"httpx/_models.py","line":706,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Wie kann ich die Größe eines dateiähnlichen Objekts ermitteln, ohne den Inhalt in den Speicher zu laden?","query":"file-like length","file":"httpx/_utils.py","symbol":"peek_filelike_length","line":95,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 363: * Prefer Content-Length over Transfer-Encoding: chunked for content=<file-like> cases. (Pull #1619)","file":"CHANGELOG.md","line":363,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_utils.py\nLine 97: Given a file-like stream object, return its length in number of bytes","file":"httpx/_utils.py","line":97,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"busca la función para cerrar la conexión del transporte","query":"transport close","file":"httpx/_transports/base.py","symbol":"close","line":61,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 375: * Map httpcore transport close exceptions to httpx exceptions. (Pull #1606)","file":"CHANGELOG.md","line":375,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/transports.md\nLine 235: transport.close()","file":"docs/advanced/transports.md","line":235,"lexical":0.6000000000000001,"target":false},{"text":"File: httpx/_client.py\nLine 1265: Close transport and proxies.","file":"httpx/_client.py","line":1265,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1270: self._transport.close()","file":"httpx/_client.py","line":1270,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1273: transport.close()","file":"httpx/_client.py","line":1273,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1980: Close transport and proxies.","file":"httpx/_client.py","line":1980,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1985: await self._transport.aclose()","file":"httpx/_client.py","line":1985,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 190: # calls into `.aclose`, so simple transport cases can just override","file":"tests/client/test_async_client.py","line":190,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 193: self.events.append(\"transport.aclose\")","file":"tests/client/test_async_client.py","line":193,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 209: \"transport.aclose\",","file":"tests/client/test_async_client.py","line":209,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 223: # calls into `.aclose`, so simple transport cases can just override","file":"tests/client/test_async_client.py","line":223,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 245: \"transport.aclose\",","file":"tests/client/test_async_client.py","line":245,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 239: # calls into `.close`, so simple transport cases can just override","file":"tests/client/test_client.py","line":239,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 242: self.events.append(\"transport.close\")","file":"tests/client/test_client.py","line":242,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 258: \"transport.close\",","file":"tests/client/test_client.py","line":258,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 271: # calls into `.close`, so simple transport cases can just override","file":"tests/client/test_client.py","line":271,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 291: \"transport.close\",","file":"tests/client/test_client.py","line":291,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"genera el encabezado de autenticación basic a partir de usuario y contraseña","query":"basic auth header","file":"httpx/_auth.py","symbol":"_build_auth_header","line":169,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 1016: - Username and password are no longer included in the `Host` header when basic authentication","file":"CHANGELOG.md","line":1016,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 19: HTTP basic authentication is an unencrypted authentication scheme that uses a simple encoding of the username and password in the request `Authorization` header. Since it is unencrypted it should typically only be used over `https`, although this is not st…","file":"docs/advanced/authentication.md","line":19,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 163: # Build a basic auth header with credentials from the netrc file.","file":"httpx/_auth.py","line":163,"lexical":0.65,"target":true},{"text":"File: tests/test_auth.py\nLine 18: # The initial request should include a basic auth header.","file":"tests/test_auth.py","line":18,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 21: assert request.headers[\"Authorization\"].startswith(\"Basic\")","file":"tests/test_auth.py","line":21,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"busca la clase que divide texto en trozos de tamaño fijo","query":"text chunker","file":"httpx/_decoders.py","symbol":"TextChunker","line":267,"lang":"es","candidates":[{"text":"File: httpx/_decoders.py\nLine 267: class TextChunker:","file":"httpx/_decoders.py","line":267,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_models.py\nLine 21: TextChunker,","file":"httpx/_models.py","line":21,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 914: chunker = TextChunker(chunk_size=chunk_size)","file":"httpx/_models.py","line":914,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 918: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":918,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 921: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":921,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1016: chunker = TextChunker(chunk_size=chunk_size)","file":"httpx/_models.py","line":1016,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1020: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":1020,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1023: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":1023,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Cómo puedo obtener todos los valores de un mismo parámetro de consulta en forma de lista?","query":"query params list","file":"httpx/_urls.py","symbol":"get_list","line":526,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 538: * The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed.","file":"CHANGELOG.md","line":538,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 602: * The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants.","file":"CHANGELOG.md","line":602,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 645: * The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. (Pull #1089)","file":"CHANGELOG.md","line":645,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 220: For both query params (`params=`) and form data (`data=`), `requests` supports sending a list of tuples (e.g. `requests.get(..., params=[('key1', 'value1'), ('key1', 'value2')])`). This is not supported by HTTPX. Instead, use a dictionary with lists as val…","file":"docs/compatibility.md","line":220,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"サーバーのURLパスを指定してGETリクエストを構築し、カスタムヘッダーを送信した応答を確認したい。","query":"test build request","file":"tests/client/test_client.py","symbol":"test_build_request","line":47,"lang":"ja","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 40: async def test_build_request(server):","file":"tests/client/test_async_client.py","line":40,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 47: def test_build_request(server):","file":"tests/client/test_client.py","line":47,"lexical":0.65,"target":true},{"text":"File: tests/client/test_client.py\nLine 62: def test_build_post_request(server):","file":"tests/client/test_client.py","line":62,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 200: request = client.build_request(\"GET\", \"/testing/123\")","file":"tests/client/test_client.py","line":200,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 206: request = client.build_request(\"GET\", \"/testing/123\")","file":"tests/client/test_client.py","line":206,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 212: request = client.build_request(\"GET\", \"../testing/123\")","file":"tests/client/test_client.py","line":212,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 218: request = client.build_request(\"GET\", \"/testing:123\")","file":"tests/client/test_client.py","line":218,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 224: request = client.build_request(\"GET\", \"/testing%2F123\")","file":"tests/client/test_client.py","line":224,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 228: request = client.build_request(\"GET\", \"/testing\")","file":"tests/client/test_client.py","line":228,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"클라이언트 이벤트 훅이 요청과 응답 헤더를 올바르게 캡처하는지 확인하는 테스트 찾아줘","query":"test event hooks","file":"tests/client/test_event_hooks.py","symbol":"test_event_hooks","line":16,"lang":"ko","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 16: def test_event_hooks():","file":"tests/client/test_event_hooks.py","line":16,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 51: def test_event_hooks_raising_exception(server):","file":"tests/client/test_event_hooks.py","line":51,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 67: async def test_async_event_hooks():","file":"tests/client/test_event_hooks.py","line":67,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 103: async def test_async_event_hooks_raising_exception():","file":"tests/client/test_event_hooks.py","line":103,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 118: def test_event_hooks_with_redirect():","file":"tests/client/test_event_hooks.py","line":118,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 175: async def test_async_event_hooks_with_redirect():","file":"tests/client/test_event_hooks.py","line":175,"lexical":0.65,"target":false},{"text":"File: tests/client/test_properties.py\nLine 54: def test_client_event_hooks():","file":"tests/client/test_properties.py","line":54,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"implementiere asynchrone iteration für bytestreams","query":"async iterator bytes","file":"httpx/_types.py","symbol":"__aiter__","line":107,"lang":"de","candidates":[{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 84: * `def .aiter_bytes([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 175: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_client.py","line":175,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 38: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":38,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 75: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":75,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 102: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":102,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 984: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":984,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1039: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":1039,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 298: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_multipart.py","line":298,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 59: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/asgi.py","line":59,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 269: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/default.py","line":269,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 107: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_types.py","line":107,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 94: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":94,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 348: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":348,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 125: async def hello_world() -> typing.AsyncIterator[bytes]: # pragma: no cover","file":"tests/client/test_client.py","line":125,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 131: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 467: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":467,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 190: async def compress(body: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":190,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 245: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":245,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 268: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":268,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 상태 코드가 2xx가 아닌 경우에 대해 raise_for_status 메서드가 예외를 발생하는지 검증하는 테스트 로직을 확인해 주세요.","query":"raise_for_status test","file":"tests/models/test_responses.py","symbol":"test_raise_for_status","line":91,"lang":"ko","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 115: async def test_raise_for_status(server):","file":"tests/client/test_async_client.py","line":115,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_client.py\nLine 134: def test_raise_for_status(server):","file":"tests/client/test_client.py","line":134,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/models/test_responses.py\nLine 91: def test_raise_for_status():","file":"tests/models/test_responses.py","line":91,"lexical":0.6000000000000001,"target":true}]}
{"site":"project_search","repo":"httpx","task":"リクエストを内部のHTTPコアライブラリの形式に変換して送信し、そのレスポンスを受け取って再びライブラリ固有のレスポンスオブジェクトにラップして返す処理において、例外ハンドリングやストリームの変換が正しく行われているか確認したいです。特に、通信基盤層でのリクエストの再構成ロジックに問題がないか調査してください。","query":"httpcore request response","file":"httpx/_transports/default.py","symbol":"handle_request","line":230,"lang":"ja","candidates":[{"text":"File: docs/advanced/extensions.md\nLine 5: Extensions should be used for features that may not be available on all transports, and that do not fit neatly into [the simplified request/response model](https://www.encode.io/httpcore/extensions/) that the underlying `httpcore` package uses as its API.","file":"docs/advanced/extensions.md","line":5,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 31: DEBUG [2024-09-28 17:27:41] httpcore.http11 - receive_response_headers.started request=<Request [b'GET']>","file":"docs/logging.md","line":31,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 34: DEBUG [2024-09-28 17:27:41] httpcore.http11 - receive_response_body.started request=<Request [b'GET']>","file":"docs/logging.md","line":34,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"testar ganchos de eventos assíncronos do httpx com transporte mock","query":"async event hooks test","file":"tests/client/test_event_hooks.py","symbol":"test_async_event_hooks","line":67,"lang":"pt","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 67: async def test_async_event_hooks():","file":"tests/client/test_event_hooks.py","line":67,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 103: async def test_async_event_hooks_raising_exception():","file":"tests/client/test_event_hooks.py","line":103,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 175: async def test_async_event_hooks_with_redirect():","file":"tests/client/test_event_hooks.py","line":175,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我们在处理非 UTF-8 编码的文件,需要一个函数来自动检测二进制内容的字符集。请给出一个能返回检测到的编码名称的工具函数。","query":"chardet detect encoding","file":"tests/test_decoders.py","symbol":"autodetect","line":250,"lang":"zh","candidates":[{"text":"File: docs/advanced/text-encodings.md\nLine 66: return chardet.detect(content).get(\"encoding\")","file":"docs/advanced/text-encodings.md","line":66,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 13: return chardet.detect(content).get(\"encoding\")","file":"tests/client/test_client.py","line":13,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 28: return chardet.detect(content).get(\"encoding\")","file":"tests/models/test_responses.py","line":28,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 251: return chardet.detect(content).get(\"encoding\")","file":"tests/test_decoders.py","line":251,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"特定のドメインとパスを指定してクッキーを削除する際、意図したパスのクッキーだけが削除されず、他のパスのクッキーまで消えてしまう、あるいは削除の挙動が正確でない問題があります。","query":"cookies domain path","file":"tests/models/test_cookies.py","symbol":"test_cookies_with_domain_and_path","line":45,"lang":"ja","candidates":[{"text":"File: docs/quickstart.md\nLine 407: with additional API for accessing cookies by their domain or path.","file":"docs/quickstart.md","line":407,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1194: Delete all cookies. Optionally include a domain and path in","file":"httpx/_models.py","line":1194,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_cookies.py\nLine 45: def test_cookies_with_domain_and_path():","file":"tests/models/test_cookies.py","line":45,"lexical":0.65,"target":true},{"text":"File: tests/models/test_cookies.py\nLine 47: cookies.set(\"name\", \"value\", domain=\"example.com\", path=\"/subpath/1\")","file":"tests/models/test_cookies.py","line":47,"lexical":0.65,"target":false},{"text":"File: tests/models/test_cookies.py\nLine 48: cookies.set(\"name\", \"value\", domain=\"example.com\", path=\"/subpath/2\")","file":"tests/models/test_cookies.py","line":48,"lexical":0.65,"target":false},{"text":"File: tests/models/test_cookies.py\nLine 49: cookies.clear(domain=\"example.com\", path=\"/subpath/1\")","file":"tests/models/test_cookies.py","line":49,"lexical":0.65,"target":false},{"text":"File: tests/models/test_cookies.py\nLine 51: cookies.delete(\"name\", domain=\"example.com\", path=\"/subpath/2\")","file":"tests/models/test_cookies.py","line":51,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como adicionar um parâmetro a uma cópia da URL sem modificar a original?","query":"add param URL copy","file":"httpx/_urls.py","symbol":"copy_add_param","line":345,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.5,"target":false},{"text":"File: CHANGELOG.md\nLine 511: * Added support for all URL components as parameter names when using `url.copy_with(...)`. (Pull #1285)","file":"CHANGELOG.md","line":511,"lexical":0.5,"target":false},{"text":"File: httpx/_urls.py\nLine 345: def copy_add_param(self, key: str, value: typing.Any = None) -> URL:","file":"httpx/_urls.py","line":345,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 679: # `URL.copy_add_param()`","file":"tests/models/test_url.py","line":679,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 697: assert url.copy_add_param(\"a\", \"456\") == \"https://example.org:123/?a=123&a=456\"","file":"tests/models/test_url.py","line":697,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estou tentando entender como o objeto é convertido para texto quando é impresso. Onde está a implementação da representação em string que retorna a referência da URI?","query":"uri reference str","file":"httpx/_urls.py","symbol":"__str__","line":374,"lang":"pt","candidates":[{"text":"File: httpx/_urls.py\nLine 188: host: str = self._uri_reference.host","file":"httpx/_urls.py","line":188,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 375: return str(self._uri_reference)","file":"httpx/_urls.py","line":375,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Cómo puedo obtener o ver los parámetros de consulta que se están enviando en las peticiones?","query":"get query params","file":"httpx/_client.py","symbol":"params","line":330,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 538: * The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed.","file":"CHANGELOG.md","line":538,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 602: * The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants.","file":"CHANGELOG.md","line":602,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 645: * The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. (Pull #1089)","file":"CHANGELOG.md","line":645,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 220: For both query params (`params=`) and form data (`data=`), `requests` supports sending a list of tuples (e.g. `requests.get(..., params=[('key1', 'value1'), ('key1', 'value2')])`). This is not supported by HTTPX. Instead, use a dictionary with lists as val…","file":"docs/compatibility.md","line":220,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 437: Merge a queryparams argument together with any queryparams on the client,","file":"httpx/_client.py","line":437,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_queryparams.py\nLine 32: response = client.get(url, params=request_queryparams)","file":"tests/client/test_queryparams.py","line":32,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy revisando cómo se gestiona el flujo de datos en las respuestas asíncronas. ¿Podrías buscar la prueba que verifica que el contador de bytes aumente correctamente cuando se itera sobre el cuerpo de la respuesta?","query":"aiter_raw bytes","file":"tests/models/test_responses.py","symbol":"test_aiter_raw_increments_updates_counter","line":521,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 626: * Drop `Response.stream` and` `Response.raw`, which have been replaced by ``.aiter_bytes` and `.aiter_raw`.","file":"CHANGELOG.md","line":626,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 84: * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.","file":"docs/async.md","line":84,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 997: async for raw_bytes in self.aiter_raw():","file":"httpx/_models.py","line":997,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"实现百分号编码字符串的函数,保留安全字符不变","query":"percent encode","file":"httpx/_urlparse.py","symbol":"percent_encoded","line":482,"lang":"zh","candidates":[{"text":"File: httpx/_urlparse.py\nLine 37: PERCENT_ENCODED_REGEX = re.compile(\"%[A-Fa-f0-9]{2}\")","file":"httpx/_urlparse.py","line":37,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_urlparse.py\nLine 39: # https://url.spec.whatwg.org/#percent-encoded-bytes","file":"httpx/_urlparse.py","line":39,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 41: # The fragment percent-encode set is the C0 control percent-encode set","file":"httpx/_urlparse.py","line":41,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 47: # The query percent-encode set is the C0 control percent-encode set","file":"httpx/_urlparse.py","line":47,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 53: # The path percent-encode set is the query percent-encode set","file":"httpx/_urlparse.py","line":53,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 63: # The userinfo percent-encode set is the path percent-encode set","file":"httpx/_urlparse.py","line":63,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 86: # Note... The terminology 'userinfo' percent-encode set in the WHATWG document","file":"httpx/_urlparse.py","line":86,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 482: def percent_encoded(string: str, safe: str) -> str:","file":"httpx/_urlparse.py","line":482,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 510: for match in re.finditer(PERCENT_ENCODED_REGEX, string):","file":"httpx/_urlparse.py","line":510,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 516: parts.append(percent_encoded(leading_text, safe=safe))","file":"httpx/_urlparse.py","line":516,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urlparse.py\nLine 525: parts.append(percent_encoded(trailing_text, safe=safe))","file":"httpx/_urlparse.py","line":525,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 299: def test_param_with_percent_encoded():","file":"tests/models/test_url.py","line":299,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 321: # Valid percent encoded sequences should not be double encoded.","file":"tests/models/test_url.py","line":321,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 327: # Characters that require percent encoding should be encoded.","file":"tests/models/test_url.py","line":327,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_url.py\nLine 334: # characters that require percent encoding should be encoded,","file":"tests/models/test_url.py","line":334,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 5889: \"# file URLs containing percent-encoded Windows drive letters (shouldn't work)\",","file":"tests/models/whatwg.json","line":5889,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 7724: \"# percent encoded hosts in non-special-URLs\",","file":"tests/models/whatwg.json","line":7724,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 7967: \"Percent-encoded http: in blob:\",","file":"tests/models/whatwg.json","line":7967,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 8047: \"Percent-encoded query and fragment\",","file":"tests/models/whatwg.json","line":8047,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 8424: \"UTF-8 percent-encode of C0 control percent-encode set and supersets\",","file":"tests/models/whatwg.json","line":8424,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/whatwg.json\nLine 8470: \"Tests for the distinct percent-encode sets\",","file":"tests/models/whatwg.json","line":8470,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"응답 객체의 상태 코드와 텍스트 내용이 올바른지 검증하는 테스트 찾아줘","query":"test response content","file":"tests/models/test_responses.py","symbol":"test_response_content","line":46,"lang":"ko","candidates":[{"text":"File: httpx/_models.py\nLine 13: from ._content import ByteStream, UnattachedStream, encode_request, encode_response","file":"httpx/_models.py","line":13,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 81: such as testing the content of a client 500 response.","file":"httpx/_transports/asgi.py","line":81,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/wsgi.py\nLine 71: such as testing the content of a client 500 response.","file":"httpx/_transports/wsgi.py","line":71,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 82: async def test_access_content_stream_response(server):","file":"tests/client/test_async_client.py","line":82,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 46: def test_response_content():","file":"tests/models/test_responses.py","line":46,"lexical":0.65,"target":true},{"text":"File: tests/models/test_responses.py\nLine 157: def test_response_content_type_encoding():","file":"tests/models/test_responses.py","line":157,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 200: def test_response_no_charset_with_ascii_content():","file":"tests/models/test_responses.py","line":200,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 217: def test_response_no_charset_with_utf8_content():","file":"tests/models/test_responses.py","line":217,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 233: def test_response_no_charset_with_iso_8859_1_content():","file":"tests/models/test_responses.py","line":233,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 247: def test_response_no_charset_with_cp_1252_content():","file":"tests/models/test_responses.py","line":247,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 419: async def test_response_empty_content():","file":"tests/test_content.py","line":419,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 433: async def test_response_bytes_content():","file":"tests/test_content.py","line":433,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 447: async def test_response_iterator_content():","file":"tests/test_content.py","line":447,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 466: async def test_response_aiterator_content():","file":"tests/test_content.py","line":466,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Preciso verificar se a união de URLs relativa e absoluta funciona corretamente. Quero testar cenários com caminhos absolutos e relativos.","query":"URL joining tests","file":"tests/models/test_url.py","symbol":"test_url_join","line":479,"lang":"pt","candidates":[{"text":"File: tests/models/test_url.py\nLine 481: Some basic URL joining tests.","file":"tests/models/test_url.py","line":481,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 504: URL joining tests, as-per reference examples in RFC 3986.","file":"tests/models/test_url.py","line":504,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Dónde están las pruebas para verificar cómo se manejan los parámetros en las URLs?","query":"test url params","file":"tests/models/test_url.py","symbol":"test_url_params","line":154,"lang":"es","candidates":[{"text":"File: tests/models/test_url.py\nLine 154: def test_url_params():","file":"tests/models/test_url.py","line":154,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 708: def test_url_merge_params_manipulation():","file":"tests/models/test_url.py","line":708,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"멀티파트 인코딩된 전체 데이터 크기 계산하는 로직 찾아줘","query":"multipart content length","file":"httpx/_multipart.py","symbol":"get_content_length","line":265,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 174: * Multipart file uploads where the file length cannot be determine now use chunked transfer encoding, rather than loading the entire file into memory in order to determine the `Content-Length`. (#2382)","file":"CHANGELOG.md","line":174,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 267: Return the length of the multipart encoded content, or `None` if","file":"httpx/_multipart.py","line":267,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"인증 헤더에 토큰 추가","query":"auth token header","file":"tests/client/test_auth.py","symbol":"auth","line":226,"lang":"ko","candidates":[{"text":"File: docs/advanced/authentication.md\nLine 105: request.headers['X-Authentication'] = self.token","file":"docs/advanced/authentication.md","line":105,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 121: request.headers['X-Authentication'] = self.token","file":"docs/advanced/authentication.md","line":121,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 162: request.headers[\"X-Authentication\"] = self.access_token","file":"docs/advanced/authentication.md","line":162,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 171: request.headers[\"X-Authentication\"] = self.access_token","file":"docs/advanced/authentication.md","line":171,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 204: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":204,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 213: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":213,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 227: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":227,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 130: request.headers[\"Authorization\"] = self.token","file":"tests/client/test_auth.py","line":130,"lexical":0.65,"target":true},{"text":"File: tests/client/test_auth.py\nLine 227: request.headers[\"Authorization\"] = \"Token 123\"","file":"tests/client/test_auth.py","line":227,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 373: auth_header = \"Token ...\"","file":"tests/client/test_auth.py","line":373,"lexical":0.65,"target":false},{"text":"File: tests/client/test_headers.py\nLine 49: request_headers = {\"X-Auth-Token\": \"FooBarBazToken\"}","file":"tests/client/test_headers.py","line":49,"lexical":0.65,"target":false},{"text":"File: tests/client/test_headers.py\nLine 70: client_headers = {\"X-Auth-Token\": \"FooBar\"}","file":"tests/client/test_headers.py","line":70,"lexical":0.65,"target":false},{"text":"File: tests/client/test_headers.py\nLine 71: request_headers = {\"X-Auth-Token\": \"BazToken\"}","file":"tests/client/test_headers.py","line":71,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找验证域名中空格被转义为百分比编码的测试用例","query":"url host escape","file":"tests/models/test_url.py","symbol":"test_url_percent_escape_host","line":227,"lang":"zh","candidates":[{"text":"File: httpx/_utils.py\nLine 181: domain = re.escape(url.host[2:])","file":"httpx/_utils.py","line":181,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_utils.py\nLine 185: domain = re.escape(url.host[1:])","file":"httpx/_utils.py","line":185,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_utils.py\nLine 189: domain = re.escape(url.host)","file":"httpx/_utils.py","line":189,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 227: def test_url_percent_escape_host():","file":"tests/models/test_url.py","line":227,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 789: def test_url_unescaped_idna_host():","file":"tests/models/test_url.py","line":789,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 794: def test_url_escaped_idna_host():","file":"tests/models/test_url.py","line":794,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Le code ne retourne pas d'encodage par défaut pour les en-têtes HTTP si la détection automatique (ASCII, UTF-8) échoue, ce qui provoque une erreur ou une valeur manquante au lieu de retomber sur iso-8859-1 comme prévu par la spécification.","query":"header encoding fallback","file":"httpx/_models.py","symbol":"encoding","line":167,"lang":"fr","candidates":[{"text":"File: CHANGELOG.md\nLine 812: * Fallback to setting headers as UTF-8 if no encoding is specified. (Pull #820)","file":"CHANGELOG.md","line":812,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 169: Header encoding is mandated as ascii, but we allow fallbacks to utf-8","file":"httpx/_models.py","line":169,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"文字列が渡された際に、指定されたエンコーディングを用いてバイト列に変換する処理において、既にバイト列である場合はそのまま返す挙動を確認したい。型によって処理を分岐させるロジックの場所を教えてください。","query":"str bytes encode","file":"httpx/_utils.py","symbol":"to_bytes","line":79,"lang":"ja","candidates":[{"text":"File: docs/compatibility.md\nLine 100: HTTPX uses `utf-8` for encoding `str` request bodies. For example, when using `content=<str>` the request body will be encoded to `utf-8` before being sent over the wire. This differs from Requests which uses `latin1`. If you need an explicit encoding, pas…","file":"docs/compatibility.md","line":100,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 160: def encode_text(text: str) -> tuple[dict[str, str], ByteStream]:","file":"httpx/_content.py","line":160,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 168: def encode_html(html: str) -> tuple[dict[str, str], ByteStream]:","file":"httpx/_content.py","line":168,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 176: def encode_json(json: Any) -> tuple[dict[str, str], ByteStream]:","file":"httpx/_content.py","line":176,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 13: from ._content import ByteStream, UnattachedStream, encode_request, encode_response","file":"httpx/_models.py","line":13,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"リクエスト発生時にヘッダー情報をイベントとして記録する処理が、テスト環境で正しく動作しているか確認したいです。","query":"request headers event","file":"tests/client/test_event_hooks.py","symbol":"on_request","line":19,"lang":"ja","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 20: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":20,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 71: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":71,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 126: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":126,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 183: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":183,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"機密性の高いヘッダー情報が難読化された際、出力される辞書形式の内容と、実際に生成されるヘッダーオブジェクトの表現形式が一致しているかを確認するテストが不足している、あるいは期待値の検証が不十分です。","query":"obfuscate sensitive headers","file":"tests/models/test_headers.py","symbol":"test_obfuscate_sensitive_headers","line":187,"lang":"ja","candidates":[{"text":"File: httpx/_models.py\nLine 130: def _obfuscate_sensitive_headers(","file":"httpx/_models.py","line":130,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 373: as_list = list(_obfuscate_sensitive_headers(self.multi_items()))","file":"httpx/_models.py","line":373,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_headers.py\nLine 172: Some headers should be obfuscated because they contain sensitive data.","file":"tests/models/test_headers.py","line":172,"lexical":0.65,"target":true},{"text":"File: tests/models/test_headers.py\nLine 187: def test_obfuscate_sensitive_headers(headers, output):","file":"tests/models/test_headers.py","line":187,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"这个测试用例在验证流式响应的原始字节迭代功能吗?","query":"aiter_raw test","file":"tests/models/test_responses.py","symbol":"test_aiter_raw","line":471,"lang":"zh","candidates":[{"text":"File: tests/models/test_responses.py\nLine 471: async def test_aiter_raw():","file":"tests/models/test_responses.py","line":471,"lexical":0.6000000000000001,"target":true},{"text":"File: tests/models/test_responses.py\nLine 481: async def test_aiter_raw_with_chunksize():","file":"tests/models/test_responses.py","line":481,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/models/test_responses.py\nLine 499: async def test_aiter_raw_on_sync():","file":"tests/models/test_responses.py","line":499,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/models/test_responses.py\nLine 521: async def test_aiter_raw_increments_updates_counter():","file":"tests/models/test_responses.py","line":521,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"busca la prueba de error por tipos de datos inválidos en el contenido de una petición","query":"invalid content type","file":"tests/test_content.py","symbol":"test_invalid_argument","line":359,"lang":"es","candidates":[{"text":"File: tests/models/test_responses.py\nLine 187: Fallback to utf-8 if we get an invalid charset in the Content-Type header.","file":"tests/models/test_responses.py","line":187,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 189: headers = {\"Content-Type\": \"text-plain; charset=invalid-codec-name\"}","file":"tests/models/test_responses.py","line":189,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"The method used to create a new URL instance with updated query parameters is incorrectly returning the same object or failing to properly merge the new key-value pair into the existing parameter collection.","query":"copy with params","file":"httpx/_urls.py","symbol":"copy_set_param","line":342,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 407: * Support `url.copy_with(params=...)`. (Pull #1601)","file":"CHANGELOG.md","line":407,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 343: return self.copy_with(params=self.params.set(key, value))","file":"httpx/_urls.py","line":343,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 346: return self.copy_with(params=self.params.add(key, value))","file":"httpx/_urls.py","line":346,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 349: return self.copy_with(params=self.params.remove(key))","file":"httpx/_urls.py","line":349,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 352: return self.copy_with(params=self.params.merge(params))","file":"httpx/_urls.py","line":352,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 요청 객체에 타임아웃 설정이 누락되었을 때 클라이언트 기본값을 적용하는 로직을 확인하고 싶어요. 요청 확장 속성에 타임아웃 정보를 주입하는 부분이 어디인가요?","query":"request extensions timeout","file":"httpx/_client.py","symbol":"_set_timeout","line":584,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 324: instance, as `request.extensions['timeout']`.","file":"CHANGELOG.md","line":324,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 18: response.request.extensions[\"timeout\"]","file":"docs/advanced/extensions.md","line":18,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 585: if \"timeout\" not in request.extensions:","file":"httpx/_client.py","line":585,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 591: request.extensions = dict(**request.extensions, timeout=timeout.as_dict())","file":"httpx/_client.py","line":591,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Wie wird geprüft, ob ein Request-Body mit einem Generator korrekt als iterierbarer Stream verarbeitet wird?","query":"request stream generator","file":"tests/test_content.py","symbol":"test_iterator_content","line":94,"lang":"de","candidates":[{"text":"File: docs/advanced/clients.md\nLine 236: If you need to monitor upload progress of large responses, you can use request content generator streaming.","file":"docs/advanced/clients.md","line":236,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Je cherche comment récupérer le message texte associé à un code de réponse HTTP. Peux-tu me montrer la logique qui tente d'extraire une extension spécifique ou qui utilise un dictionnaire de codes par défaut ?","query":"http status message","file":"httpx/_models.py","symbol":"reason_phrase","line":620,"lang":"fr","candidates":[{"text":"File: docs/quickstart.md\nLine 290: raise HTTPStatusError(message, response=self)","file":"docs/quickstart.md","line":290,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 829: raise HTTPStatusError(message, request=request, response=self)","file":"httpx/_models.py","line":829,"lexical":0.55,"target":true}]}
{"site":"project_search","repo":"httpx","task":"how does the HTTP transport stream response data in the iterator?","query":"stream iterator","file":"httpx/_transports/default.py","symbol":"__iter__","line":125,"lang":"en","candidates":[{"text":"File: httpx/_content.py\nLine 42: class IteratorByteStream(SyncByteStream):","file":"httpx/_content.py","line":42,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_content.py\nLine 127: return headers, IteratorByteStream(content) # type: ignore","file":"httpx/_content.py","line":127,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 944: raise RuntimeError(\"Attempted to call a sync iterator on an async stream.\")","file":"httpx/_models.py","line":944,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1048: raise RuntimeError(\"Attempted to call an async iterator on a sync stream.\")","file":"httpx/_models.py","line":1048,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 100: def test_stream_iterator(server):","file":"tests/client/test_client.py","line":100,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 356: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/client/test_redirects.py","line":356,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 103: def streaming_body() -> typing.Iterator[bytes]: # pragma: no cover","file":"tests/models/test_requests.py","line":103,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 128: def streaming_body(data: bytes) -> typing.Iterator[bytes]:","file":"tests/models/test_requests.py","line":128,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 17: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":17,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 417: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":417,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 560: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":560,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"在获取 URL 查询参数的原始字节表示时,如果查询字符串包含非 ASCII 字符,目前直接使用 ASCII 编码会导致报错,应该如何处理编码问题以确保鲁棒性?","query":"URL query bytes","file":"httpx/_urls.py","symbol":"query","line":258,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 521: * Cleaned up expected behaviour for bytes vs str in URL components. `url.userinfo` and `url.query` are not URL escaped, and so return bytes. (Pull #1285)","file":"CHANGELOG.md","line":521,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 68: * `url.raw_path` is raw bytes of both the path and query, without URL escaping.","file":"httpx/_urls.py","line":68,"lexical":0.65,"target":true},{"text":"File: httpx/_urls.py\nLine 72: * `url.query` is raw bytes, without URL escaping. A URL query string portion can","file":"httpx/_urls.py","line":72,"lexical":0.65,"target":false},{"text":"File: httpx/_urls.py\nLine 260: The URL query string, as raw bytes, excluding the leading b\"?\".","file":"httpx/_urls.py","line":260,"lexical":0.65,"target":false},{"text":"File: httpx/_urls.py\nLine 285: The complete URL path and query string as raw bytes.","file":"httpx/_urls.py","line":285,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"この非同期ジェネレータは、内部のHTTPコアストリームからバイトデータを逐次取得します。これは非同期コンテキストマネージャーを使って例外をマッピングし、各チャンクをそのまま返すために使われます。","query":"async stream iterator","file":"httpx/_transports/default.py","symbol":"__aiter__","line":269,"lang":"ja","candidates":[{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 944: raise RuntimeError(\"Attempted to call a sync iterator on an async stream.\")","file":"httpx/_models.py","line":944,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1048: raise RuntimeError(\"Attempted to call an async iterator on a sync stream.\")","file":"httpx/_models.py","line":1048,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Ich habe ein Problem mit dem Umleitungsverhalten des HTTP-Clients in Verbindung mit Cookies. Bitte prüfe, ob die Session-Cookies nach dem Login korrekt gesetzt werden und ob sie nach dem Logout ordnungsgemäß gelöscht (abgelaufen) werden, sodass der Client wieder als nicht eingeloggt gilt. Der aktuelle Testfall überprüft den Zustand vor dem Login, nach dem Login und nach dem Logout.","query":"redirect cookie session","file":"tests/client/test_redirects.py","symbol":"test_redirect_cookie_behavior","line":403,"lang":"de","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 405: transport=httpx.MockTransport(cookie_sessions), follow_redirects=True","file":"tests/client/test_redirects.py","line":405,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 413: # Login redirects to the homepage, setting a session cookie.","file":"tests/client/test_redirects.py","line":413,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 423: # Logout redirects to the homepage, expiring the session cookie.","file":"tests/client/test_redirects.py","line":423,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"帮我找一下处理表单数据编码的测试用例。我想确认一下发出的 POST 请求是否会自动设置正确的 Content-Type 头部。","query":"url encoded test","file":"tests/models/test_requests.py","symbol":"test_url_encoded_data","line":52,"lang":"zh","candidates":[{"text":"File: tests/client/test_client.py\nLine 222: def test_merge_relative_url_with_encoded_slashes():","file":"tests/client/test_client.py","line":222,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 52: def test_url_encoded_data():","file":"tests/models/test_requests.py","line":52,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 627: def test_url_copywith_urlencoded_path():","file":"tests/models/test_url.py","line":627,"lexical":0.65,"target":false},{"text":"File: tests/test_asgi.py\nLine 104: async def test_asgi_urlencoded_path():","file":"tests/test_asgi.py","line":104,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 184: async def test_urlencoded_content():","file":"tests/test_content.py","line":184,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 202: async def test_urlencoded_boolean():","file":"tests/test_content.py","line":202,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 220: async def test_urlencoded_none():","file":"tests/test_content.py","line":220,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 238: async def test_urlencoded_list():","file":"tests/test_content.py","line":238,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Wie greife ich auf einen einzelnen Header-Wert zu, wobei mehrere Werte mit demselben Schlüssel zu einer kommaseparierten Liste zusammengefasst werden?","query":"get header value","file":"httpx/_models.py","symbol":"__getitem__","line":284,"lang":"de","candidates":[{"text":"File: docs/advanced/clients.md\nLine 96: - For headers, query parameters and cookies, the values are combined together. For example:","file":"docs/advanced/clients.md","line":96,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_auth.py\nLine 301: return \"Digest \" + self._get_header_value(format_args)","file":"httpx/_auth.py","line":301,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_auth.py\nLine 311: def _get_header_value(self, header_fields: dict[str, bytes]) -> str:","file":"httpx/_auth.py","line":311,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 706: values = self.headers.get_list(\"content-encoding\", split_commas=True)","file":"httpx/_models.py","line":706,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/conftest.py\nLine 166: for name, value in scope.get(\"headers\", [])","file":"tests/conftest.py","line":166,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"비동기 스트림을 닫을 때 내부 하위 스트림의 종료 메서드가 호출되지 않거나 체크되지 않는 문제가 발생할 수 있습니다. 자원을 안전하게 해제하기 위해 내부 스트림의 비동기 종료 로직이 포함되어 있는지 확인해 주세요.","query":"async close stream","file":"httpx/_transports/default.py","symbol":"aclose","line":274,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 1003: - Wait for the `asyncio` stream to close when closing a connection. (Pull #494)","file":"CHANGELOG.md","line":1003,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 967: raise RuntimeError(\"Attempted to call a sync close on an async stream.\")","file":"httpx/_models.py","line":967,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1071: raise RuntimeError(\"Attempted to call an async close on a sync stream.\")","file":"httpx/_models.py","line":1071,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找验证响应内容按指定长度分块迭代的测试用例","query":"iter_text chunk_size","file":"tests/models/test_responses.py","symbol":"test_iter_text_with_chunk_size","line":612,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 433: * Add `chunk_size` parameter to `iter_raw()`, `iter_bytes()`, `iter_text()`. (Pull #1277)","file":"CHANGELOG.md","line":433,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 78: * `def .iter_text([chunk_size])` - **text iterator**","file":"docs/api.md","line":78,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 85: * `def .aiter_text([chunk_size])` - **async text iterator**","file":"docs/api.md","line":85,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 907: def iter_text(self, chunk_size: int | None = None) -> typing.Iterator[str]:","file":"httpx/_models.py","line":907,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 612: def test_iter_text_with_chunk_size():","file":"tests/models/test_responses.py","line":612,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_responses.py\nLine 614: parts = list(response.iter_text(chunk_size=5))","file":"tests/models/test_responses.py","line":614,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 618: parts = list(response.iter_text(chunk_size=7))","file":"tests/models/test_responses.py","line":618,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 622: parts = list(response.iter_text(chunk_size=7))","file":"tests/models/test_responses.py","line":622,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 626: parts = list(response.iter_text(chunk_size=13))","file":"tests/models/test_responses.py","line":626,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 630: parts = list(response.iter_text(chunk_size=20))","file":"tests/models/test_responses.py","line":630,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 648: async def test_aiter_text_with_chunk_size():","file":"tests/models/test_responses.py","line":648,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 650: parts = [part async for part in response.aiter_text(chunk_size=5)]","file":"tests/models/test_responses.py","line":650,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 654: parts = [part async for part in response.aiter_text(chunk_size=13)]","file":"tests/models/test_responses.py","line":654,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 658: parts = [part async for part in response.aiter_text(chunk_size=20)]","file":"tests/models/test_responses.py","line":658,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"inicializar o stream do httpcore","query":"init httpcore stream","file":"httpx/_transports/default.py","symbol":"__init__","line":122,"lang":"pt","candidates":[{"text":"File: httpx/_transports/default.py\nLine 122: def __init__(self, httpcore_stream: typing.Iterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":122,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"출력 요청에 사용할 최종 헤더를 생성하기 위해 인스턴스 헤더와 요청 헤더를 병합하는 메서드를 찾아줘.","query":"merge headers","file":"httpx/_client.py","symbol":"_merge_headers","line":424,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 612: * `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`","file":"CHANGELOG.md","line":612,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 367: headers = self._merge_headers(headers)","file":"httpx/_client.py","line":367,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_client.py\nLine 424: def _merge_headers(self, headers: HeaderTypes | None = None) -> HeaderTypes | None:","file":"httpx/_client.py","line":424,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 426: Merge a headers argument together with any headers on the client,","file":"httpx/_client.py","line":426,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 429: merged_headers = Headers(self.headers)","file":"httpx/_client.py","line":429,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 430: merged_headers.update(headers)","file":"httpx/_client.py","line":430,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 431: return merged_headers","file":"httpx/_client.py","line":431,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_headers.py\nLine 68: def test_header_merge_conflicting_headers():","file":"tests/client/test_headers.py","line":68,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"mostre como obter os nomes das chaves de uma query string","query":"query params keys","file":"httpx/_urls.py","symbol":"keys","line":463,"lang":"pt","candidates":[{"text":"File: httpx/_urls.py\nLine 264: the keys and values into a QueryParams instance.","file":"httpx/_urls.py","line":264,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 465: Return all the keys in the query params.","file":"httpx/_urls.py","line":465,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 500: Return all items in the query params. Allow duplicate keys to occur.","file":"httpx/_urls.py","line":500,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estou tentando simular uma chamada de API nos testes para verificar se os metadados estão sendo capturados. Onde eu encontro a função que registra o cabeçalho da requisição dentro da lista de eventos durante o ciclo de vida do cliente?","query":"request event headers","file":"tests/client/test_event_hooks.py","symbol":"on_request","line":182,"lang":"pt","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 20: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":20,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 71: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":71,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 126: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":126,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 183: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":183,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"trouve la logique de gestion des échanges d'authentification par générateur","query":"auth generator flow","file":"httpx/_auth.py","symbol":"auth_flow","line":38,"lang":"fr","candidates":[{"text":"File: httpx/_auth.py\nLine 38: def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:","file":"httpx/_auth.py","line":38,"lexical":0.65,"target":true},{"text":"File: httpx/_auth.py\nLine 122: def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:","file":"httpx/_auth.py","line":122,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 135: def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:","file":"httpx/_auth.py","line":135,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 157: def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:","file":"httpx/_auth.py","line":157,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 193: def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]:","file":"httpx/_auth.py","line":193,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Error al manejar las credenciales de autenticación básica cuando se pasan como par de usuario y contraseña para generar el encabezado de autorización.","query":"basic auth header","file":"httpx/_auth.py","symbol":"BasicAuth","line":126,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 1016: - Username and password are no longer included in the `Host` header when basic authentication","file":"CHANGELOG.md","line":1016,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 19: HTTP basic authentication is an unencrypted authentication scheme that uses a simple encoding of the username and password in the request `Authorization` header. Since it is unencrypted it should typically only be used over `https`, although this is not st…","file":"docs/advanced/authentication.md","line":19,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 163: # Build a basic auth header with credentials from the netrc file.","file":"httpx/_auth.py","line":163,"lexical":0.65,"target":true},{"text":"File: tests/test_auth.py\nLine 18: # The initial request should include a basic auth header.","file":"tests/test_auth.py","line":18,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 21: assert request.headers[\"Authorization\"].startswith(\"Basic\")","file":"tests/test_auth.py","line":21,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找验证写入超时异常的测试逻辑","query":"httpx write timeout","file":"tests/test_timeouts.py","symbol":"test_write_timeout","line":16,"lang":"zh","candidates":[{"text":"File: docs/advanced/transports.md\nLine 17: … Requests will be retried the given number of times in case an `httpx.ConnectError` or an `httpx.ConnectTimeout` occurs, allowing smoother operation under flaky networks. If you need other forms of retry behaviors, such as handling read/write errors or rea…","file":"docs/advanced/transports.md","line":17,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/exceptions.md\nLine 60: ::: httpx.WriteTimeout","file":"docs/exceptions.md","line":60,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_config.py\nLine 109: timeout = httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=5.0)","file":"tests/test_config.py","line":109,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_timeouts.py\nLine 17: timeout = httpx.Timeout(None, write=1e-6)","file":"tests/test_timeouts.py","line":17,"lexical":0.65,"target":true},{"text":"File: tests/test_timeouts.py\nLine 20: with pytest.raises(httpx.WriteTimeout):","file":"tests/test_timeouts.py","line":20,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Cómo obtengo el nombre de dominio normalizado y decodificado de una URL?","query":"url host decode","file":"httpx/_urls.py","symbol":"host","line":169,"lang":"es","candidates":[{"text":"File: httpx/_client.py\nLine 559: headers[\"Host\"] = url.netloc.decode(\"ascii\")","file":"httpx/_client.py","line":559,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_headers.py\nLine 247: assert headers[\"Host\"] == request.url.netloc.decode(\"ascii\")","file":"tests/client/test_headers.py","line":247,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_main.py\nLine 130: f\"Host: {server.url.netloc.decode('ascii')}\",","file":"tests/test_main.py","line":130,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_main.py\nLine 155: f\"Host: {server.url.netloc.decode('ascii')}\",","file":"tests/test_main.py","line":155,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estou tentando customizar o tratamento de erros de rede. Onde está definido o construtor que vincula o objeto de requisição e a resposta quando ocorre uma falha de comunicação?","query":"request response exception","file":"httpx/_exceptions.py","symbol":"__init__","line":265,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 580: … on invalid URLs, rather than exposing the underlying `rfc3986` exception. If a redirect response includes an invalid 'Location' header, then a `RemoteProtocolError` exception is raised, which will be associated with the request that caused it. (Pull #1163…","file":"CHANGELOG.md","line":580,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 1087: - Create exception base class `HTTPError` with `request` and `response` properties. (Pull #162)","file":"CHANGELOG.md","line":1087,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 512: These exceptions include both a `.request` and a `.response` attribute.","file":"docs/quickstart.md","line":512,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Verify that a POST request correctly follows a temporary redirection status code and updates the final URL and history count accordingly.","query":"follow 302 redirect","file":"tests/client/test_redirects.py","symbol":"test_redirect_302","line":124,"lang":"en","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 126: response = client.post(\"https://example.org/redirect_302\", follow_redirects=True)","file":"tests/client/test_redirects.py","line":126,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 174: response = client.head(\"https://example.org/redirect_302\", follow_redirects=True)","file":"tests/client/test_redirects.py","line":174,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"zeige logik zur ermittlung der zieladresse bei weiterleitungen","query":"redirect location header","file":"httpx/_client.py","symbol":"_redirect_url","line":517,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 580: …, rather than exposing the underlying `rfc3986` exception. If a redirect response includes an invalid 'Location' header, then a `RemoteProtocolError` exception is raised, which will be associated with the request that caused it. (Pull #1163)","file":"CHANGELOG.md","line":580,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 826: * Handle redirect with malformed Location headers missing host. (Pull #774)","file":"CHANGELOG.md","line":826,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 811: \"Redirect location: '{0.headers[location]}'\\n\"","file":"httpx/_models.py","line":811,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 64: headers = {\"location\": \"/redirect_loop\"}","file":"tests/client/test_redirects.py","line":64,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 82: headers = {\"location\": \"/redirect_body_target\"}","file":"tests/client/test_redirects.py","line":82,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 87: headers = {\"location\": \"/redirect_body_target\"}","file":"tests/client/test_redirects.py","line":87,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"find error when accessing stream before reading","query":"request stream read","file":"httpx/_exceptions.py","symbol":"RequestNotRead","line":351,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 417: * The `request.content` attribute is now always available except for streaming content, which requires an explicit `.read()`. (Pull #1583)","file":"CHANGELOG.md","line":417,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 206: The `\"network_stream\"` extension allows developers to handle HTTP `CONNECT` and `Upgrade` requests, by providing an API that steps outside the standard request/response model, and can directly read or write to the network.","file":"docs/advanced/extensions.md","line":206,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_exceptions.py\nLine 318: \"already been streamed. For requests, this could be due to passing \"","file":"httpx/_exceptions.py","line":318,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_exceptions.py\nLine 329: Attempted to read or stream response content, but the request has been","file":"httpx/_exceptions.py","line":329,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_exceptions.py\nLine 351: class RequestNotRead(StreamError):","file":"httpx/_exceptions.py","line":351,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_exceptions.py\nLine 353: Attempted to access streaming request content, without having called `read()`.","file":"httpx/_exceptions.py","line":353,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 476: # If a streaming request has been read entirely into memory, then","file":"httpx/_models.py","line":476,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 490: # If a streaming request has been read entirely into memory, then","file":"httpx/_models.py","line":490,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/base.py\nLine 36: `response.stream.read()`, or else the `handle_request` call should","file":"httpx/_transports/base.py","line":36,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 79: # Ensure a request may still be streamed if it has been read.","file":"tests/models/test_requests.py","line":79,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 91: # Ensure a request may still be streamed if it has been read.","file":"tests/models/test_requests.py","line":91,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP通信の基盤となる接続設定の初期化処理を確認したいです。SSL証明書の検証方法やプロキシ、接続制限などのパラメータがどのように処理されているか教えてください。","query":"HTTP connection init","file":"httpx/_transports/default.py","symbol":"__init__","line":136,"lang":"ja","candidates":[{"text":"File: docs/advanced/extensions.md\nLine 91: * `\"http2.send_connection_init\"`","file":"docs/advanced/extensions.md","line":91,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/proxies.md\nLine 34: This is because HTTP proxying requires initiating a connection with the proxy server. While it's possible that your proxy supports doing it via HTTPS, most proxies only support doing it via HTTP.","file":"docs/advanced/proxies.md","line":34,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Comment vérifier que le décodeur texte gère correctement les réponses HTTP vides ?","query":"test empty response","file":"tests/test_decoders.py","symbol":"test_text_decoder_empty_cases","line":283,"lang":"fr","candidates":[{"text":"File: tests/models/test_responses.py\nLine 553: def test_iter_bytes_with_empty_response():","file":"tests/models/test_responses.py","line":553,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 419: async def test_response_empty_content():","file":"tests/test_content.py","line":419,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"httpxクライアントのクッキー設定と値の検証を行うテストケースを作成する","query":"test client cookies","file":"tests/client/test_cookies.py","symbol":"test_set_cookie_with_cookies_model","line":123,"lang":"ja","candidates":[{"text":"File: tests/client/test_cookies.py\nLine 86: def test_setting_client_cookies_to_cookiejar() -> None:","file":"tests/client/test_cookies.py","line":86,"lexical":0.65,"target":true},{"text":"File: tests/client/test_properties.py\nLine 32: def test_client_cookies():","file":"tests/client/test_properties.py","line":32,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"cria um gerador de bytes de teste","query":"test content generator","file":"tests/models/test_requests.py","symbol":"content","line":215,"lang":"pt","candidates":[{"text":"File: tests/models/test_requests.py\nLine 41: def test_generator_with_content_length_header():","file":"tests/models/test_requests.py","line":41,"lexical":0.65,"target":true},{"text":"File: tests/models/test_requests.py\nLine 214: def test_request_generator_content_picklable():","file":"tests/models/test_requests.py","line":214,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 949: def test_generator_with_content_length_header():","file":"tests/models/test_responses.py","line":949,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"encontra a inicialização que armazena o iterador assíncrono de bytes para o fluxo de dados","query":"async iterable stream","file":"httpx/_transports/default.py","symbol":"__init__","line":266,"lang":"pt","candidates":[{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 487: assert isinstance(self.stream, typing.AsyncIterable)","file":"httpx/_models.py","line":487,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_transports/default.py\nLine 396: assert isinstance(resp.stream, typing.AsyncIterable)","file":"httpx/_transports/default.py","line":396,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 96: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/models/test_requests.py","line":96,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 30: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":30,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 43: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":43,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 57: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":57,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 82: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":82,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 101: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":101,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 118: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":118,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 137: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":137,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 154: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 169: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 187: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":187,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 205: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":205,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 223: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":223,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 241: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":241,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 266: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 305: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":305,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 349: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":349,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 376: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":376,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 422: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":422,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 436: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":436,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 454: assert not isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":454,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 473: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":473,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"测试httpx请求字节内容和流处理","query":"httpx request bytes stream","file":"tests/test_content.py","symbol":"test_bytes_content","line":27,"lang":"zh","candidates":[{"text":"File: tests/client/test_auth.py\nLine 690: assert isinstance(request.stream, httpx.AsyncByteStream)","file":"tests/client/test_auth.py","line":690,"lexical":0.5,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 347: assert isinstance(request.stream, httpx.SyncByteStream)","file":"tests/client/test_redirects.py","line":347,"lexical":0.5,"target":false},{"text":"File: tests/test_content.py\nLine 15: assert isinstance(request.stream, httpx.SyncByteStream)","file":"tests/test_content.py","line":15,"lexical":0.5,"target":true},{"text":"File: tests/test_content.py\nLine 16: assert isinstance(request.stream, httpx.AsyncByteStream)","file":"tests/test_content.py","line":16,"lexical":0.5,"target":false}]}
{"site":"project_search","repo":"httpx","task":"The asynchronous generator used in decoding tests is returning a specific sequence of hardcoded byte chunks. I need to verify if these exact byte patterns are intended to represent the edge cases being tested in the decoder suite.","query":"async iterator bytes","file":"tests/test_decoders.py","symbol":"iterator","line":268,"lang":"en","candidates":[{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 84: * `def .aiter_bytes([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 175: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_client.py","line":175,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 38: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":38,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 75: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":75,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 102: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":102,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 984: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":984,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1039: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":1039,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 298: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_multipart.py","line":298,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 59: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/asgi.py","line":59,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 269: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/default.py","line":269,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 107: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_types.py","line":107,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 94: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":94,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 348: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":348,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 125: async def hello_world() -> typing.AsyncIterator[bytes]: # pragma: no cover","file":"tests/client/test_client.py","line":125,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 131: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 467: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":467,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 190: async def compress(body: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":190,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/test_decoders.py\nLine 245: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":245,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 268: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":268,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Genera un iterador de bytes que devuelva una cadena de prueba estática.","query":"test bytes iterator","file":"tests/models/test_requests.py","symbol":"content","line":42,"lang":"es","candidates":[{"text":"File: httpx/_content.py\nLine 42: class IteratorByteStream(SyncByteStream):","file":"httpx/_content.py","line":42,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 127: return headers, IteratorByteStream(content) # type: ignore","file":"httpx/_content.py","line":127,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找构造基础认证请求头的逻辑","query":"basic auth header","file":"httpx/_auth.py","symbol":"_build_auth_header","line":139,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 1016: - Username and password are no longer included in the `Host` header when basic authentication","file":"CHANGELOG.md","line":1016,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 19: HTTP basic authentication is an unencrypted authentication scheme that uses a simple encoding of the username and password in the request `Authorization` header. Since it is unencrypted it should typically only be used over `https`, although this is not st…","file":"docs/advanced/authentication.md","line":19,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 163: # Build a basic auth header with credentials from the netrc file.","file":"httpx/_auth.py","line":163,"lexical":0.65,"target":true},{"text":"File: tests/test_auth.py\nLine 18: # The initial request should include a basic auth header.","file":"tests/test_auth.py","line":18,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 21: assert request.headers[\"Authorization\"].startswith(\"Basic\")","file":"tests/test_auth.py","line":21,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"httpx를 사용하여 잘못된 리디렉션 경로가 요청될 때 RemoteProtocolError가 발생하는지 검증하는 테스트 코드 작성","query":"invalid redirect test","file":"tests/client/test_redirects.py","symbol":"test_invalid_redirect","line":203,"lang":"ko","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 203: def test_invalid_redirect():","file":"tests/client/test_redirects.py","line":203,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 442: async def test_async_invalid_redirect():","file":"tests/client/test_redirects.py","line":442,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"gib den inhalt als textzeichenfolge zurück und dekodiere ihn bei bedarf","query":"decode content text","file":"httpx/_models.py","symbol":"text","line":642,"lang":"de","candidates":[{"text":"File: docs/advanced/text-encodings.md\nLine 3: By default `httpx` will use `\"charset\"` information included in the response `Content-Type` header to determine how the response bytes should be decoded into text.","file":"docs/advanced/text-encodings.md","line":3,"lexical":0.65,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 19: print(response.text) # The text will either be decoded with the Content-Type","file":"docs/advanced/text-encodings.md","line":19,"lexical":0.65,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 37: print(response.text) # The text will either be decoded with the Content-Type","file":"docs/advanced/text-encodings.md","line":37,"lexical":0.65,"target":false},{"text":"File: docs/compatibility.md\nLine 143: * `.iter_text()` - Instead of `response.iter_content(decode_unicode=True)`","file":"docs/compatibility.md","line":143,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 649: self._text = \"\".join([decoder.decode(self.content), decoder.flush()])","file":"httpx/_models.py","line":649,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 917: text_content = decoder.decode(byte_content)","file":"httpx/_models.py","line":917,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 918: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":918,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 920: text_content = decoder.flush()","file":"httpx/_models.py","line":920,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 921: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":921,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1019: text_content = decoder.decode(byte_content)","file":"httpx/_models.py","line":1019,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1020: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":1020,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1022: text_content = decoder.flush()","file":"httpx/_models.py","line":1022,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1023: for chunk in chunker.decode(text_content):","file":"httpx/_models.py","line":1023,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"중복 리디렉션이 20번을 초과할 때 TooManyRedirects 예외가 발생해야 합니다. 예외가 올바르게 던져지는지 확인하기 위한 테스트를 작성해 주세요.","query":"test too many redirects","file":"tests/client/test_redirects.py","symbol":"test_sync_too_many_redirects","line":252,"lang":"ko","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 244: async def test_async_too_many_redirects():","file":"tests/client/test_redirects.py","line":244,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 246: with pytest.raises(httpx.TooManyRedirects):","file":"tests/client/test_redirects.py","line":246,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 252: def test_sync_too_many_redirects():","file":"tests/client/test_redirects.py","line":252,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 254: with pytest.raises(httpx.TooManyRedirects):","file":"tests/client/test_redirects.py","line":254,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 262: with pytest.raises(httpx.TooManyRedirects):","file":"tests/client/test_redirects.py","line":262,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Je suis en train de vérifier si les métadonnées de la réponse sont bien capturées pendant les tests. Peux-tu me montrer la fonction qui ajoute les en-têtes de la réponse à la liste des événements ?","query":"append response headers","file":"tests/client/test_event_hooks.py","symbol":"on_response","line":185,"lang":"fr","candidates":[{"text":"File: tests/client/test_auth.py\nLine 108: nonces.append(response.headers[\"www-authenticate\"])","file":"tests/client/test_auth.py","line":108,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 23: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":23,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 74: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":74,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 129: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":129,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 186: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":186,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Il semble y avoir un problème dans les tests d'authentification : la fonction qui simule la récupération du jeton de session renvoie toujours la même valeur statique, peu importe le compteur ou les données fournies en entrée, ce qui empêche de tester correctement la gestion de l'unicité des jetons.","query":"mock client nonce","file":"tests/test_auth.py","symbol":"mock_get_client_nonce","line":194,"lang":"fr","candidates":[{"text":"File: tests/test_auth.py\nLine 194: def mock_get_client_nonce(nonce_count: int, nonce: bytes) -> bytes:","file":"tests/test_auth.py","line":194,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/test_auth.py\nLine 198: monkeypatch.setattr(auth, \"_get_client_nonce\", mock_get_client_nonce)","file":"tests/test_auth.py","line":198,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_auth.py\nLine 254: def mock_get_client_nonce(nonce_count: int, nonce: bytes) -> bytes:","file":"tests/test_auth.py","line":254,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_auth.py\nLine 258: monkeypatch.setattr(auth, \"_get_client_nonce\", mock_get_client_nonce)","file":"tests/test_auth.py","line":258,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"認証フローでレスポンスボディの読み取りが有効な場合のテストコードはどこにありますか?","query":"auth response body","file":"tests/client/test_auth.py","symbol":"test_async_auth_reads_response_body","line":710,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 798: * Support making response body available to auth classes with `.requires_response_body`. (Pull #803)","file":"CHANGELOG.md","line":798,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 115: class ResponseBodyAuth(httpx.Auth):","file":"tests/client/test_auth.py","line":115,"lexical":0.65,"target":true},{"text":"File: tests/client/test_auth.py\nLine 710: async def test_async_auth_reads_response_body() -> None:","file":"tests/client/test_auth.py","line":710,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 712: Test that we can read the response body in an auth flow if `requires_response_body`","file":"tests/client/test_auth.py","line":712,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 716: auth = ResponseBodyAuth(\"xyz\")","file":"tests/client/test_auth.py","line":716,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 726: def test_sync_auth_reads_response_body() -> None:","file":"tests/client/test_auth.py","line":726,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 728: Test that we can read the response body in an auth flow if `requires_response_body`","file":"tests/client/test_auth.py","line":728,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 732: auth = ResponseBodyAuth(\"xyz\")","file":"tests/client/test_auth.py","line":732,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"WSGITransport経由でサーバープロトコルがHTTP/1.1になっていることを確認するテストを書いてください。","query":"wsgi server protocol","file":"tests/test_wsgi.py","symbol":"test_wsgi_server_protocol","line":188,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 128: * Ensure all `WSGITransport` environs have a `SERVER_PROTOCOL`. (#2708)","file":"CHANGELOG.md","line":128,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_wsgi.py\nLine 188: def test_wsgi_server_protocol():","file":"tests/test_wsgi.py","line":188,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Estoy intentando entender cómo se gestiona el envío de peticiones y el manejo de redirecciones desde la instancia principal. ¿Podrías explicarme cómo se procesan los parámetros de autenticación y el flujo de seguimiento de redirecciones en este método?","query":"send request redirects","file":"httpx/_client.py","symbol":"send","line":879,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 615: * `.send_handling_redirects()`, `.send_handling_auth()`, `.send_single_request()`","file":"CHANGELOG.md","line":615,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 56: response = session.send(request, allow_redirects=False)","file":"docs/compatibility.md","line":56,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 825: return self.send(request, auth=auth, follow_redirects=follow_redirects)","file":"httpx/_client.py","line":825,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 1540: return await self.send(request, auth=auth, follow_redirects=follow_redirects)","file":"httpx/_client.py","line":1540,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 143: response = client.send(request, follow_redirects=False)","file":"tests/client/test_redirects.py","line":143,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 148: response = client.send(response.next_request, follow_redirects=False)","file":"tests/client/test_redirects.py","line":148,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 158: response = await client.send(request, follow_redirects=False)","file":"tests/client/test_redirects.py","line":158,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 163: response = await client.send(response.next_request, follow_redirects=False)","file":"tests/client/test_redirects.py","line":163,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"El tiempo de respuesta de la petición no se actualiza correctamente al cerrar el flujo de bytes de la respuesta.","query":"response elapsed close","file":"httpx/_client.py","symbol":"BoundSyncStream","line":139,"lang":"es","candidates":[{"text":"File: docs/api.md\nLine 70: * The amount of time elapsed between sending the request and calling `close()` on the corresponding response received for that request.","file":"docs/api.md","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 142: ensures the `response.elapsed` is set once the response is closed.","file":"httpx/_client.py","line":142,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 165: ensures the `response.elapsed` is set once the response is closed.","file":"httpx/_client.py","line":165,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"特定のプロトコルに対してマウントされたトランスポートが、デフォルトのトランスポート設定と共存して正しくルーティングされるか確認するテストが不足している、あるいは挙動が不安定です。","query":"client mounts transport","file":"tests/client/test_client.py","symbol":"test_mounted_transport","line":377,"lang":"ja","candidates":[{"text":"File: docs/compatibility.md\nLine 164: When using `httpx.Client(mounts={...})` to map to a selection of different transports, we use full URL schemes, such as `mounts={\"http://\": ..., \"https://\": ...}`.","file":"docs/compatibility.md","line":164,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 306: async with httpx.AsyncClient(transport=transport, mounts=mounts) as client:","file":"tests/client/test_async_client.py","line":306,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 286: with httpx.Client(transport=transport, mounts={\"http://www.example.org\": mounted}):","file":"tests/client/test_client.py","line":286,"lexical":0.65,"target":true},{"text":"File: tests/client/test_client.py\nLine 381: client = httpx.Client(transport=transport, mounts=mounts)","file":"tests/client/test_client.py","line":381,"lexical":0.65,"target":false},{"text":"File: tests/client/test_proxies.py\nLine 107: client = httpx.AsyncClient(mounts={\"https://\": transport})","file":"tests/client/test_proxies.py","line":107,"lexical":0.55,"target":false},{"text":"File: tests/client/test_proxies.py\nLine 117: client = httpx.Client(mounts={\"https://\": transport})","file":"tests/client/test_proxies.py","line":117,"lexical":0.55,"target":false},{"text":"File: tests/client/test_proxies.py\nLine 262: client = httpx.Client(mounts={\"http://\": proxy_transport})","file":"tests/client/test_proxies.py","line":262,"lexical":0.55,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 요청의 바디를 전부 읽어서 그대로 다시 돌려주는 비동기 함수가 어디 있지?","query":"async echo body","file":"tests/conftest.py","symbol":"echo_body","line":125,"lang":"ko","candidates":[{"text":"File: tests/conftest.py\nLine 125: async def echo_body(scope: Scope, receive: Receive, send: Send) -> None:","file":"tests/conftest.py","line":125,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/test_asgi.py\nLine 35: async def echo_body(scope, receive, send):","file":"tests/test_asgi.py","line":35,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_asgi.py\nLine 85: async with httpx.ASGITransport(app=echo_body) as transport:","file":"tests/test_asgi.py","line":85,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Comprueba que el método de copiado de los encabezados HTTP crea una copia independiente y no comparte la referencia con el original. Verifica que los datos sean iguales pero que los objetos sean distintos.","query":"headers copy test","file":"tests/models/test_headers.py","symbol":"test_copy_headers_method","line":53,"lang":"es","candidates":[{"text":"File: tests/models/test_headers.py\nLine 53: def test_copy_headers_method():","file":"tests/models/test_headers.py","line":53,"lexical":0.65,"target":true},{"text":"File: tests/models/test_headers.py\nLine 60: def test_copy_headers_init():","file":"tests/models/test_headers.py","line":60,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Comment est-ce qu'on déclenche une erreur si la réponse HTTP n'est pas un succès ?","query":"raise status error","file":"httpx/_models.py","symbol":"raise_for_status","line":794,"lang":"fr","candidates":[{"text":"File: CHANGELOG.md\nLine 633: * Added dedicated exception class `httpx.HTTPStatusError` for `.raise_for_status()` exceptions. (Pull #1072)","file":"CHANGELOG.md","line":633,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 23: example, which creates a client instance that always raises `httpx.HTTPStatusError`","file":"docs/advanced/event-hooks.md","line":23,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 290: raise HTTPStatusError(message, response=self)","file":"docs/quickstart.md","line":290,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 511: The `HTTPStatusError` class is raised by `response.raise_for_status()` on responses which are not a 2xx success code.","file":"docs/quickstart.md","line":511,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 796: Raise the `HTTPStatusError` if one occurred.","file":"httpx/_models.py","line":796,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 829: raise HTTPStatusError(message, request=request, response=self)","file":"httpx/_models.py","line":829,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 123: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/client/test_async_client.py","line":123,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 141: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/client/test_client.py","line":141,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 101: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/models/test_responses.py","line":101,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 112: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/models/test_responses.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 124: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/models/test_responses.py","line":124,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 135: with pytest.raises(httpx.HTTPStatusError) as exc_info:","file":"tests/models/test_responses.py","line":135,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"check if the connection is shut down","query":"client state closed","file":"httpx/_client.py","symbol":"is_closed","line":224,"lang":"en","candidates":[{"text":"File: httpx/_client.py\nLine 228: return self._state == ClientState.CLOSED","file":"httpx/_client.py","line":228,"lexical":0.65,"target":true},{"text":"File: httpx/_client.py\nLine 900: if self._state == ClientState.CLOSED:","file":"httpx/_client.py","line":900,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1267: if self._state != ClientState.CLOSED:","file":"httpx/_client.py","line":1267,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1268: self._state = ClientState.CLOSED","file":"httpx/_client.py","line":1268,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1279: ClientState.CLOSED: (","file":"httpx/_client.py","line":1279,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1299: self._state = ClientState.CLOSED","file":"httpx/_client.py","line":1299,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1615: if self._state == ClientState.CLOSED:","file":"httpx/_client.py","line":1615,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1982: if self._state != ClientState.CLOSED:","file":"httpx/_client.py","line":1982,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1983: self._state = ClientState.CLOSED","file":"httpx/_client.py","line":1983,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1994: ClientState.CLOSED: (","file":"httpx/_client.py","line":1994,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 2014: self._state = ClientState.CLOSED","file":"httpx/_client.py","line":2014,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 260: async def test_client_closed_state_using_implicit_open():","file":"tests/client/test_async_client.py","line":260,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 281: async def test_client_closed_state_using_with_block():","file":"tests/client/test_async_client.py","line":281,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 305: def test_client_closed_state_using_implicit_open():","file":"tests/client/test_client.py","line":305,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 326: def test_client_closed_state_using_with_block():","file":"tests/client/test_client.py","line":326,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Je suis en train de travailler sur l'interface en ligne de commande pour l'outil. Peux-tu me montrer comment est générée la première ligne de la réponse HTTP ainsi que la liste des en-têtes textuels ?","query":"format response headers","file":"httpx/_main.py","symbol":"format_response_headers","line":129,"lang":"fr","candidates":[{"text":"File: httpx/_main.py\nLine 129: def format_response_headers(","file":"httpx/_main.py","line":129,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_main.py\nLine 163: http_text = format_response_headers(http_version, status, reason_phrase, headers)","file":"httpx/_main.py","line":163,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"task: fix missing elapsed time assignment in async response close","query":"response elapsed time","file":"httpx/_client.py","symbol":"aclose","line":179,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 534: * Drop `request.timer` attribute, which was being used internally to set `response.elapsed`. (Pull #1249)","file":"CHANGELOG.md","line":534,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 878: - `Response.elapsed` now reflects the entire download time. (Pull #687, #692)","file":"CHANGELOG.md","line":878,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 70: * The amount of time elapsed between sending the request and calling `close()` on the corresponding response received for that request.","file":"docs/api.md","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 158: self._response.elapsed = datetime.timedelta(seconds=elapsed)","file":"httpx/_client.py","line":158,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 181: self._response.elapsed = datetime.timedelta(seconds=elapsed)","file":"httpx/_client.py","line":181,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 21: assert response.elapsed > timedelta(seconds=0)","file":"tests/client/test_async_client.py","line":21,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 30: assert response.elapsed > timedelta(0)","file":"tests/client/test_client.py","line":30,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"クライアント側で設定したヘッダーと、リクエスト時に個別に渡したヘッダーが正しくマージされるかを確認したいです。テストコードの中で、両方の値が最終的なレスポンスに含まれているかチェックしている箇所を探せますか?","query":"header merge test","file":"tests/client/test_headers.py","symbol":"test_header_merge","line":46,"lang":"ja","candidates":[{"text":"File: tests/client/test_headers.py\nLine 46: def test_header_merge():","file":"tests/client/test_headers.py","line":46,"lexical":0.65,"target":true},{"text":"File: tests/client/test_headers.py\nLine 68: def test_header_merge_conflicting_headers():","file":"tests/client/test_headers.py","line":68,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como posso combinar os parâmetros de consulta atuais com um novo conjunto de parâmetros e retornar uma nova URL atualizada, mantendo a cópia adequada do objeto?","query":"merge query params","file":"httpx/_urls.py","symbol":"copy_merge_params","line":351,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 47: * Bugfix: When passing `params={}`, always strictly update rather than merge with an existing querystring. (#3364)","file":"CHANGELOG.md","line":47,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 400: * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.updat…","file":"CHANGELOG.md","line":400,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 612: * `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`","file":"CHANGELOG.md","line":612,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 899: - Query Params on the URL string are merged with any `params=...` argument. (Pull #653)","file":"CHANGELOG.md","line":899,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 369: params = self._merge_queryparams(params)","file":"httpx/_client.py","line":369,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 433: def _merge_queryparams(","file":"httpx/_client.py","line":433,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 437: Merge a queryparams argument together with any queryparams on the client,","file":"httpx/_client.py","line":437,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 441: merged_queryparams = QueryParams(self.params)","file":"httpx/_client.py","line":441,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 442: return merged_queryparams.merge(params)","file":"httpx/_client.py","line":442,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 351: def copy_merge_params(self, params: QueryParamTypes) -> URL:","file":"httpx/_urls.py","line":351,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 582: def merge(self, params: QueryParamTypes | None = None) -> QueryParams:","file":"httpx/_urls.py","line":582,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"verify that duplicating a collection of metadata keys and values via the constructor preserves equality","query":"headers copy test","file":"tests/models/test_headers.py","symbol":"test_copy_headers_init","line":60,"lang":"en","candidates":[{"text":"File: tests/models/test_headers.py\nLine 53: def test_copy_headers_method():","file":"tests/models/test_headers.py","line":53,"lexical":0.65,"target":true},{"text":"File: tests/models/test_headers.py\nLine 60: def test_copy_headers_init():","file":"tests/models/test_headers.py","line":60,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"コンテキストマネージャを抜ける際に、終了イベントが正しくリストに記録されていない、あるいは記録のタイミングに問題がある可能性があります。終了時に自身の名前を含むログを追加する挙動を確認してください。","query":"append __exit__","file":"tests/client/test_client.py","symbol":"__exit__","line":280,"lang":"ja","candidates":[{"text":"File: tests/client/test_client.py\nLine 250: self.events.append(\"transport.__exit__\")","file":"tests/client/test_client.py","line":250,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/client/test_client.py\nLine 282: self.events.append(f\"{self.name}.__exit__\")","file":"tests/client/test_client.py","line":282,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"busca la lógica para identificar si un código de estado indica un fallo en el servidor","query":"is server error","file":"httpx/_models.py","symbol":"is_server_error","line":758,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 329: * Response instances now include `.is_informational`, `.is_success`, `.is_redirect`, `.is_client_error`, and `.is_server_error`","file":"CHANGELOG.md","line":329,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 758: def is_server_error(self) -> bool:","file":"httpx/_models.py","line":758,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 762: return codes.is_server_error(self.status_code)","file":"httpx/_models.py","line":762,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_status_codes.py\nLine 74: def is_server_error(cls, value: int) -> bool:","file":"httpx/_status_codes.py","line":74,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 133: assert response.is_server_error","file":"tests/models/test_responses.py","line":133,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como faço para fazer uma requisição HTTP que retorna um fluxo de respostas em vez de carregar tudo na memória?","query":"streaming response","file":"httpx/_api.py","symbol":"stream","line":124,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 573: * If a transport error occurs while streaming the response, raise an `httpx` exception, not the underlying `httpcore` exception. (Pull #1190)","file":"CHANGELOG.md","line":573,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 825: * Fix for streaming a redirect response body with `allow_redirects=False`. (Pull #766)","file":"CHANGELOG.md","line":825,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 870: In particular with streaming responses the `response.read()` method becomes `response.aread()`, and the `response.close()` method becomes `response.aclose()`.","file":"CHANGELOG.md","line":870,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 883: - Switch to `response.aread()` for conditionally reading streaming responses. (Pull #674)","file":"CHANGELOG.md","line":883,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 181: If you need to monitor download progress of large responses, you can use response streaming and inspect the `response.num_bytes_downloaded` property.","file":"docs/advanced/clients.md","line":181,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 236: If you need to monitor upload progress of large responses, you can use request content generator streaming.","file":"docs/advanced/clients.md","line":236,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 67: ### Streaming responses","file":"docs/async.md","line":67,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 78: The async response streaming methods are:","file":"docs/async.md","line":78,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 81: * `Response.aiter_bytes()` - For streaming the response content as bytes.","file":"docs/async.md","line":81,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 82: * `Response.aiter_text()` - For streaming the response content as text.","file":"docs/async.md","line":82,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 83: * `Response.aiter_lines()` - For streaming the response content as lines of text.","file":"docs/async.md","line":83,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 84: * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.","file":"docs/async.md","line":84,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 89: Example in the context of forwarding the response to a streaming web endpoint with [Starlette](https://www.starlette.io):","file":"docs/async.md","line":89,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 94: from starlette.responses import StreamingResponse","file":"docs/async.md","line":94,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 101: return StreamingResponse(r.aiter_text(), background=BackgroundTask(r.aclose))","file":"docs/async.md","line":101,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/async.md\nLine 105: When using this \"manual streaming mode\", it is your duty as a developer to make sure that `Response.aclose()` is called eventually. Failing to do so would leave connections open, most likely resulting in resource leaks down the line.","file":"docs/async.md","line":105,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/compatibility.md\nLine 129: ## Streaming responses","file":"docs/compatibility.md","line":129,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/compatibility.md\nLine 131: …)` interface rather than using `stream=True`. This ensures that streaming responses are always properly closed outside of the stream block, and makes it visually clearer at which points streaming I/O APIs may be used with a response.","file":"docs/compatibility.md","line":131,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/quickstart.md\nLine 339: ## Streaming Responses","file":"docs/quickstart.md","line":339,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/quickstart.md\nLine 341: For large downloads you may want to use streaming responses that do not load the entire response body into memory at once.","file":"docs/quickstart.md","line":341,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/quickstart.md\nLine 378: If you're using streaming responses in any of these ways then the `response.content` and `response.text` attributes will not be available, and will raise errors if accessed. However you can also use the response streaming functionality to conditionally loa…","file":"docs/quickstart.md","line":378,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_api.py\nLine 148: See also: [Streaming Responses][0]","file":"httpx/_api.py","line":148,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_api.py\nLine 150: [0]: /quickstart#streaming-responses","file":"httpx/_api.py","line":150,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 851: See also: [Streaming Responses][0]","file":"httpx/_client.py","line":851,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 853: [0]: /quickstart#streaming-responses","file":"httpx/_client.py","line":853,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1566: See also: [Streaming Responses][0]","file":"httpx/_client.py","line":1566,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1568: [0]: /quickstart#streaming-responses","file":"httpx/_client.py","line":1568,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_exceptions.py\nLine 340: Attempted to access streaming response content, without having called `read()`.","file":"httpx/_exceptions.py","line":340,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_exceptions.py\nLine 345: \"Attempted to access streaming response content,\"","file":"httpx/_exceptions.py","line":345,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 553: # Load the response body, except for streaming content.","file":"httpx/_models.py","line":553,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 332: If any BaseException is raised during streaming the response, then the","file":"tests/client/test_async_client.py","line":332,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 399: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":399,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTP 요청 본문을 만들 때 불리언이나 None 같은 기본 자료형을 특정 문자열 형식으로 변환해주는 로직이 어디에 정의되어 있는지 찾아줘. 특히 불리언 값을 소문자 JSON 스타일로 바꿔주는 부분이 필요해.","query":"primitive to str","file":"httpx/_utils.py","symbol":"primitive_value_to_str","line":15,"lang":"ko","candidates":[{"text":"File: httpx/_content.py\nLine 26: from ._utils import peek_filelike_length, primitive_value_to_str","file":"httpx/_content.py","line":26,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 142: plain_data.extend([(key, primitive_value_to_str(item)) for item in value])","file":"httpx/_content.py","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 144: plain_data.append((key, primitive_value_to_str(value)))","file":"httpx/_content.py","line":144,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 20: primitive_value_to_str,","file":"httpx/_multipart.py","line":20,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 87: value if isinstance(value, bytes) else primitive_value_to_str(value)","file":"httpx/_multipart.py","line":87,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 10: from ._utils import primitive_value_to_str","file":"httpx/_urls.py","line":10,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 459: str(k): [primitive_value_to_str(item) for item in v]","file":"httpx/_urls.py","line":459,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 549: q._dict[str(key)] = [primitive_value_to_str(value)]","file":"httpx/_urls.py","line":549,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 564: q._dict[str(key)] = q.get_list(key) + [primitive_value_to_str(value)]","file":"httpx/_urls.py","line":564,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_utils.py\nLine 15: def primitive_value_to_str(value: PrimitiveData) -> str:","file":"httpx/_utils.py","line":15,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_utils.py\nLine 17: Coerce a primitive data type into a string value.","file":"httpx/_utils.py","line":17,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"mostre a lógica para atualizar os cabeçalhos padrão do cliente","query":"update client headers","file":"httpx/_client.py","symbol":"headers","line":306,"lang":"pt","candidates":[{"text":"File: httpx/_client.py\nLine 315: client_headers.update(headers)","file":"httpx/_client.py","line":315,"lexical":0.65,"target":true},{"text":"File: tests/client/test_headers.py\nLine 94: client.headers.update(","file":"tests/client/test_headers.py","line":94,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我想确认一下在设置了基础地址的情况下,手动构建请求时,相对路径是否能被正确补全。能不能帮我找一下验证这个逻辑的测试用例?","query":"merge relative url","file":"tests/client/test_client.py","symbol":"test_merge_relative_url","line":198,"lang":"zh","candidates":[{"text":"File: httpx/_client.py\nLine 397: if merge_url.is_relative_url:","file":"httpx/_client.py","line":397,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 198: def test_merge_relative_url():","file":"tests/client/test_client.py","line":198,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_client.py\nLine 204: def test_merge_relative_url_with_path():","file":"tests/client/test_client.py","line":204,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 210: def test_merge_relative_url_with_dotted_path():","file":"tests/client/test_client.py","line":210,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 216: def test_merge_relative_url_with_path_including_colon():","file":"tests/client/test_client.py","line":216,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 222: def test_merge_relative_url_with_encoded_slashes():","file":"tests/client/test_client.py","line":222,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"J'ai remarqué un problème avec l'objet qui transforme un itérable de données binaires en flux : lorsqu'on essaie d'itérer sur un générateur qui a déjà été partiellement ou totalement parcouru, une exception est levée au lieu de gérer proprement l'état du flux, ce qui empêche une réutilisation sécurisée de l'objet.","query":"iterator byte stream","file":"httpx/_content.py","symbol":"IteratorByteStream","line":42,"lang":"fr","candidates":[{"text":"File: httpx/_content.py\nLine 42: class IteratorByteStream(SyncByteStream):","file":"httpx/_content.py","line":42,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 127: return headers, IteratorByteStream(content) # type: ignore","file":"httpx/_content.py","line":127,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 356: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/client/test_redirects.py","line":356,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 103: def streaming_body() -> typing.Iterator[bytes]: # pragma: no cover","file":"tests/models/test_requests.py","line":103,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 128: def streaming_body(data: bytes) -> typing.Iterator[bytes]:","file":"tests/models/test_requests.py","line":128,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 17: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":17,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 417: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":417,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 560: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":560,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"suche die methode die den rohen körperinhalt der antwort zurückgibt oder einen fehler wirft wenn dieser noch nicht geladen wurde","query":"response content bytes","file":"httpx/_models.py","symbol":"content","line":636,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 334: * `response.iter_bytes()` no longer raises a ValueError when called on a response with no content. (Pull #1827)","file":"CHANGELOG.md","line":334,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 183: …erly determining download progress, because the total number of bytes returned by `response.content` or `response.iter_content()` will not always correspond with the raw content length of the response if HTTP response compression is being used.","file":"docs/advanced/clients.md","line":183,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 3: By default `httpx` will use `\"charset\"` information included in the response `Content-Type` header to determine how the response bytes should be decoded into text.","file":"docs/advanced/text-encodings.md","line":3,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 81: * `Response.aiter_bytes()` - For streaming the response content as bytes.","file":"docs/async.md","line":81,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 84: * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.","file":"docs/async.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 142: * `.iter_bytes()` - Instead of `response.iter_content()`","file":"docs/compatibility.md","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 32: DEBUG [2024-09-28 17:27:41] httpcore.http11 - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Encoding', b'gzip'), (b'Accept-Ranges', b'bytes'), (b'Age', b'407727'), (b'Cache-Control', b'max-age=604800'), (b'Content-Typ…","file":"docs/logging.md","line":32,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 94: The response content can also be accessed as bytes, for non-text responses:","file":"docs/quickstart.md","line":94,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 369: In some cases you might want to access the raw bytes on the response without applying any HTTP content decoding. In this case any content encoding that the web server has applied such as `gzip`, `deflate`, `brotli`, or `zstd` will","file":"docs/quickstart.md","line":369,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 186: console.print(f\"<{len(response.content)} bytes of binary data>\")","file":"httpx/_main.py","line":186,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 13: from ._content import ByteStream, UnattachedStream, encode_request, encode_response","file":"httpx/_models.py","line":13,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_types.py\nLine 69: ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]","file":"httpx/_types.py","line":69,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 433: async def test_response_bytes_content():","file":"tests/test_content.py","line":433,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Wie wird getestet, ob ein Fehler geworfen wird, wenn man ein Zertifikat ohne den passenden privaten Schlüssel lädt?","query":"ssl cert error","file":"tests/test_config.py","symbol":"test_load_ssl_config_cert_without_key_raises","line":70,"lang":"de","candidates":[{"text":"File: docs/advanced/ssl.md\nLine 9: httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)","file":"docs/advanced/ssl.md","line":9,"lexical":0.65,"target":false},{"text":"File: docs/contributing.md\nLine 223: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate","file":"docs/contributing.md","line":223,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Fehlerbericht: Wenn die Authentifizierung über eine externe Konfigurationsdatei erfolgt, dürfen bei einer Anfrage an einen Host, der dort nicht hinterlegt ist, keine Anmeldedaten mitgesendet werden.","query":"netrc auth credentials","file":"tests/client/test_auth.py","symbol":"test_netrc_auth_credentials_do_not_exist","line":256,"lang":"de","candidates":[{"text":"File: docs/advanced/authentication.md\nLine 47: The `.netrc` config file allows authentication credentials to be associated with specified hosts. When a request is made to a host that is found in the netrc file, the username and password will be included using HTTP basic authentication.","file":"docs/advanced/authentication.md","line":47,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 147: Use a 'netrc' file to lookup basic auth credentials based on the url host.","file":"httpx/_auth.py","line":147,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 160: # The netrc file did not have authentication credentials for this host.","file":"httpx/_auth.py","line":160,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 163: # Build a basic auth header with credentials from the netrc file.","file":"httpx/_auth.py","line":163,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 237: def test_netrc_auth_credentials_exist() -> None:","file":"tests/client/test_auth.py","line":237,"lexical":0.65,"target":true},{"text":"File: tests/client/test_auth.py\nLine 256: def test_netrc_auth_credentials_do_not_exist() -> None:","file":"tests/client/test_auth.py","line":256,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"obtén el objeto de petición almacenado y lanza error si no existe","query":"raise runtimeerror request","file":"httpx/_exceptions.py","symbol":"request","line":97,"lang":"es","candidates":[{"text":"File: httpx/_client.py\nLine 901: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":901,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1616: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":1616,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_exceptions.py\nLine 99: raise RuntimeError(\"The .request property has not been set.\")","file":"httpx/_exceptions.py","line":99,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Le mécanisme qui permet de transformer une séquence d'octets brute en un itérateur asynchrone pour simuler un flux de données ne renvoie qu'un seul segment au lieu de gérer un flux continu.","query":"async iterator bytes","file":"tests/models/test_requests.py","symbol":"streaming_body","line":197,"lang":"fr","candidates":[{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 84: * `def .aiter_bytes([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 175: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_client.py","line":175,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 38: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":38,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 75: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":75,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 102: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":102,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 984: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":984,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1039: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":1039,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 298: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_multipart.py","line":298,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 59: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/asgi.py","line":59,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 269: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/default.py","line":269,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 107: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_types.py","line":107,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 94: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":94,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 348: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":348,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 125: async def hello_world() -> typing.AsyncIterator[bytes]: # pragma: no cover","file":"tests/client/test_client.py","line":125,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 131: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 467: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/test_content.py","line":467,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 190: async def compress(body: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":190,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 245: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":245,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 268: async def iterator() -> typing.AsyncIterator[bytes]:","file":"tests/test_decoders.py","line":268,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como é montada a string que combina o usuário, o host (com colchetes para IPv6) e a porta?","query":"userinfo host port","file":"httpx/_urlparse.py","symbol":"authority","line":168,"lang":"pt","candidates":[{"text":"File: httpx/_urlparse.py\nLine 127: r\"(?:(?P<userinfo>{userinfo})@)?\" r\"(?P<host>{host})\" r\":?(?P<port>{port})?\"","file":"httpx/_urlparse.py","line":127,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urlparse.py\nLine 325: parsed_userinfo != \"\" or parsed_host != \"\" or parsed_port is not None","file":"httpx/_urlparse.py","line":325,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 378: scheme, userinfo, host, port, path, query, fragment = self._uri_reference","file":"httpx/_urls.py","line":378,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Fehlerbericht: Beim Erstellen einer neuen URL-Instanz, die einen bestimmten Abfrageparameter entfernt, scheint die ursprüngliche URL-Struktur nicht korrekt beibehalten zu werden, da die Parameter-Manipulation fehlerhaft implementiert ist.","query":"remove url param","file":"httpx/_urls.py","symbol":"copy_remove_param","line":348,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 348: def copy_remove_param(self, key: str) -> URL:","file":"httpx/_urls.py","line":348,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 680: # `URL.copy_remove_param()`","file":"tests/models/test_url.py","line":680,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 700: def test_url_remove_param_manipulation():","file":"tests/models/test_url.py","line":700,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 705: assert url.copy_remove_param(\"a\") == \"https://example.org:123/\"","file":"tests/models/test_url.py","line":705,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"find where a byte sequence is assigned to a stream attribute during initialization","query":"stream bytes init","file":"httpx/_content.py","symbol":"__init__","line":32,"lang":"en","candidates":[{"text":"File: httpx/_content.py\nLine 32: def __init__(self, stream: bytes) -> None:","file":"httpx/_content.py","line":32,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 45: def __init__(self, stream: Iterable[bytes]) -> None:","file":"httpx/_content.py","line":45,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 122: def __init__(self, httpcore_stream: typing.Iterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":122,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"ファイル名からMIMEタイプを推測する際、ファイル名が空の場合や指定されていない場合に、型が不一致または予期しない戻り値になる可能性がある挙動の調査。特に空文字の場合のハンドリングについて確認したい。","query":"guess content type","file":"httpx/_multipart.py","symbol":"_guess_content_type","line":45,"lang":"ja","candidates":[{"text":"File: httpx/_multipart.py\nLine 45: def _guess_content_type(filename: str | None) -> str | None:","file":"httpx/_multipart.py","line":45,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_multipart.py\nLine 149: content_type = _guess_content_type(filename)","file":"httpx/_multipart.py","line":149,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_multipart.py\nLine 300: def test_multipart_encode_files_guesses_correct_content_type(","file":"tests/test_multipart.py","line":300,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy intentando modificar partes específicas de una dirección web sin tener que reconstruirla desde cero. ¿Dónde está el método que permite crear una nueva instancia cambiando solo ciertos atributos?","query":"URL copy with","file":"httpx/_urls.py","symbol":"copy_with","line":327,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 211: * Fix `URL.copy_with` for some oddly formed URL cases. (#2185)","file":"CHANGELOG.md","line":211,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 407: * Support `url.copy_with(params=...)`. (Pull #1601)","file":"CHANGELOG.md","line":407,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 511: * Added support for all URL components as parameter names when using `url.copy_with(...)`. (Pull #1285)","file":"CHANGELOG.md","line":511,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/transports.md\nLine 186: url = request.url.copy_with(scheme=\"https\")","file":"docs/advanced/transports.md","line":186,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 129: * `def .copy_with([scheme], [authority], [path], [query], [fragment])` - **URL**","file":"docs/api.md","line":129,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 237: return url.copy_with(raw_path=url.raw_path + b\"/\")","file":"httpx/_client.py","line":237,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 410: return self.base_url.copy_with(raw_path=merge_raw_path)","file":"httpx/_client.py","line":410,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 533: url = url.copy_with(host=request.url.host)","file":"httpx/_client.py","line":533,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 542: url = url.copy_with(fragment=request.url.fragment)","file":"httpx/_client.py","line":542,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 219: url = url.copy_with(username=None, password=None)","file":"httpx/_config.py","line":219,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 119: self._uri_reference = url._uri_reference.copy_with(**kwargs)","file":"httpx/_urls.py","line":119,"lexical":0.65,"target":true},{"text":"File: httpx/_urls.py\nLine 327: def copy_with(self, **kwargs: typing.Any) -> URL:","file":"httpx/_urls.py","line":327,"lexical":0.65,"target":false},{"text":"File: httpx/_urls.py\nLine 329: Copy this URL, returning a new URL with some components altered.","file":"httpx/_urls.py","line":329,"lexical":0.65,"target":false},{"text":"File: httpx/_urls.py\nLine 335: url = httpx.URL(\"https://www.example.com\").copy_with(","file":"httpx/_urls.py","line":335,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 41: url = server.url.copy_with(path=\"/echo_headers\")","file":"tests/client/test_async_client.py","line":41,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 119: \"GET\", server.url.copy_with(path=f\"/status/{status_code}\")","file":"tests/client/test_async_client.py","line":119,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 175: server.url.copy_with(path=\"/echo_body\"), headers=headers, content=content","file":"tests/client/test_async_client.py","line":175,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 48: url = server.url.copy_with(path=\"/echo_headers\")","file":"tests/client/test_client.py","line":48,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 63: url = server.url.copy_with(path=\"/echo_headers\")","file":"tests/client/test_client.py","line":63,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 138: \"GET\", server.url.copy_with(path=f\"/status/{status_code}\")","file":"tests/client/test_client.py","line":138,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 403: url = server.url.copy_with(path=\"/http_version_2\")","file":"tests/client/test_client.py","line":403,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 565: # Tests for `URL.copy_with()`.","file":"tests/models/test_url.py","line":565,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 572: url = url.copy_with()","file":"tests/models/test_url.py","line":572,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 575: url = url.copy_with(scheme=\"http\")","file":"tests/models/test_url.py","line":575,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 578: url = url.copy_with(netloc=b\"example.com\")","file":"tests/models/test_url.py","line":578,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 581: url = url.copy_with(path=\"/abc\")","file":"tests/models/test_url.py","line":581,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 585: def test_url_copywith_authority_subcomponents():","file":"tests/models/test_url.py","line":585,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 593: new = url.copy_with(**copy_with_kwargs)","file":"tests/models/test_url.py","line":593,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 597: def test_url_copywith_netloc():","file":"tests/models/test_url.py","line":597,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 602: new = url.copy_with(**copy_with_kwargs)","file":"tests/models/test_url.py","line":602,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 606: def test_url_copywith_userinfo_subcomponents():","file":"tests/models/test_url.py","line":606,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 612: new = url.copy_with(**copy_with_kwargs)","file":"tests/models/test_url.py","line":612,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"trouve l'initialisation qui gère le flux de données asynchrone et son état de consommation","query":"async iterable stream","file":"httpx/_content.py","symbol":"__init__","line":70,"lang":"fr","candidates":[{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 487: assert isinstance(self.stream, typing.AsyncIterable)","file":"httpx/_models.py","line":487,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 396: assert isinstance(resp.stream, typing.AsyncIterable)","file":"httpx/_transports/default.py","line":396,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 96: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/models/test_requests.py","line":96,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 30: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":30,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 43: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":43,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 57: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":57,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 82: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":82,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 101: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":101,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 118: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":118,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 137: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":137,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 154: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 169: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 187: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":187,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 205: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":205,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 223: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":223,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 241: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":241,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 266: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 305: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":305,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 349: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":349,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 376: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":376,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 422: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":422,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 436: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":436,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 454: assert not isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":454,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 473: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":473,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Reporte de error: Al intentar actualizar los encabezados de la petición, los valores existentes con la misma clave no se están sobrescribiendo correctamente, sino que se están duplicando o acumulando en la lista interna.","query":"update headers","file":"httpx/_models.py","symbol":"update","line":274,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 232: * Fix `Headers.update(...)` to correctly handle repeated headers (#2038)","file":"CHANGELOG.md","line":232,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 315: client_headers.update(headers)","file":"httpx/_client.py","line":315,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 430: merged_headers.update(headers)","file":"httpx/_client.py","line":430,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 274: def update(self, headers: HeaderTypes | None = None) -> None: # type: ignore","file":"httpx/_models.py","line":274,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 45: request.headers.update(headers)","file":"tests/client/test_async_client.py","line":45,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 53: request.headers.update(headers)","file":"tests/client/test_client.py","line":53,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 68: request.headers.update(headers)","file":"tests/client/test_client.py","line":68,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_headers.py\nLine 94: client.headers.update(","file":"tests/client/test_headers.py","line":94,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"비동기 인증 흐름 처리하는 로직 찾아줘","query":"async auth flow","file":"httpx/_auth.py","symbol":"async_auth_flow","line":87,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 508: * Added support for authentication flows which require either sync or async I/O. (Pull #1217)","file":"CHANGELOG.md","line":508,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 185: …ency primitives, such as locks, then you should override `.sync_auth_flow()` and `.async_auth_flow()` (instead of `.auth_flow()`). The former will be used by `httpx.Client`, while the latter will be used by `httpx.AsyncClient`.","file":"docs/advanced/authentication.md","line":185,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 211: async def async_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":211,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 230: async def async_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":230,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 31: and/or `.async_auth_flow()` instead of `.auth_flow()` to provide specialized","file":"httpx/_auth.py","line":31,"lexical":0.65,"target":true},{"text":"File: httpx/_auth.py\nLine 87: async def async_auth_flow(","file":"httpx/_auth.py","line":87,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 91: Execute the authentication flow asynchronously.","file":"httpx/_auth.py","line":91,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1652: auth_flow = auth.async_auth_flow(request)","file":"httpx/_client.py","line":1652,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 154: async def async_auth_flow(","file":"tests/client/test_auth.py","line":154,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como funciona a iteração assíncrona para ler os pedaços de dados do fluxo?","query":"async iter stream","file":"httpx/_content.py","symbol":"__aiter__","line":75,"lang":"pt","candidates":[{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 487: assert isinstance(self.stream, typing.AsyncIterable)","file":"httpx/_models.py","line":487,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 944: raise RuntimeError(\"Attempted to call a sync iterator on an async stream.\")","file":"httpx/_models.py","line":944,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1048: raise RuntimeError(\"Attempted to call an async iterator on a sync stream.\")","file":"httpx/_models.py","line":1048,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 396: assert isinstance(resp.stream, typing.AsyncIterable)","file":"httpx/_transports/default.py","line":396,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 96: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/models/test_requests.py","line":96,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 30: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":30,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 43: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":43,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 57: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":57,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 82: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":82,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 101: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":101,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 118: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":118,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 137: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":137,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 154: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 169: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 187: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":187,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 205: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":205,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 223: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":223,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 241: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":241,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 266: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 305: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":305,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 349: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":349,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 376: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":376,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 422: assert isinstance(response.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":422,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"busca la prueba que verifica que los parámetros de consulta se pasan correctamente al cliente","query":"test client params","file":"tests/client/test_queryparams.py","symbol":"test_client_queryparams","line":8,"lang":"es","candidates":[{"text":"File: tests/client/test_queryparams.py\nLine 8: def test_client_queryparams():","file":"tests/client/test_queryparams.py","line":8,"lexical":0.65,"target":true},{"text":"File: tests/client/test_queryparams.py\nLine 14: def test_client_queryparams_string():","file":"tests/client/test_queryparams.py","line":14,"lexical":0.65,"target":false},{"text":"File: tests/client/test_queryparams.py\nLine 25: def test_client_queryparams_echo():","file":"tests/client/test_queryparams.py","line":25,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"configurar el tiempo de espera de las solicitudes","query":"set request timeout","file":"httpx/_client.py","symbol":"timeout","line":258,"lang":"es","candidates":[{"text":"File: docs/advanced/timeouts.md\nLine 8: You can set timeouts for an individual request:","file":"docs/advanced/timeouts.md","line":8,"lexical":0.65,"target":false},{"text":"File: docs/compatibility.md\nLine 152: To get the same behavior as Requests, set the `timeout` parameter to `None`:","file":"docs/compatibility.md","line":152,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 584: def _set_timeout(self, request: Request) -> None:","file":"httpx/_client.py","line":584,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 910: self._set_timeout(request)","file":"httpx/_client.py","line":910,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1625: self._set_timeout(request)","file":"httpx/_client.py","line":1625,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Ocorrendo um erro de consumo duplicado quando tento iterar sobre um fluxo de bytes assíncrono que vem de um gerador, mesmo que o estado interno de consumo não impeça a primeira iteração corretamente em certos tipos de streams.","query":"async byte stream","file":"httpx/_content.py","symbol":"AsyncIteratorByteStream","line":67,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 199: * Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. (#2407)","file":"CHANGELOG.md","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 238: * Fix streaming uploads using `SyncByteStream` or `AsyncByteStream`. Regression in 0.21.2. (#2016)","file":"CHANGELOG.md","line":238,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.65,"target":false},{"text":"File: httpx/__init__.py\nLine 35: \"AsyncByteStream\",","file":"httpx/__init__.py","line":35,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 34: AsyncByteStream,","file":"httpx/_client.py","line":34,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 162: class BoundAsyncStream(AsyncByteStream):","file":"httpx/_client.py","line":162,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 164: An async byte stream that is bound to a given response instance, and that","file":"httpx/_client.py","line":164,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 169: self, stream: AsyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 575: ) -> SyncByteStream | AsyncByteStream | None:","file":"httpx/_client.py","line":575,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1724: if not isinstance(request.stream, AsyncByteStream):","file":"httpx/_client.py","line":1724,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1732: assert isinstance(response.stream, AsyncByteStream)","file":"httpx/_client.py","line":1732,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 19: AsyncByteStream,","file":"httpx/_content.py","line":19,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 31: class ByteStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":31,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 92: class UnattachedStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":92,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 109: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":109,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 192: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":192,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 226: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":226,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 36: AsyncByteStream,","file":"httpx/_models.py","line":36,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 395: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":395,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 525: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":525,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1047: if not isinstance(self.stream, AsyncByteStream):","file":"httpx/_models.py","line":1047,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1055: async for raw_stream_bytes in self.stream:","file":"httpx/_models.py","line":1055,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1070: if not isinstance(self.stream, AsyncByteStream):","file":"httpx/_models.py","line":1070,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 11: AsyncByteStream,","file":"httpx/_multipart.py","line":11,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 224: class MultipartStream(SyncByteStream, AsyncByteStream):","file":"httpx/_multipart.py","line":224,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 6: from .._types import AsyncByteStream","file":"httpx/_transports/asgi.py","line":6,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 55: class ASGIResponseStream(AsyncByteStream):","file":"httpx/_transports/asgi.py","line":55,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 103: assert isinstance(request.stream, AsyncByteStream)","file":"httpx/_transports/asgi.py","line":103,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 56: from .._types import AsyncByteStream, CertTypes, ProxyTypes, SyncByteStream","file":"httpx/_transports/default.py","line":56,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"ストリームを消費せずにバイトチャンクで反復処理するイテレータを実装しろ","query":"stream iterator","file":"httpx/_content.py","symbol":"__iter__","line":50,"lang":"ja","candidates":[{"text":"File: httpx/_content.py\nLine 42: class IteratorByteStream(SyncByteStream):","file":"httpx/_content.py","line":42,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_content.py\nLine 127: return headers, IteratorByteStream(content) # type: ignore","file":"httpx/_content.py","line":127,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 944: raise RuntimeError(\"Attempted to call a sync iterator on an async stream.\")","file":"httpx/_models.py","line":944,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 1048: raise RuntimeError(\"Attempted to call an async iterator on a sync stream.\")","file":"httpx/_models.py","line":1048,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 100: def test_stream_iterator(server):","file":"tests/client/test_client.py","line":100,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 356: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/client/test_redirects.py","line":356,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 103: def streaming_body() -> typing.Iterator[bytes]: # pragma: no cover","file":"tests/models/test_requests.py","line":103,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 128: def streaming_body(data: bytes) -> typing.Iterator[bytes]:","file":"tests/models/test_requests.py","line":128,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 17: def streaming_body() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":17,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 417: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":417,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 560: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":560,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"URLエンコードされたコンテンツのテストを確認してください。","query":"urlencoded test","file":"tests/test_content.py","symbol":"test_urlencoded_content","line":184,"lang":"ja","candidates":[{"text":"File: tests/models/test_url.py\nLine 627: def test_url_copywith_urlencoded_path():","file":"tests/models/test_url.py","line":627,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_asgi.py\nLine 104: async def test_asgi_urlencoded_path():","file":"tests/test_asgi.py","line":104,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_content.py\nLine 184: async def test_urlencoded_content():","file":"tests/test_content.py","line":184,"lexical":0.6000000000000001,"target":true},{"text":"File: tests/test_content.py\nLine 202: async def test_urlencoded_boolean():","file":"tests/test_content.py","line":202,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_content.py\nLine 220: async def test_urlencoded_none():","file":"tests/test_content.py","line":220,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/test_content.py\nLine 238: async def test_urlencoded_list():","file":"tests/test_content.py","line":238,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"URLのスキームに基づいてデフォルトのポート番号を返す処理はどこにありますか?","query":"default port scheme","file":"httpx/_client.py","symbol":"_port_or_default","line":77,"lang":"ja","candidates":[{"text":"File: httpx/_urlparse.py\nLine 398: # \"A scheme may define a default port. For example, the \"http\" scheme","file":"httpx/_urlparse.py","line":398,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 223: Default ports for \"http\", \"https\", \"ws\", \"wss\", and \"ftp\" schemes are always","file":"httpx/_urls.py","line":223,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 247: # If the port matches the scheme default it is normalized to None.","file":"tests/models/test_url.py","line":247,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Como eu testo se o gerenciamento de contexto de um transporte customizado está funcionando corretamente nos testes assíncronos?","query":"test context managed transport","file":"tests/client/test_async_client.py","symbol":"test_context_managed_transport_and_mount","line":215,"lang":"pt","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 183: async def test_context_managed_transport():","file":"tests/client/test_async_client.py","line":183,"lexical":0.65,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 215: async def test_context_managed_transport_and_mount():","file":"tests/client/test_async_client.py","line":215,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 232: def test_context_managed_transport():","file":"tests/client/test_client.py","line":232,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 263: def test_context_managed_transport_and_mount():","file":"tests/client/test_client.py","line":263,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"지정된 크기로 데이터를 쪼개서 리스트로 반환하고, 남은 부분은 버퍼에 저장하는 로직 어디 있어?","query":"chunk size buffer","file":"httpx/_decoders.py","symbol":"decode","line":276,"lang":"ko","candidates":[{"text":"File: httpx/_decoders.py\nLine 242: if self._buffer.tell() >= self._chunk_size:","file":"httpx/_decoders.py","line":242,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_decoders.py\nLine 281: if self._buffer.tell() >= self._chunk_size:","file":"httpx/_decoders.py","line":281,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"füge einen abschließenden schrägstrich an die url an falls er fehlt","query":"url trailing slash","file":"httpx/_client.py","symbol":"_enforce_trailing_slash","line":234,"lang":"de","candidates":[{"text":"File: httpx/_client.py\nLine 206: self._base_url = self._enforce_trailing_slash(URL(base_url))","file":"httpx/_client.py","line":206,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 234: def _enforce_trailing_slash(self, url: URL) -> URL:","file":"httpx/_client.py","line":234,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 296: self._base_url = self._enforce_trailing_slash(URL(url))","file":"httpx/_client.py","line":296,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_properties.py\nLine 11: def test_client_base_url_without_trailing_slash():","file":"tests/client/test_properties.py","line":11,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_properties.py\nLine 18: def test_client_base_url_with_trailing_slash():","file":"tests/client/test_properties.py","line":18,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"implémente l'itération asynchrone pour le flux de données","query":"async iterator stream","file":"httpx/_client.py","symbol":"__aiter__","line":175,"lang":"fr","candidates":[{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 944: raise RuntimeError(\"Attempted to call a sync iterator on an async stream.\")","file":"httpx/_models.py","line":944,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1048: raise RuntimeError(\"Attempted to call an async iterator on a sync stream.\")","file":"httpx/_models.py","line":1048,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"contentの文字エンコーディングを自動判別する処理","query":"chardet encoding detect","file":"tests/client/test_client.py","symbol":"autodetect","line":12,"lang":"ja","candidates":[{"text":"File: docs/advanced/text-encodings.md\nLine 66: return chardet.detect(content).get(\"encoding\")","file":"docs/advanced/text-encodings.md","line":66,"lexical":0.65,"target":false},{"text":"File: tests/client/test_client.py\nLine 13: return chardet.detect(content).get(\"encoding\")","file":"tests/client/test_client.py","line":13,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_responses.py\nLine 28: return chardet.detect(content).get(\"encoding\")","file":"tests/models/test_responses.py","line":28,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_decoders.py\nLine 251: return chardet.detect(content).get(\"encoding\")","file":"tests/test_decoders.py","line":251,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"同期的なバイトストリームの抽象基底クラスを探して","query":"sync byte stream","file":"httpx/_types.py","symbol":"SyncByteStream","line":92,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 199: * Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. (#2407)","file":"CHANGELOG.md","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 238: * Fix streaming uploads using `SyncByteStream` or `AsyncByteStream`. Regression in 0.21.2. (#2016)","file":"CHANGELOG.md","line":238,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.65,"target":false},{"text":"File: httpx/__init__.py\nLine 35: \"AsyncByteStream\",","file":"httpx/__init__.py","line":35,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/__init__.py\nLine 89: \"SyncByteStream\",","file":"httpx/__init__.py","line":89,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 34: AsyncByteStream,","file":"httpx/_client.py","line":34,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 45: SyncByteStream,","file":"httpx/_client.py","line":45,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 139: class BoundSyncStream(SyncByteStream):","file":"httpx/_client.py","line":139,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 146: self, stream: SyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":146,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 162: class BoundAsyncStream(AsyncByteStream):","file":"httpx/_client.py","line":162,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 164: An async byte stream that is bound to a given response instance, and that","file":"httpx/_client.py","line":164,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 169: self, stream: AsyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 575: ) -> SyncByteStream | AsyncByteStream | None:","file":"httpx/_client.py","line":575,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1008: if not isinstance(request.stream, SyncByteStream):","file":"httpx/_client.py","line":1008,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1016: assert isinstance(response.stream, SyncByteStream)","file":"httpx/_client.py","line":1016,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1724: if not isinstance(request.stream, AsyncByteStream):","file":"httpx/_client.py","line":1724,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1732: assert isinstance(response.stream, AsyncByteStream)","file":"httpx/_client.py","line":1732,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 19: AsyncByteStream,","file":"httpx/_content.py","line":19,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 24: SyncByteStream,","file":"httpx/_content.py","line":24,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 31: class ByteStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":31,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 42: class IteratorByteStream(SyncByteStream):","file":"httpx/_content.py","line":42,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 92: class UnattachedStream(AsyncByteStream, SyncByteStream):","file":"httpx/_content.py","line":92,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 109: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":109,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 192: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":192,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 226: ) -> tuple[dict[str, str], SyncByteStream | AsyncByteStream]:","file":"httpx/_content.py","line":226,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 36: AsyncByteStream,","file":"httpx/_models.py","line":36,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 46: SyncByteStream,","file":"httpx/_models.py","line":46,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 395: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":395,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 525: stream: SyncByteStream | AsyncByteStream | None = None,","file":"httpx/_models.py","line":525,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我正在检查处理身份验证逻辑时请求体读取的问题。帮我找一下那个测试异步请求在被读取后是否仍然可以保持流式传输的用例。","query":"async stream read","file":"tests/models/test_requests.py","symbol":"test_aread_and_stream_data","line":90,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 199: * Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. (#2407)","file":"CHANGELOG.md","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 90: async def test_aread_and_stream_data():","file":"tests/models/test_requests.py","line":90,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_responses.py\nLine 732: async def test_cannot_aread_after_stream_consumed():","file":"tests/models/test_responses.py","line":732,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTPレスポンスのリンクヘッダーから取得されるURLのリストが、期待される値と一致するか検証するテストケースを作成してください。特に、ヘッダー内のリンクが正しくパースされ、期待される全てのリンクが含まれているかを確認したいです。","query":"parse link header","file":"tests/models/test_headers.py","symbol":"test_parse_header_links","line":212,"lang":"ja","candidates":[{"text":"File: httpx/_models.py\nLine 93: def _parse_header_links(value: str) -> list[dict[str, str]]:","file":"httpx/_models.py","line":93,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 95: Returns a list of parsed link headers, for more info see:","file":"httpx/_models.py","line":95,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 107: :return: list of parsed link headers","file":"httpx/_models.py","line":107,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 844: Returns the parsed header links of the response, if any","file":"httpx/_models.py","line":844,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 852: for link in _parse_header_links(header)","file":"httpx/_models.py","line":852,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_headers.py\nLine 212: def test_parse_header_links(value, expected):","file":"tests/models/test_headers.py","line":212,"lexical":0.65,"target":true},{"text":"File: tests/models/test_headers.py\nLine 217: def test_parse_header_links_no_link():","file":"tests/models/test_headers.py","line":217,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"verifier que les redirections vers des fragments relatifs sont correctement gérées","query":"redirect fragment","file":"tests/client/test_redirects.py","symbol":"test_fragment_redirect","line":219,"lang":"fr","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 219: def test_fragment_redirect():","file":"tests/client/test_redirects.py","line":219,"lexical":0.6000000000000001,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 222: \"https://example.org/relative_redirect#fragment\", follow_redirects=True","file":"tests/client/test_redirects.py","line":222,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTPリクエストのターゲットとして使用される、パスとクエリ文字列をバイト列で取得する処理について。URLのパスが空の場合にデフォルトの挙動が正しく行われているか確認したいです。","query":"raw path bytes","file":"httpx/_urls.py","symbol":"raw_path","line":283,"lang":"ja","candidates":[{"text":"File: httpx/_urls.py\nLine 68: * `url.raw_path` is raw bytes of both the path and query, without URL escaping.","file":"httpx/_urls.py","line":68,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 89: \"raw_path\": bytes,","file":"httpx/_urls.py","line":89,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 283: def raw_path(self) -> bytes:","file":"httpx/_urls.py","line":283,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 285: The complete URL path and query string as raw bytes.","file":"httpx/_urls.py","line":285,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"レスポンスのデータをファイルにダウンロードする進捗表示付き関数を実装","query":"download response progress","file":"httpx/_main.py","symbol":"download_response","line":251,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 509: * Added support for monitoring download progress with `response.num_bytes_downloaded`. (Pull #1268)","file":"CHANGELOG.md","line":509,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 181: If you need to monitor download progress of large responses, you can use response streaming and inspect the `response.num_bytes_downloaded` property.","file":"docs/advanced/clients.md","line":181,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 183: This interface is required for properly determining download progress, because the total number of bytes returned by `response.content` or `response.iter_content()` will not always correspond with the raw content length of the response if HTTP response com…","file":"docs/advanced/clients.md","line":183,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 185: For example, showing a progress bar using the [`tqdm`](https://github.com/tqdm/tqdm) library while a response is being downloaded could be done like this…","file":"docs/advanced/clients.md","line":185,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 202: progress.update(response.num_bytes_downloaded - num_bytes_downloaded)","file":"docs/advanced/clients.md","line":202,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 229: progress.update(download_task, completed=response.num_bytes_downloaded)","file":"docs/advanced/clients.md","line":229,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 270: progress.update(download_task, completed=response.num_bytes_downloaded)","file":"httpx/_main.py","line":270,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"リクエストレベルではなく、クライアント全体のデフォルト設定として保持されている認証情報を取得する仕組みについて。この値がどのように保持され、どのタイミングで参照されるのか確認したいです。","query":"client default auth","file":"httpx/_client.py","symbol":"auth","line":273,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 357: * Expose `httpx.USE_CLIENT_DEFAULT`, used as the default to `auth` and `timeout` parameters in request methods. (Pull #1634)","file":"CHANGELOG.md","line":357,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 561: * Support `client.get(..., auth=None)` to bypass the default authentication on a clients. (Pull #1115)","file":"CHANGELOG.md","line":561,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 460: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":460,"lexical":0.65,"target":true},{"text":"File: httpx/_client.py\nLine 463: self._auth if isinstance(auth, UseClientDefault) else self._build_auth(auth)","file":"httpx/_client.py","line":463,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 783: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":783,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 840: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":840,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 884: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":884,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1043: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1043,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1072: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1072,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1101: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1101,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1134: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1134,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1171: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1171,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1208: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1208,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1241: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1241,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1497: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1497,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1555: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1555,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1599: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1599,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1758: auth: AuthTypes | UseClientDefault | None = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1758,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1787: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1787,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1816: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1816,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1849: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1849,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1886: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1886,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1923: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1923,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1956: auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,","file":"httpx/_client.py","line":1956,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"在尝试通过下标赋值的方式修改 URL 查询参数时,程序抛出了运行时错误,提示该对象现在是不可变的,并建议使用专门的方法来生成包含新参数的副本。","query":"URL query immutable","file":"httpx/_urls.py","symbol":"__setitem__","line":637,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 408: * Add `url.params` parameter, returning an immutable `QueryParams` instance. (Pull #1601)","file":"CHANGELOG.md","line":408,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 277: The URL query parameters, neatly parsed and packaged into an immutable","file":"httpx/_urls.py","line":277,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"マルチパート形式のデータをエンコードして、ヘッダーとストリームを返す処理はどこにある?","query":"encode multipart data","file":"httpx/_content.py","symbol":"encode_multipart_data","line":152,"lang":"ja","candidates":[{"text":"File: httpx/_content.py\nLine 152: def encode_multipart_data(","file":"httpx/_content.py","line":152,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 212: return encode_multipart_data(data or {}, files, boundary)","file":"httpx/_content.py","line":212,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 226: Request content as streaming multipart encoded form data.","file":"httpx/_multipart.py","line":226,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"O método para realizar requisições HTTP que permite processar o corpo da resposta de forma iterativa, evitando o carregamento total dos dados na memória, parece estar apresentando comportamento inesperado ao lidar com o fluxo de bytes.","query":"stream response body","file":"httpx/_client.py","symbol":"stream","line":828,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 825: * Fix for streaming a redirect response body with `allow_redirects=False`. (Pull #766)","file":"CHANGELOG.md","line":825,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 341: For large downloads you may want to use streaming responses that do not load the entire response body into memory at once.","file":"docs/quickstart.md","line":341,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 378: If you're using streaming responses in any of these ways then the `response.content` and `response.text` attributes will not be available, and will raise errors if accessed. However you can also use the response streaming functionality to conditionally loa…","file":"docs/quickstart.md","line":378,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 143: Alternative to `httpx.request()` that streams the response body","file":"httpx/_api.py","line":143,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 846: Alternative to `httpx.request()` that streams the response body","file":"httpx/_client.py","line":846,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 1561: Alternative to `httpx.request()` that streams the response body","file":"httpx/_client.py","line":1561,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 553: # Load the response body, except for streaming content.","file":"httpx/_models.py","line":553,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 185: stream = ASGIResponseStream(body_parts)","file":"httpx/_transports/asgi.py","line":185,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 399: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":399,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 403: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":403,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 407: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":407,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 411: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":411,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 423: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":423,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 462: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":462,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 472: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":472,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 482: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":482,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 487: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":487,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 492: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":492,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 522: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":522,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 540: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":540,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 544: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":544,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 548: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":548,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 566: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":566,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 587: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":587,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 591: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":591,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 595: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":595,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 978: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":978,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 988: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":988,"lexical":0.65,"target":false},{"text":"File: tests/test_wsgi.py\nLine 48: def echo_body_with_response_stream(","file":"tests/test_wsgi.py","line":48,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_wsgi.py\nLine 111: transport = httpx.WSGITransport(app=echo_body_with_response_stream)","file":"tests/test_wsgi.py","line":111,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"¿Cómo se verifica que las credenciales de autenticación no se envíen cuando hay una redirección a un dominio distinto?","query":"cross domain auth redirect","file":"tests/client/test_redirects.py","symbol":"test_cross_domain_redirect_with_auth","line":284,"lang":"es","candidates":[{"text":"File: tests/client/test_redirects.py\nLine 266: def test_cross_domain_redirect_with_auth_header():","file":"tests/client/test_redirects.py","line":266,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 275: def test_cross_domain_https_redirect_with_auth_header():","file":"tests/client/test_redirects.py","line":275,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 284: def test_cross_domain_redirect_with_auth():","file":"tests/client/test_redirects.py","line":284,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"요청할 때마다 매번 쿠키를 넘겨주는 방식이 왜 DeprecationWarning 발생하는지 확인해줘","query":"per-request cookie deprecated","file":"tests/client/test_cookies.py","symbol":"test_set_per_request_cookie_is_deprecated","line":34,"lang":"ko","candidates":[{"text":"File: httpx/_client.py\nLine 806: \"Setting per-request cookies=<...> is being deprecated, because \"","file":"httpx/_client.py","line":806,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1521: \"Setting per-request cookies=<...> is being deprecated, because \"","file":"httpx/_client.py","line":1521,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_cookies.py\nLine 36: Sending a request including a per-request cookie is deprecated.","file":"tests/client/test_cookies.py","line":36,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Es scheint ein Problem bei der asynchronen Iteration über den Byte-Inhalt einer Antwort zu geben; bitte prüfe, ob die Methode zum schrittweisen Auslesen der Daten korrekt funktioniert, wenn man sie in einer async-Schleife verwendet.","query":"async iter bytes","file":"tests/models/test_responses.py","symbol":"test_aiter_bytes","line":573,"lang":"de","candidates":[{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 84: * `def .aiter_bytes([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 74: ... async for chunk in response.aiter_bytes():","file":"docs/async.md","line":74,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 175: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_client.py","line":175,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 38: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":38,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 67: class AsyncIteratorByteStream(AsyncByteStream):","file":"httpx/_content.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 70: def __init__(self, stream: AsyncIterable[bytes]) -> None:","file":"httpx/_content.py","line":70,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 75: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":75,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 102: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_content.py","line":102,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 108: content: str | bytes | Iterable[bytes] | AsyncIterable[bytes],","file":"httpx/_content.py","line":108,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 131: return headers, AsyncIteratorByteStream(content)","file":"httpx/_content.py","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 979: self._content = b\"\".join([part async for part in self.aiter_bytes()])","file":"httpx/_models.py","line":979,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 982: async def aiter_bytes(","file":"httpx/_models.py","line":982,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 984: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":984,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 997: async for raw_bytes in self.aiter_raw():","file":"httpx/_models.py","line":997,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1018: async for byte_content in self.aiter_bytes():","file":"httpx/_models.py","line":1018,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 1039: ) -> typing.AsyncIterator[bytes]:","file":"httpx/_models.py","line":1039,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 298: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_multipart.py","line":298,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 59: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/asgi.py","line":59,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 266: def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:","file":"httpx/_transports/default.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 269: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"httpx/_transports/default.py","line":269,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 68: RequestContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]","file":"httpx/_types.py","line":68,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 69: ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]","file":"httpx/_types.py","line":69,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_types.py\nLine 107: async def __aiter__(self) -> AsyncIterator[bytes]:","file":"httpx/_types.py","line":107,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 94: async def hello_world() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":94,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 348: async def __aiter__(self) -> typing.AsyncIterator[bytes]:","file":"tests/client/test_async_client.py","line":348,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 701: async def streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/client/test_auth.py","line":701,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 125: async def hello_world() -> typing.AsyncIterator[bytes]: # pragma: no cover","file":"tests/client/test_client.py","line":125,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 112: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":112,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 154: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 197: async def streaming_body(data: bytes) -> typing.AsyncIterator[bytes]:","file":"tests/models/test_requests.py","line":197,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 22: async def async_streaming_body() -> typing.AsyncIterator[bytes]:","file":"tests/models/test_responses.py","line":22,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"我想检查一下关于流式响应的测试覆盖情况。能帮我找一下那个验证在未读取内容的情况下访问流数据会抛出异常的测试用例吗?","query":"stream response exception","file":"tests/client/test_async_client.py","symbol":"test_access_content_stream_response","line":82,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 399: * The runtime exception `httpx.ResponseClosed` is now named `httpx.StreamClosed`. (#1584)","file":"CHANGELOG.md","line":399,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 573: * If a transport error occurs while streaming the response, raise an `httpx` exception, not the underlying `httpcore` exception. (Pull #1190)","file":"CHANGELOG.md","line":573,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 332: If any BaseException is raised during streaming the response, then the","file":"tests/client/test_async_client.py","line":332,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Estou tentando entender por que o erro de acesso ao conteúdo sem leitura prévia está sendo disparado. Pode me mostrar onde essa exceção específica é definida?","query":"streaming response read","file":"httpx/_exceptions.py","symbol":"__init__","line":343,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 870: In particular with streaming responses the `response.read()` method becomes `response.aread()`, and the `response.close()` method becomes `response.aclose()`.","file":"CHANGELOG.md","line":870,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 883: - Switch to `response.aread()` for conditionally reading streaming responses. (Pull #674)","file":"CHANGELOG.md","line":883,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_exceptions.py\nLine 340: Attempted to access streaming response content, without having called `read()`.","file":"httpx/_exceptions.py","line":340,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"このオブジェクトのハッシュ値の生成ロジックはどうなってる?","query":"hash str self","file":"httpx/_urls.py","symbol":"__hash__","line":615,"lang":"ja","candidates":[{"text":"File: httpx/_urls.py\nLine 369: return hash(str(self))","file":"httpx/_urls.py","line":369,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urls.py\nLine 616: return hash(str(self))","file":"httpx/_urls.py","line":616,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy intentando manipular los parámetros de la URL de forma inmutable. ¿Dónde está la lógica que permite generar un nuevo objeto de parámetros eliminando una clave específica?","query":"query params remove","file":"httpx/_urls.py","symbol":"remove","line":567,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 400: * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.updat…","file":"CHANGELOG.md","line":400,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 538: * The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed.","file":"CHANGELOG.md","line":538,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 567: def remove(self, key: str) -> QueryParams:","file":"httpx/_urls.py","line":567,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"HTTP 응답 본문을 읽어올 때 사용자가 지정한 크기만큼 조각내어 가져오는 기능이 의도한 대로 작동하는지 검증하는 테스트 케이스가 있는지 확인해주세요.","query":"iter_raw chunk_size","file":"tests/models/test_responses.py","symbol":"test_iter_raw_with_chunksize","line":398,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 433: * Add `chunk_size` parameter to `iter_raw()`, `iter_bytes()`, `iter_text()`. (Pull #1277)","file":"CHANGELOG.md","line":433,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 76: * `def .iter_raw([chunk_size])` - **bytes iterator**","file":"docs/api.md","line":76,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 83: * `def .aiter_raw([chunk_size])` - **async bytes iterator**","file":"docs/api.md","line":83,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 935: def iter_raw(self, chunk_size: int | None = None) -> typing.Iterator[bytes]:","file":"httpx/_models.py","line":935,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 400: parts = list(response.iter_raw(chunk_size=5))","file":"tests/models/test_responses.py","line":400,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_responses.py\nLine 404: parts = list(response.iter_raw(chunk_size=7))","file":"tests/models/test_responses.py","line":404,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 408: parts = list(response.iter_raw(chunk_size=13))","file":"tests/models/test_responses.py","line":408,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 412: parts = list(response.iter_raw(chunk_size=20))","file":"tests/models/test_responses.py","line":412,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 484: parts = [part async for part in response.aiter_raw(chunk_size=5)]","file":"tests/models/test_responses.py","line":484,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 489: parts = [part async for part in response.aiter_raw(chunk_size=13)]","file":"tests/models/test_responses.py","line":489,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 494: parts = [part async for part in response.aiter_raw(chunk_size=20)]","file":"tests/models/test_responses.py","line":494,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"trouve la fonction qui enregistre les en-têtes de la réponse dans une liste d'événements","query":"response headers event","file":"tests/client/test_event_hooks.py","symbol":"on_response","line":128,"lang":"fr","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 23: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":23,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 74: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":74,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 129: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":129,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 186: events.append({\"event\": \"response\", \"headers\": dict(response.headers)})","file":"tests/client/test_event_hooks.py","line":186,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Comment est-ce que le corps de la requête est chargé de manière asynchrone en mémoire ?","query":"async read body","file":"httpx/_models.py","symbol":"aread","line":482,"lang":"fr","candidates":[{"text":"File: tests/client/test_auth.py\nLine 710: async def test_async_auth_reads_response_body() -> None:","file":"tests/client/test_auth.py","line":710,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_asgi.py\nLine 187: async def read_body(scope, receive, send):","file":"tests/test_asgi.py","line":187,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"How does this class handle iteration over its internal data?","query":"iter keys","file":"httpx/_models.py","symbol":"__iter__","line":350,"lang":"en","candidates":[{"text":"File: httpx/_models.py\nLine 351: return iter(self.keys())","file":"httpx/_models.py","line":351,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_urls.py\nLine 607: return iter(self.keys())","file":"httpx/_urls.py","line":607,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"asigna el tiempo transcurrido a la instancia actual","query":"set elapsed","file":"httpx/_models.py","symbol":"elapsed","line":592,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 534: * Drop `request.timer` attribute, which was being used internally to set `response.elapsed`. (Pull #1249)","file":"CHANGELOG.md","line":534,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 142: ensures the `response.elapsed` is set once the response is closed.","file":"httpx/_client.py","line":142,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 165: ensures the `response.elapsed` is set once the response is closed.","file":"httpx/_client.py","line":165,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 591: @elapsed.setter","file":"httpx/_models.py","line":591,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"Es wird ein Szenario getestet, bei dem eine HTTP-Anfrage an https://example.org/cross_domain gesendet wird und automatisch zu https://example.org/cross_domain_target umgeleitet wird, wobei die Autorisierungsheader im Ziel-Request erhalten bleiben sollen. Bitte prüfe, ob das Verhalten korrekt implementiert ist.","query":"redirect auth header","file":"tests/client/test_redirects.py","symbol":"test_same_domain_redirect","line":292,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 216: * Preserve `Authorization` header for redirects that are to the same origin, but are an `http`-to-`https` upgrade. (#2074)","file":"CHANGELOG.md","line":216,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 554: # Strip Authorization headers when responses are redirected","file":"httpx/_client.py","line":554,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 266: def test_cross_domain_redirect_with_auth_header():","file":"tests/client/test_redirects.py","line":266,"lexical":0.65,"target":true},{"text":"File: tests/client/test_redirects.py\nLine 275: def test_cross_domain_https_redirect_with_auth_header():","file":"tests/client/test_redirects.py","line":275,"lexical":0.65,"target":false},{"text":"File: tests/client/test_redirects.py\nLine 301: def test_same_domain_https_redirect_with_auth_header():","file":"tests/client/test_redirects.py","line":301,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"crée un endpoint mock pour un service non monté","query":"unmounted mock","file":"tests/client/test_client.py","symbol":"unmounted","line":367,"lang":"fr","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 303: transport = httpx.MockTransport(unmounted)","file":"tests/client/test_async_client.py","line":303,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 378: transport = httpx.MockTransport(unmounted)","file":"tests/client/test_client.py","line":378,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"HTTP 요청의 헤더를 단색 테마로 예쁘게 출력하려고 해요. 특히 HTTP/2 지원 여부에 따라 포맷을 조정하는 함수가 필요해요.","query":"print request headers","file":"httpx/_main.py","symbol":"print_request_headers","line":147,"lang":"ko","candidates":[{"text":"File: docs/advanced/clients.md\nLine 170: print(request.headers[\"X-Client-ID\"]) # \"ABC123\"","file":"docs/advanced/clients.md","line":170,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 147: def print_request_headers(request: httpcore.Request, http2: bool = False) -> None:","file":"httpx/_main.py","line":147,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_main.py\nLine 237: print_request_headers(request, http2=False)","file":"httpx/_main.py","line":237,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 240: print_request_headers(request, http2=True)","file":"httpx/_main.py","line":240,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"在处理身份验证挑战时,如果响应包含 Digest 类型的认证要求,逻辑似乎无法正确处理后续的重试流程,导致无法自动完成认证过程。","query":"digest auth challenge","file":"httpx/_auth.py","symbol":"auth_flow","line":193,"lang":"zh","candidates":[{"text":"File: docs/advanced/authentication.md\nLine 31: HTTP digest authentication is a challenge-response authentication scheme. Unlike basic authentication it provides encryption, and can be used over unencrypted `http` connections. It requires an additional round-trip in order to negotiate the authentication…","file":"docs/advanced/authentication.md","line":31,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 190: self._last_challenge: _DigestAuthChallenge | None = None","file":"httpx/_auth.py","line":190,"lexical":0.65,"target":true},{"text":"File: httpx/_auth.py\nLine 226: ) -> _DigestAuthChallenge:","file":"httpx/_auth.py","line":226,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 228: Returns a challenge from a Digest WWW-Authenticate header.","file":"httpx/_auth.py","line":228,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 248: return _DigestAuthChallenge(","file":"httpx/_auth.py","line":248,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 256: self, request: Request, challenge: _DigestAuthChallenge","file":"httpx/_auth.py","line":256,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 343: class _DigestAuthChallenge(typing.NamedTuple):","file":"httpx/_auth.py","line":343,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 82: \"www-authenticate\": f'Digest realm=\"httpx@example.org\", {challenge_str}',","file":"tests/client/test_auth.py","line":82,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 540: async def test_digest_auth_reuses_challenge() -> None:","file":"tests/client/test_auth.py","line":540,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Wo wird geprüft, ob ein Statuscode zu den 4xx-Fehlern gehört?","query":"is client error","file":"httpx/_models.py","symbol":"is_client_error","line":751,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 329: * Response instances now include `.is_informational`, `.is_success`, `.is_redirect`, `.is_client_error`, and `.is_server_error`","file":"CHANGELOG.md","line":329,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 460: * Closed clients now raise a runtime error if attempting to send a request. (Pull #1346)","file":"CHANGELOG.md","line":460,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 850: - The per-request `cert`, `verify`, and `trust_env` arguments are escalated from raising errors if used, to no longer being available. These arguments should be used on a per-client instance instead, or in the top-level API.","file":"CHANGELOG.md","line":850,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 851: - The `stream` argument has escalated from raising an error when used, to no longer being available. Use the `client.stream(...)` or `httpx.stream()` streaming API instead.","file":"CHANGELOG.md","line":851,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 889: - When using a client instance, the per-request usage of `verify`, `cert`, and `trust_env` have now escalated from raising a warning to raising an error. You should set these arguments on the client instead. (Pull #617)","file":"CHANGELOG.md","line":889,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 231: raise RuntimeError(\"Cannot use a sync authentication class with httpx.AsyncClient\")","file":"docs/advanced/authentication.md","line":231,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 23: example, which creates a client instance that always raises `httpx.HTTPStatusError`","file":"docs/advanced/event-hooks.md","line":23,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 901: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":901,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1616: raise RuntimeError(\"Cannot send a request, as the client has been closed.\")","file":"httpx/_client.py","line":1616,"lexical":0.65,"target":false},{"text":"File: httpx/_models.py\nLine 751: def is_client_error(self) -> bool:","file":"httpx/_models.py","line":751,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_models.py\nLine 755: return codes.is_client_error(self.status_code)","file":"httpx/_models.py","line":755,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_status_codes.py\nLine 67: def is_client_error(cls, value: int) -> bool:","file":"httpx/_status_codes.py","line":67,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/mock.py\nLine 26: raise TypeError(\"Cannot use an async handler in a sync Client\")","file":"httpx/_transports/mock.py","line":26,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 122: assert response.is_client_error","file":"tests/models/test_responses.py","line":122,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"http://のpathとhostを確認する","query":"url path host","file":"tests/models/test_url.py","symbol":"test_url_no_authority","line":63,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 406: * Support `httpx.URL(**kwargs)`, for example `httpx.URL(scheme=\"https\", host=\"www.example.com\", path=\"/')`, or `httpx.URL(\"https://www.example.com/\", username=\"tom@gmail.com\", password=\"123 456\")`. (Pull #1601)","file":"CHANGELOG.md","line":406,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/transports.md\nLine 286: scheme, host, port, path = url","file":"docs/advanced/transports.md","line":286,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 410: \"RawURL\", [\"raw_scheme\", \"raw_host\", \"port\", \"raw_path\"]","file":"httpx/_urls.py","line":410,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 384: url = httpx.URL(scheme=\"https\", host=\"www.example.com\", path=\"/\")","file":"tests/models/test_url.py","line":384,"lexical":0.65,"target":true},{"text":"File: tests/models/test_url.py\nLine 405: httpx.URL(scheme=\"~\", host=\"www.example.com\", path=\"/\")","file":"tests/models/test_url.py","line":405,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 411: httpx.URL(scheme=\"https\", host=\"www.example.com\", path=\"abc\")","file":"tests/models/test_url.py","line":411,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 668: httpx.URL(\"https://u:p@[invalid!]//evilHost/path?t=w#tw\")","file":"tests/models/test_url.py","line":668,"lexical":0.65,"target":false},{"text":"File: tests/models/test_url.py\nLine 842: url = httpx.URL(scheme=\"https\", host=host, port=443, path=\"/\")","file":"tests/models/test_url.py","line":842,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"비동기 클라이언트 테스트 환경을 구축할 때, 인스턴스 생성 시 전달된 식별자 값이 내부 속성에 제대로 할당되지 않거나 이벤트 목록이 초기화되지 않는 문제가 있는지 확인해 주세요.","query":"async client test","file":"tests/client/test_async_client.py","symbol":"__init__","line":217,"lang":"ko","candidates":[{"text":"File: docs/advanced/transports.md\nLine 117: async with httpx.AsyncClient(transport=transport, base_url=\"http://testserver\") as client:","file":"docs/advanced/transports.md","line":117,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/transports.md\nLine 137: async with httpx.AsyncClient(transport=transport, base_url=\"http://testserver\") as client:","file":"docs/advanced/transports.md","line":137,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 260: async def test_client_closed_state_using_implicit_open():","file":"tests/client/test_async_client.py","line":260,"lexical":0.65,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 281: async def test_client_closed_state_using_with_block():","file":"tests/client/test_async_client.py","line":281,"lexical":0.65,"target":false},{"text":"File: tests/client/test_proxies.py\nLine 225: @pytest.mark.parametrize(\"client_class\", [httpx.Client, httpx.AsyncClient])","file":"tests/client/test_proxies.py","line":225,"lexical":0.65,"target":false},{"text":"File: tests/test_timeouts.py\nLine 48: async def test_async_client_new_request_send_timeout(server):","file":"tests/test_timeouts.py","line":48,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"RFC 8878規格のzstd圧縮を扱うデコーダーのロジックを確認したいです。外部ライブラリの依存関係が必要な実装になっている箇所を探してください。","query":"zstd decoder","file":"httpx/_decoders.py","symbol":"ZStandardDecoder","line":161,"lang":"ja","candidates":[{"text":"File: httpx/_decoders.py\nLine 169: # inspired by the ZstdDecoder implementation in urllib3","file":"httpx/_decoders.py","line":169,"lexical":0.6000000000000001,"target":true},{"text":"File: httpx/_decoders.py\nLine 386: \"zstd\": ZStandardDecoder,","file":"httpx/_decoders.py","line":386,"lexical":0.6000000000000001,"target":false},{"text":"File: httpx/_decoders.py\nLine 393: SUPPORTED_DECODERS.pop(\"zstd\") # pragma: no cover","file":"httpx/_decoders.py","line":393,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"The cleanup process for the communication layer is failing to record its termination event in the audit log, causing traces to be incomplete during teardown.","query":"transport exit events","file":"tests/client/test_client.py","symbol":"__exit__","line":248,"lang":"en","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 201: self.events.append(\"transport.__aexit__\")","file":"tests/client/test_async_client.py","line":201,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 250: self.events.append(\"transport.__exit__\")","file":"tests/client/test_client.py","line":250,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"configura os gatilhos de eventos para requisições e respostas","query":"event hooks","file":"httpx/_client.py","symbol":"event_hooks","line":266,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 347: * Event hooks are now also called for any additional redirect or auth requests/responses. (Pull #1806)","file":"CHANGELOG.md","line":347,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 507: * Added support for event hooks. (Pull #1246)","file":"CHANGELOG.md","line":507,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 1: HTTPX allows you to register \"event hooks\" with the client, that are called","file":"docs/advanced/event-hooks.md","line":1,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 4: There are currently two event hooks:","file":"docs/advanced/event-hooks.md","line":4,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 19: client = httpx.Client(event_hooks={'request': [log_request], 'response': [log_response]})","file":"docs/advanced/event-hooks.md","line":19,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 30: client = httpx.Client(event_hooks={'response': [raise_on_4xx_5xx]})","file":"docs/advanced/event-hooks.md","line":30,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 34: Response event hooks are called before determining if the response body","file":"docs/advanced/event-hooks.md","line":34,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 46: client = httpx.Client(event_hooks={'request': [add_timestamp]})","file":"docs/advanced/event-hooks.md","line":46,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 49: Event hooks must always be set as a **list of callables**, and you may register","file":"docs/advanced/event-hooks.md","line":49,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 50: multiple event hooks for each type of event.","file":"docs/advanced/event-hooks.md","line":50,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 52: As well as being able to set event hooks on instantiating the client, there","file":"docs/advanced/event-hooks.md","line":52,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 53: is also an `.event_hooks` property, that allows you to inspect and modify","file":"docs/advanced/event-hooks.md","line":53,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 58: client.event_hooks['request'] = [log_request]","file":"docs/advanced/event-hooks.md","line":58,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 59: client.event_hooks['response'] = [log_response, raise_on_4xx_5xx]","file":"docs/advanced/event-hooks.md","line":59,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/compatibility.md\nLine 222: ## Event Hooks","file":"docs/compatibility.md","line":222,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/compatibility.md\nLine 224: `requests` allows event hooks to mutate `Request` and `Response` objects. See [examples](https://requests.readthedocs.io/en/master/user/advanced/#event-hooks) given in the documentation for `requests`.","file":"docs/compatibility.md","line":224,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/compatibility.md\nLine 226: In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response.","file":"docs/compatibility.md","line":226,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 199: event_hooks: None | (typing.Mapping[str, list[EventHook]]) = None,","file":"httpx/_client.py","line":199,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_client.py\nLine 204: event_hooks = {} if event_hooks is None else event_hooks","file":"httpx/_client.py","line":204,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 215: self._event_hooks = {","file":"httpx/_client.py","line":215,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 216: \"request\": list(event_hooks.get(\"request\", [])),","file":"httpx/_client.py","line":216,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 217: \"response\": list(event_hooks.get(\"response\", [])),","file":"httpx/_client.py","line":217,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 262: def event_hooks(self) -> dict[str, list[EventHook]]:","file":"httpx/_client.py","line":262,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 263: return self._event_hooks","file":"httpx/_client.py","line":263,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 265: @event_hooks.setter","file":"httpx/_client.py","line":265,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 266: def event_hooks(self, event_hooks: dict[str, list[EventHook]]) -> None:","file":"httpx/_client.py","line":266,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 267: self._event_hooks = {","file":"httpx/_client.py","line":267,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 268: \"request\": list(event_hooks.get(\"request\", [])),","file":"httpx/_client.py","line":268,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 269: \"response\": list(event_hooks.get(\"response\", [])),","file":"httpx/_client.py","line":269,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 657: event_hooks: None | (typing.Mapping[str, list[EventHook]]) = None,","file":"httpx/_client.py","line":657,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 670: event_hooks=event_hooks,","file":"httpx/_client.py","line":670,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 976: for hook in self._event_hooks[\"request\"]:","file":"httpx/_client.py","line":976,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Le mécanisme de gestion du tampon de lecture ne permet pas de définir une taille de bloc spécifique lors de l'initialisation, ce qui peut entraîner une consommation de mémoire imprévue lors du décodage des flux.","query":"buffer chunk size","file":"httpx/_decoders.py","symbol":"__init__","line":233,"lang":"fr","candidates":[{"text":"File: httpx/_decoders.py\nLine 242: if self._buffer.tell() >= self._chunk_size:","file":"httpx/_decoders.py","line":242,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_decoders.py\nLine 281: if self._buffer.tell() >= self._chunk_size:","file":"httpx/_decoders.py","line":281,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Aufgabe: Setzt die Kodierung des HTTP-Modells auf den angegebenen Wert und überschreibt damit eventuelle vorherige Einstellungen.","query":"set encoding","file":"httpx/_models.py","symbol":"encoding","line":192,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 110: * Raise `ValueError` on `Response.encoding` being set after `Response.text` has been accessed. (#2852)","file":"CHANGELOG.md","line":110,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 207: * Use `utf-8` as the default character set, instead of falling back to `charset-normalizer` for auto-detection. To enable automatic character set detection, see [the documentation](https://www.python-httpx.org/advanced/text-encodings/#using-auto-detection)…","file":"CHANGELOG.md","line":207,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 812: * Fallback to setting headers as UTF-8 if no encoding is specified. (Pull #820)","file":"CHANGELOG.md","line":812,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 58: …ontrol', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Thu, 21 Oct 2021 17:08:42 GMT'), (b'Etag', b'\"3147526947+ident\"'), (b'Expires', b'Thu, 28 Oct 2021 17:08:42 GMT'), (b'Last-Modified', b'Thu, 17 Oct 2019 07:18:26 GMT')…","file":"docs/advanced/extensions.md","line":58,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 5: In cases where no charset information is included on the response, the default behaviour is to assume \"utf-8\" encoding, which is by far the most widely used text encoding on the internet.","file":"docs/advanced/text-encodings.md","line":5,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 17: print(response.encoding) # This will either print the charset given in","file":"docs/advanced/text-encodings.md","line":17,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 23: … with a properly formatted Content-Type header, including a charset encoding. And in most cases where no charset encoding is included, UTF-8 is very likely to be used, since it is so widely adopted.","file":"docs/advanced/text-encodings.md","line":23,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 27: In some cases we might be making requests to a site where no character set information is being set explicitly by the server, but we know what the encoding is. In this case it's best to set the default encoding explicitly on the client.","file":"docs/advanced/text-encodings.md","line":27,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 31: # Instantiate a client with a Japanese character set as the default encoding.","file":"docs/advanced/text-encodings.md","line":31,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 35: print(response.encoding) # This will either print the charset given in","file":"docs/advanced/text-encodings.md","line":35,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 43: In cases where the server is not reliably including character set information, and where we don't know what encoding is being used, we can enable auto-detection to make a best-guess attempt when decoding from bytes to text.","file":"docs/advanced/text-encodings.md","line":43,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 45: To use auto-detection you need to set the `default_encoding` argument to a callable instead of a string. This callable should be a function which takes the input bytes as an argument and returns the character set to use for decoding those bytes to text.","file":"docs/advanced/text-encodings.md","line":45,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 71: print(response.encoding) # This will either print the charset given in","file":"docs/advanced/text-encodings.md","line":71,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/compatibility.md\nLine 101: …or response bodies, assuming the server didn't send an explicit encoding then HTTPX will do its best to figure out an appropriate encoding. HTTPX makes a guess at the encoding to use for decoding the response using `charset_normalizer`. Fallback to that or…","file":"docs/compatibility.md","line":101,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/logging.md\nLine 32: …ers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Encoding', b'gzip'), (b'Accept-Ranges', b'bytes'), (b'Age', b'407727'), (b'Cache-Control', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Sat, 28 Sep 2024 13:2…","file":"docs/logging.md","line":32,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/quickstart.md\nLine 85: If you need to override the standard behaviour and explicitly set the encoding to","file":"docs/quickstart.md","line":85,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 191: @encoding.setter","file":"httpx/_models.py","line":191,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_models.py\nLine 309: set_key = key.encode(self._encoding or \"utf-8\")","file":"httpx/_models.py","line":309,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 310: set_value = value.encode(self._encoding or \"utf-8\")","file":"httpx/_models.py","line":310,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 443: # Ignore Transfer-Encoding if the Content-Length has been set explicitly.","file":"httpx/_models.py","line":443,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 573: # Ignore Transfer-Encoding if the Content-Length has been set explicitly.","file":"httpx/_models.py","line":573,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 658: * `.encoding = <>` has been set explicitly.","file":"httpx/_models.py","line":658,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 659: * The encoding as specified by the charset parameter in the Content-Type header.","file":"httpx/_models.py","line":659,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 665: encoding = self.charset_encoding","file":"httpx/_models.py","line":665,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 674: @encoding.setter","file":"httpx/_models.py","line":674,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 677: Set the encoding to use for decoding the byte content into text.","file":"httpx/_models.py","line":677,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 684: \"Setting encoding after `text` has been accessed is not allowed.\"","file":"httpx/_models.py","line":684,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 689: def charset_encoding(self) -> str | None:","file":"httpx/_models.py","line":689,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 412: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/client/test_client.py","line":412,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_headers.py\nLine 148: An explicit encoding may be set on headers in order to force a","file":"tests/models/test_headers.py","line":148,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 124: `Transfer-Encoding` should be ignored if `Content-Length` has been set explicitly.","file":"tests/models/test_requests.py","line":124,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 159: Use the charset encoding in the Content-Type header if possible.","file":"tests/models/test_responses.py","line":159,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Ich implementiere einen synchronen Authentifizierungsfluss, der eine Anfrage liest und dann die Antwort verarbeitet. Der Code muss die Generator-Semantik correctly handhaben, um den zustandsbehafteten Ablauf zu steuern.","query":"sync auth flow","file":"httpx/_auth.py","symbol":"sync_auth_flow","line":62,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 508: * Added support for authentication flows which require either sync or async I/O. (Pull #1217)","file":"CHANGELOG.md","line":508,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 185: …ncurrency primitives, such as locks, then you should override `.sync_auth_flow()` and `.async_auth_flow()` (instead of `.auth_flow()`). The former will be used by `httpx.Client`, while the latter will be used by `httpx.AsyncClient`.","file":"docs/advanced/authentication.md","line":185,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 202: def sync_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":202,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 211: async def async_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":211,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 225: def sync_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":225,"lexical":0.65,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 230: async def async_auth_flow(self, request):","file":"docs/advanced/authentication.md","line":230,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 30: synchronization primitives such as locks, you should override `.sync_auth_flow()`","file":"httpx/_auth.py","line":30,"lexical":0.65,"target":true},{"text":"File: httpx/_auth.py\nLine 31: and/or `.async_auth_flow()` instead of `.auth_flow()` to provide specialized","file":"httpx/_auth.py","line":31,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 62: def sync_auth_flow(","file":"httpx/_auth.py","line":62,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 66: Execute the authentication flow synchronously.","file":"httpx/_auth.py","line":66,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 87: async def async_auth_flow(","file":"httpx/_auth.py","line":87,"lexical":0.65,"target":false},{"text":"File: httpx/_auth.py\nLine 91: Execute the authentication flow asynchronously.","file":"httpx/_auth.py","line":91,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 937: auth_flow = auth.sync_auth_flow(request)","file":"httpx/_client.py","line":937,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1652: auth_flow = auth.async_auth_flow(request)","file":"httpx/_client.py","line":1652,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 147: def sync_auth_flow(","file":"tests/client/test_auth.py","line":147,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 154: async def async_auth_flow(","file":"tests/client/test_auth.py","line":154,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 19: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":19,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 34: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":34,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 49: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":49,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 74: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":74,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 90: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":90,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 126: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":126,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 154: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":154,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 203: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":203,"lexical":0.65,"target":false},{"text":"File: tests/test_auth.py\nLine 263: flow = auth.sync_auth_flow(request)","file":"tests/test_auth.py","line":263,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy escribiendo más casos de prueba para las respuestas de la API. ¿Podrías buscarme una función que verifique si el parseo de JSON funciona correctamente con diferentes tipos de codificación de caracteres?","query":"test json encoding","file":"tests/test_utils.py","symbol":"test_encoded","line":25,"lang":"es","candidates":[{"text":"File: tests/models/test_responses.py\nLine 789: def test_json_with_specified_encoding():","file":"tests/models/test_responses.py","line":789,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 826: def test_json_without_specified_charset(encoding):","file":"tests/models/test_responses.py","line":826,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 851: def test_json_with_specified_charset(encoding):","file":"tests/models/test_responses.py","line":851,"lexical":0.65,"target":false},{"text":"File: tests/models/test_whatwg.py\nLine 13: with open(\"tests/models/whatwg.json\", \"r\", encoding=\"utf-8\") as input:","file":"tests/models/test_whatwg.py","line":13,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找从响应头获取字符编码的方法","query":"content-type charset","file":"httpx/_models.py","symbol":"charset_encoding","line":689,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 343: * Add automatic character set detection, when no `charset` is included in the response `Content-Type` header. (Pull #1791)","file":"CHANGELOG.md","line":343,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 58: …[(b'Age', b'553715'), (b'Cache-Control', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Thu, 21 Oct 2021 17:08:42 GMT'), (b'Etag', b'\"3147526947+ident\"'), (b'Expires', b'Thu, 28 Oct 2021 17:08:42 GMT'), (b'Last-Modified', b…","file":"docs/advanced/extensions.md","line":58,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 3: By default `httpx` will use `\"charset\"` information included in the response `Content-Type` header to determine how the response bytes should be decoded into text.","file":"docs/advanced/text-encodings.md","line":3,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 18: # the Content-Type charset, or else \"utf-8\".","file":"docs/advanced/text-encodings.md","line":18,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 23: …utely fine. Most servers will respond with a properly formatted Content-Type header, including a charset encoding. And in most cases where no charset encoding is included, UTF-8 is very likely to be used, since it is so widely adopted.","file":"docs/advanced/text-encodings.md","line":23,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 36: # the Content-Type charset, or else \"shift-jis\".","file":"docs/advanced/text-encodings.md","line":36,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 72: # the Content-Type charset, or else the auto-detected","file":"docs/advanced/text-encodings.md","line":72,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/logging.md\nLine 32: … (b'Age', b'407727'), (b'Cache-Control', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Sat, 28 Sep 2024 13:27:42 GMT'), (b'Etag', b'\"3147526947+gzip\"'), (b'Expires', b'Sat, 05 Oct 2024 13:27:42 GMT'), (b'Last-Modified', b'…","file":"docs/logging.md","line":32,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 635: response text, if no charset information is included in a response Content-Type","file":"httpx/_client.py","line":635,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_client.py\nLine 1349: response text, if no charset information is included in a response Content-Type","file":"httpx/_client.py","line":1349,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_models.py\nLine 659: * The encoding as specified by the charset parameter in the Content-Type header.","file":"httpx/_models.py","line":659,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/client/test_client.py\nLine 412: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/client/test_client.py","line":412,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 440: # when no \"Content-Type: text/plain; charset=...\"\" info is present.","file":"tests/client/test_client.py","line":440,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 63: \"Content-Type\": \"text/plain; charset=utf-8\",","file":"tests/models/test_responses.py","line":63,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 75: \"Content-Type\": \"text/html; charset=utf-8\",","file":"tests/models/test_responses.py","line":75,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 159: Use the charset encoding in the Content-Type header if possible.","file":"tests/models/test_responses.py","line":159,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 161: headers = {\"Content-Type\": \"text-plain; charset=latin-1\"}","file":"tests/models/test_responses.py","line":161,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 187: Fallback to utf-8 if we get an invalid charset in the Content-Type header.","file":"tests/models/test_responses.py","line":187,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 189: headers = {\"Content-Type\": \"text-plain; charset=invalid-codec-name\"}","file":"tests/models/test_responses.py","line":189,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 277: \"Content-Type\": \"text-plain; charset=utf-8\"","file":"tests/models/test_responses.py","line":277,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 792: headers = {\"Content-Type\": \"application/json, charset=utf-16\"}","file":"tests/models/test_responses.py","line":792,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 804: headers = {\"Content-Type\": \"application/json, charset=utf-16\"}","file":"tests/models/test_responses.py","line":804,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 854: headers = {\"Content-Type\": f\"application/json; charset={encoding}\"}","file":"tests/models/test_responses.py","line":854,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 998: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/models/test_responses.py","line":998,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 1023: # when no \"Content-Type: text/plain; charset=...\"\" info is present.","file":"tests/models/test_responses.py","line":1023,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_decoders.py\nLine 275: headers=[(b\"Content-Type\", b\"text/html; charset=shift-jis\")],","file":"tests/test_decoders.py","line":275,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estou tentando validar como o cliente lida com múltiplos valores para a mesma chave no cabeçalho. Você pode me mostrar onde está a função que simula um servidor devolvendo todos os itens de um cabeçalho repetido no corpo da resposta?","query":"repeated headers echo","file":"tests/client/test_headers.py","symbol":"echo_repeated_headers_multi_items","line":13,"lang":"pt","candidates":[{"text":"File: tests/client/test_headers.py\nLine 13: def echo_repeated_headers_multi_items(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_headers.py","line":13,"lexical":0.65,"target":true},{"text":"File: tests/client/test_headers.py\nLine 18: def echo_repeated_headers_items(request: httpx.Request) -> httpx.Response:","file":"tests/client/test_headers.py","line":18,"lexical":0.65,"target":false},{"text":"File: tests/client/test_headers.py\nLine 125: client = httpx.Client(transport=httpx.MockTransport(echo_repeated_headers_items))","file":"tests/client/test_headers.py","line":125,"lexical":0.65,"target":false},{"text":"File: tests/client/test_headers.py\nLine 141: transport=httpx.MockTransport(echo_repeated_headers_multi_items)","file":"tests/client/test_headers.py","line":141,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我正在写测试用例,需要一个能把现有的私钥转换成带密码加密格式的临时文件的方法。能不能帮我找一下这个转换逻辑?","query":"encrypted private key","file":"tests/conftest.py","symbol":"cert_encrypted_private_key_file","line":208,"lang":"zh","candidates":[{"text":"File: tests/conftest.py\nLine 208: def cert_encrypted_private_key_file(localhost_cert):","file":"tests/conftest.py","line":208,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/conftest.py\nLine 213: encrypted_private_key_pem = trustme.Blob(","file":"tests/conftest.py","line":213,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/conftest.py\nLine 220: with encrypted_private_key_pem.tempfile() as tmp:","file":"tests/conftest.py","line":220,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_config.py\nLine 52: cert_pem_file, cert_encrypted_private_key_file, password","file":"tests/test_config.py","line":52,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_config.py\nLine 55: context.load_cert_chain(cert_pem_file, cert_encrypted_private_key_file, password)","file":"tests/test_config.py","line":55,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_config.py\nLine 61: cert_pem_file, cert_encrypted_private_key_file","file":"tests/test_config.py","line":61,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_config.py\nLine 66: cert_pem_file, cert_encrypted_private_key_file, \"password1\"","file":"tests/test_config.py","line":66,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我正在写关于客户端鉴权的测试用例。帮我找一下那个用来模拟异步请求流并确保它是异步字节流类型的辅助方法。","query":"async request stream","file":"tests/client/test_auth.py","symbol":"handle_async_request","line":689,"lang":"zh","candidates":[{"text":"File: docs/async.md\nLine 109: When sending a streaming request body with an `AsyncClient` instance, you should use an async bytes generator instead of a bytes generator:","file":"docs/async.md","line":109,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1724: if not isinstance(request.stream, AsyncByteStream):","file":"httpx/_client.py","line":1724,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/asgi.py\nLine 103: assert isinstance(request.stream, AsyncByteStream)","file":"httpx/_transports/asgi.py","line":103,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 378: assert isinstance(request.stream, AsyncByteStream)","file":"httpx/_transports/default.py","line":378,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 93: async def test_stream_request(server):","file":"tests/client/test_async_client.py","line":93,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 104: async def test_cannot_stream_sync_request(server):","file":"tests/client/test_async_client.py","line":104,"lexical":0.65,"target":false},{"text":"File: tests/client/test_auth.py\nLine 690: assert isinstance(request.stream, httpx.AsyncByteStream)","file":"tests/client/test_auth.py","line":690,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/client/test_auth.py\nLine 691: [_ async for _ in request.stream]","file":"tests/client/test_auth.py","line":691,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 124: def test_cannot_stream_async_request(server):","file":"tests/client/test_client.py","line":124,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 96: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/models/test_requests.py","line":96,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 97: content = b\"\".join([part async for part in request.stream])","file":"tests/models/test_requests.py","line":97,"lexical":0.65,"target":false},{"text":"File: tests/models/test_requests.py\nLine 196: async def test_request_async_streaming_content_picklable():","file":"tests/models/test_requests.py","line":196,"lexical":0.65,"target":false},{"text":"File: tests/test_content.py\nLine 16: assert isinstance(request.stream, httpx.AsyncByteStream)","file":"tests/test_content.py","line":16,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 19: async_content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":19,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 30: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":30,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 33: async_content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":33,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 43: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":43,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 46: async_content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":46,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 57: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":57,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 82: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":82,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 84: content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 101: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":101,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 118: assert not isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":118,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 137: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":137,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 139: content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":139,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 148: [part async for part in request.stream]","file":"tests/test_content.py","line":148,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 154: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 156: content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":156,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 169: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 172: async_content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":172,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 187: assert isinstance(request.stream, typing.AsyncIterable)","file":"tests/test_content.py","line":187,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 190: async_content = b\"\".join([part async for part in request.stream])","file":"tests/test_content.py","line":190,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"クエリパラメータから指定したキーの最初の値を取得する関数を書く","query":"query params get","file":"httpx/_urls.py","symbol":"get","line":512,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 538: * The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed.","file":"CHANGELOG.md","line":538,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 602: * The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants.","file":"CHANGELOG.md","line":602,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 645: * The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. (Pull #1089)","file":"CHANGELOG.md","line":645,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 220: For both query params (`params=`) and form data (`data=`), `requests` supports sending a list of tuples (e.g. `requests.get(..., params=[('key1', 'value1'), ('key1', 'value2')])`). This is not supported by HTTPX. Instead, use a dictionary with lists as val…","file":"docs/compatibility.md","line":220,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 437: Merge a queryparams argument together with any queryparams on the client,","file":"httpx/_client.py","line":437,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_queryparams.py\nLine 32: response = client.get(url, params=request_queryparams)","file":"tests/client/test_queryparams.py","line":32,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"非同期クライアントを使って、HTTPレスポンスのステータスコードによってエラーが正しくスローされるか検証しているテストコードを探しています。特に、400番台や500番台の時に例外が発生するかどうかをチェックしている箇所を知りたいです。","query":"test raise_for_status","file":"tests/client/test_async_client.py","symbol":"test_raise_for_status","line":115,"lang":"ja","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 115: async def test_raise_for_status(server):","file":"tests/client/test_async_client.py","line":115,"lexical":0.6000000000000001,"target":true},{"text":"File: tests/client/test_client.py\nLine 134: def test_raise_for_status(server):","file":"tests/client/test_client.py","line":134,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/models/test_responses.py\nLine 91: def test_raise_for_status():","file":"tests/models/test_responses.py","line":91,"lexical":0.6000000000000001,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Parece que cuando se intenta configurar la seguridad de la conexión TLS, no se están respetando correctamente las rutas de los certificados de confianza definidas en las variables de entorno del sistema, o bien la lógica de validación de certificados no está manejando bien la distinción entre usar la tienda de certificados del sistema o la de certifi.","query":"ssl context verify","file":"httpx/_config.py","symbol":"create_ssl_context","line":23,"lang":"es","candidates":[{"text":"File: CHANGELOG.md\nLine 31: *For users of the standard `verify=True` or `verify=False` cases, or `verify=<ssl_context>` case this should require no changes. The following cases have been deprecated...*","file":"CHANGELOG.md","line":31,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 1082: - Accept `ssl.SSLContext` instances into `SSLConfig(verify=...)`. (Pull #215)","file":"CHANGELOG.md","line":1082,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/ssl.md\nLine 32: # This SSL context is equivalent to the default `verify=True`.","file":"docs/advanced/ssl.md","line":32,"lexical":0.65,"target":false},{"text":"File: docs/logging.md\nLine 25: DEBUG [2024-09-28 17:27:41] httpcore.connection - start_tls.started ssl_context=SSLContext(verify=True) server_hostname='www.example.com' timeout=5.0","file":"docs/logging.md","line":25,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 54: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":54,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 85: * **verify** - *(optional)* Either `True` to use an SSL context with the","file":"httpx/_api.py","line":85,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 139: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":139,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 183: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":183,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 219: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":219,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 255: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":255,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 295: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":295,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 336: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":336,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 377: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":377,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 415: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_api.py","line":415,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 617: * **verify** - *(optional)* Either `True` to use an SSL context with the","file":"httpx/_client.py","line":617,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 646: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":646,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 720: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":720,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 743: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":743,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1331: * **verify** - *(optional)* Either `True` to use an SSL context with the","file":"httpx/_client.py","line":1331,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1360: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":1360,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1434: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":1434,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1457: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_client.py","line":1457,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 24: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_config.py","line":24,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_config.py\nLine 48: \"Use `verify=ssl.create_default_context(cafile=...)` \"","file":"httpx/_config.py","line":48,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 49: \"or `verify=ssl.create_default_context(capath=...)` instead.\"","file":"httpx/_config.py","line":49,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 53: return ssl.create_default_context(capath=verify)","file":"httpx/_config.py","line":53,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 54: return ssl.create_default_context(cafile=verify)","file":"httpx/_config.py","line":54,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_config.py\nLine 60: \"`cert=...` is deprecated. Use `verify=<ssl_context>` instead,\"","file":"httpx/_config.py","line":60,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 138: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_transports/default.py","line":138,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 153: ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)","file":"httpx/_transports/default.py","line":153,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 282: verify: ssl.SSLContext | str | bool = True,","file":"httpx/_transports/default.py","line":282,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_transports/default.py\nLine 297: ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)","file":"httpx/_transports/default.py","line":297,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"El hook de eventos no está capturando los encabezados de la petición cuando se dispara el evento de solicitud.","query":"event request headers","file":"tests/client/test_event_hooks.py","symbol":"on_request","line":70,"lang":"es","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 20: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":20,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 71: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":71,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 126: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":126,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 183: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":183,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Comment est-ce que les en-têtes et la ligne de requête sont transformés en chaîne de caractères pour l'affichage ?","query":"format request headers","file":"httpx/_main.py","symbol":"format_request_headers","line":116,"lang":"fr","candidates":[{"text":"File: docs/advanced/event-hooks.md\nLine 44: request.headers['x-request-timestamp'] = datetime.now(tz=datetime.utc).isoformat()","file":"docs/advanced/event-hooks.md","line":44,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 116: def format_request_headers(request: httpcore.Request, http2: bool = False) -> str:","file":"httpx/_main.py","line":116,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_main.py\nLine 149: http_text = format_request_headers(request, http2=http2)","file":"httpx/_main.py","line":149,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"테스트 코드를 작성 중인데, 실제 네트워크 통신 없이 요청을 가로채서 원하는 응답을 반환해 주는 가짜 전송 계층 구현체를 찾고 있어요. 동기 방식과 비동기 방식 모두에서 동작하도록 설계된 클래스가 어디에 있나요?","query":"mock transport handler","file":"httpx/_transports/mock.py","symbol":"MockTransport","line":15,"lang":"ko","candidates":[{"text":"File: docs/advanced/transports.md\nLine 251: The `httpx.MockTransport` class accepts a handler function, which can be used","file":"docs/advanced/transports.md","line":251,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 261: transport = httpx.MockTransport(handler)","file":"docs/advanced/transports.md","line":261,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 322: mounts = {\"all://example.org\": httpx.MockTransport(handler)}","file":"docs/advanced/transports.md","line":322,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estou revisando a lógica de tratamento de endereços web para garantir que não haja redundância. Você poderia encontrar o teste que verifica se a porta é removida quando coincide com o padrão do protocolo?","query":"url port normalized","file":"tests/models/test_url.py","symbol":"test_url_normalized_port","line":246,"lang":"pt","candidates":[{"text":"File: docs/api.md\nLine 109: *A normalized, IDNA supporting URL.*","file":"docs/api.md","line":109,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_url.py\nLine 246: def test_url_normalized_port():","file":"tests/models/test_url.py","line":246,"lexical":0.65,"target":true}]}
{"site":"project_search","repo":"httpx","task":"レスポンスのヘッダーにエンコーディングが指定されていない場合に、デフォルトでUTF-8として扱われるか確認するテストコードを探しています。日本語の文字列が正しくデコードされるかを確認したいです。","query":"response default encoding","file":"tests/models/test_responses.py","symbol":"test_response_default_to_utf8_encoding","line":172,"lang":"ja","candidates":[{"text":"File: docs/advanced/text-encodings.md\nLine 5: In cases where no charset information is included on the response, the default behaviour is to assume \"utf-8\" encoding, which is by far the most widely used text encoding on the internet.","file":"docs/advanced/text-encodings.md","line":5,"lexical":0.65,"target":false},{"text":"File: httpx/_client.py\nLine 1023: response.default_encoding = self._default_encoding","file":"httpx/_client.py","line":1023,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1738: response.default_encoding = self._default_encoding","file":"httpx/_client.py","line":1738,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 411: # Ensure that a 'default_encoding=autodetect' on the response allows for","file":"tests/client/test_client.py","line":411,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 439: # Ensure that a 'default_encoding=\"...\"' on the response is used for text decoding","file":"tests/client/test_client.py","line":439,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 172: def test_response_default_to_utf8_encoding():","file":"tests/models/test_responses.py","line":172,"lexical":0.65,"target":true},{"text":"File: tests/models/test_responses.py\nLine 997: # Ensure that a 'default_encoding=\"autodetect\"' on the response allows for","file":"tests/models/test_responses.py","line":997,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 1010: response = httpx.Response(200, content=content, default_encoding=autodetect)","file":"tests/models/test_responses.py","line":1010,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 1022: # Ensure that a 'default_encoding=\"...\"' on the response is used for text decoding","file":"tests/models/test_responses.py","line":1022,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 1035: response = httpx.Response(200, content=content, default_encoding=\"cp1252\")","file":"tests/models/test_responses.py","line":1035,"lexical":0.65,"target":false},{"text":"File: tests/test_decoders.py\nLine 254: response = httpx.Response(200, content=iterator(), default_encoding=autodetect)","file":"tests/test_decoders.py","line":254,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"How do we verify that certain header values are masked when they are printed or represented as a string?","query":"obfuscate sensitive headers","file":"tests/models/test_headers.py","symbol":"test_sensitive_headers","line":170,"lang":"en","candidates":[{"text":"File: httpx/_models.py\nLine 130: def _obfuscate_sensitive_headers(","file":"httpx/_models.py","line":130,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 373: as_list = list(_obfuscate_sensitive_headers(self.multi_items()))","file":"httpx/_models.py","line":373,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_headers.py\nLine 172: Some headers should be obfuscated because they contain sensitive data.","file":"tests/models/test_headers.py","line":172,"lexical":0.65,"target":true},{"text":"File: tests/models/test_headers.py\nLine 187: def test_obfuscate_sensitive_headers(headers, output):","file":"tests/models/test_headers.py","line":187,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy revisando la lógica de los decodificadores de respuesta. ¿Podrías mostrarme dónde se prueba que el cliente pueda manejar múltiples codificaciones cuando una de ellas es la identidad?","query":"Content-Encoding identity","file":"tests/test_decoders.py","symbol":"test_multi_with_identity","line":164,"lang":"es","candidates":[{"text":"File: tests/test_decoders.py\nLine 168: headers = [(b\"Content-Encoding\", b\"br, identity\")]","file":"tests/test_decoders.py","line":168,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/test_decoders.py\nLine 176: headers = [(b\"Content-Encoding\", b\"identity, br\")]","file":"tests/test_decoders.py","line":176,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"find method to append a value to a specific key in url query parameters","query":"query params add","file":"httpx/_urls.py","symbol":"add","line":552,"lang":"en","candidates":[{"text":"File: CHANGELOG.md\nLine 400: * The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.updat…","file":"CHANGELOG.md","line":400,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 408: * Add `url.params` parameter, returning an immutable `QueryParams` instance. (Pull #1601)","file":"CHANGELOG.md","line":408,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 409: * Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)","file":"CHANGELOG.md","line":409,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 1030: - Add `params` parameter to `Client` for setting default query parameters. (Pull #372)","file":"CHANGELOG.md","line":1030,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_urls.py\nLine 552: def add(self, key: str, value: typing.Any = None) -> QueryParams:","file":"httpx/_urls.py","line":552,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"서버로부터 스트리밍 방식으로 응답을 받을 때 데이터가 정상적으로 읽히는지 확인하는 테스트 케이스가 누락되었거나 동작하지 않는 것 같습니다. 클라이언트 라이브러리를 사용하여 HTTP 스트림 응답의 본문 내용을 검증하는 로직을 확인해 주세요.","query":"httpx stream response","file":"tests/client/test_client.py","symbol":"test_stream_response","line":92,"lang":"ko","candidates":[{"text":"File: CHANGELOG.md\nLine 399: * The runtime exception `httpx.ResponseClosed` is now named `httpx.StreamClosed`. (#1584)","file":"CHANGELOG.md","line":399,"lexical":0.44999999999999996,"target":false},{"text":"File: CHANGELOG.md\nLine 573: * If a transport error occurs while streaming the response, raise an `httpx` exception, not the underlying `httpcore` exception. (Pull #1190)","file":"CHANGELOG.md","line":573,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 195: with httpx.stream(\"GET\", url) as response:","file":"docs/advanced/clients.md","line":195,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 217: with httpx.stream(\"GET\", url) as response:","file":"docs/advanced/clients.md","line":217,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 237: with httpx.stream(\"GET\", \"https://www.example.com\") as response:","file":"docs/advanced/extensions.md","line":237,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 131: HTTPX provides a `.stream()` interface rather than using `stream=True`. This ensures that streaming responses are always properly closed outside of the stream block, and makes it visually clearer at which points streaming I/O APIs may be used with a respon…","file":"docs/compatibility.md","line":131,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 136: with httpx.stream(\"GET\", \"https://www.example.com\") as response:","file":"docs/compatibility.md","line":136,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 143: Alternative to `httpx.request()` that streams the response body","file":"httpx/_api.py","line":143,"lexical":0.55,"target":false},{"text":"File: httpx/_client.py\nLine 846: Alternative to `httpx.request()` that streams the response body","file":"httpx/_client.py","line":846,"lexical":0.55,"target":false},{"text":"File: httpx/_client.py\nLine 1561: Alternative to `httpx.request()` that streams the response body","file":"httpx/_client.py","line":1561,"lexical":0.55,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 361: transport = httpx.MockTransport(response_with_cancel_during_stream)","file":"tests/client/test_async_client.py","line":361,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 399: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":399,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 403: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":403,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 407: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":407,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 411: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":411,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 423: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":423,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 462: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":462,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 472: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":472,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 482: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":482,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 487: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":487,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 492: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":492,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 522: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":522,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 540: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":540,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 544: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":544,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 548: response = httpx.Response(200, content=streaming_body())","file":"tests/models/test_responses.py","line":548,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 566: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":566,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 587: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":587,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 591: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":591,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 595: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":595,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 978: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":978,"lexical":0.65,"target":false},{"text":"File: tests/models/test_responses.py\nLine 988: response = httpx.Response(200, content=async_streaming_body())","file":"tests/models/test_responses.py","line":988,"lexical":0.65,"target":false},{"text":"File: tests/test_api.py\nLine 76: with httpx.stream(\"GET\", server.url) as response:","file":"tests/test_api.py","line":76,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"trouve la méthode qui permet de parcourir l'objet avec une boucle dans les tests","query":"yield b\"test","file":"tests/models/test_requests.py","symbol":"__iter__","line":26,"lang":"fr","candidates":[{"text":"File: tests/models/test_requests.py\nLine 27: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_requests.py","line":27,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_requests.py\nLine 35: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_requests.py","line":35,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 43: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_requests.py","line":43,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_requests.py\nLine 216: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_requests.py","line":216,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 943: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_responses.py","line":943,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 951: yield b\"test 123\" # pragma: no cover","file":"tests/models/test_responses.py","line":951,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找验证状态码字符串映射到正确数字的测试用例","query":"status code lookup","file":"tests/test_status_codes.py","symbol":"test_status_code_phrase_lookup","line":14,"lang":"zh","candidates":[{"text":"File: tests/test_status_codes.py\nLine 10: def test_status_code_value_lookup():","file":"tests/test_status_codes.py","line":10,"lexical":0.65,"target":true},{"text":"File: tests/test_status_codes.py\nLine 14: def test_status_code_phrase_lookup():","file":"tests/test_status_codes.py","line":14,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"我遇到了一个读取超时的 Bug。当我使用 httpx 客户端请求一个响应缓慢的端点(/slow_response)时,即使设置了极短的读取超时时间(1e-6 秒),程序也没有按预期抛出 httpx.ReadTimeout 异常。请帮我检查相关的测试代码,确认超时逻辑是否正确实现。","query":"read timeout test","file":"tests/test_timeouts.py","symbol":"test_read_timeout","line":7,"lang":"zh","candidates":[{"text":"File: tests/test_exceptions.py\nLine 47: with pytest.raises(httpx.ReadTimeout):","file":"tests/test_exceptions.py","line":47,"lexical":0.65,"target":false},{"text":"File: tests/test_timeouts.py\nLine 7: async def test_read_timeout(server):","file":"tests/test_timeouts.py","line":7,"lexical":0.65,"target":true},{"text":"File: tests/test_timeouts.py\nLine 11: with pytest.raises(httpx.ReadTimeout):","file":"tests/test_timeouts.py","line":11,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Vérifier que la commande CLI retourne bien un statut 200 et le corps de réponse attendu. Contrôler également que les en-têtes HTTP sont corrects et exempts de la date.","query":"cli httpx response","file":"tests/test_main.py","symbol":"test_get","line":24,"lang":"fr","candidates":[{"text":"File: docs/advanced/event-hooks.md\nLine 19: client = httpx.Client(event_hooks={'request': [log_request], 'response': [log_response]})","file":"docs/advanced/event-hooks.md","line":19,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 30: client = httpx.Client(event_hooks={'response': [raise_on_4xx_5xx]})","file":"docs/advanced/event-hooks.md","line":30,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"查找验证异步流式文本分块逻辑的测试用例","query":"aiter_text chunk_size","file":"tests/models/test_responses.py","symbol":"test_aiter_text_with_chunk_size","line":648,"lang":"zh","candidates":[{"text":"File: docs/api.md\nLine 85: * `def .aiter_text([chunk_size])` - **async text iterator**","file":"docs/api.md","line":85,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 648: async def test_aiter_text_with_chunk_size():","file":"tests/models/test_responses.py","line":648,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_responses.py\nLine 650: parts = [part async for part in response.aiter_text(chunk_size=5)]","file":"tests/models/test_responses.py","line":650,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 654: parts = [part async for part in response.aiter_text(chunk_size=13)]","file":"tests/models/test_responses.py","line":654,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 658: parts = [part async for part in response.aiter_text(chunk_size=20)]","file":"tests/models/test_responses.py","line":658,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"I'm trying to understand how this object handles identity when used in a set or as a dictionary key. Can you show me how the internal value used for hashing is determined?","query":"return hash","file":"httpx/_utils.py","symbol":"__hash__","line":219,"lang":"en","candidates":[{"text":"File: httpx/_auth.py\nLine 261: return hash_func(data).hexdigest().encode()","file":"httpx/_auth.py","line":261,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_auth.py\nLine 309: return hashlib.sha1(s).hexdigest()[:16].encode()","file":"httpx/_auth.py","line":309,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urls.py\nLine 369: return hash(str(self))","file":"httpx/_urls.py","line":369,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_urls.py\nLine 616: return hash(str(self))","file":"httpx/_urls.py","line":616,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_utils.py\nLine 220: return hash(self.pattern)","file":"httpx/_utils.py","line":220,"lexical":0.39999999999999997,"target":true}]}
{"site":"project_search","repo":"httpx","task":"I am trying to verify the lifecycle of the networking layer during teardown. Can you find the logic that records whether the connection handler has been shut down?","query":"transport close events","file":"tests/client/test_client.py","symbol":"close","line":237,"lang":"en","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 193: self.events.append(\"transport.aclose\")","file":"tests/client/test_async_client.py","line":193,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 242: self.events.append(\"transport.close\")","file":"tests/client/test_client.py","line":242,"lexical":0.44999999999999996,"target":true}]}
{"site":"project_search","repo":"httpx","task":"빈 청크가 포함된 스트리밍 응답 생성 로직 찾아줘","query":"streaming empty chunks","file":"tests/models/test_responses.py","symbol":"streaming_body_with_empty_chunks","line":417,"lang":"ko","candidates":[{"text":"File: tests/models/test_responses.py\nLine 417: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":417,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_responses.py\nLine 423: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":423,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 560: def streaming_body_with_empty_chunks() -> typing.Iterator[bytes]:","file":"tests/models/test_responses.py","line":560,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 566: response = httpx.Response(200, content=streaming_body_with_empty_chunks())","file":"tests/models/test_responses.py","line":566,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"헤더의 인코딩 설정이 응답 텍스트에 반영되는지 확인하는 테스트 찾아줘","query":"content-type charset encoding","file":"tests/models/test_responses.py","symbol":"test_response_content_type_encoding","line":157,"lang":"ko","candidates":[{"text":"File: docs/advanced/extensions.md\nLine 58: …[(b'Age', b'553715'), (b'Cache-Control', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Thu, 21 Oct 2021 17:08:42 GMT'), (b'Etag', b'\"3147526947+ident\"'), (b'Expires', b'Thu, 28 Oct 2021 17:08:42 GMT'), (b'Last-Modified', b…","file":"docs/advanced/extensions.md","line":58,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 23: …utely fine. Most servers will respond with a properly formatted Content-Type header, including a charset encoding. And in most cases where no charset encoding is included, UTF-8 is very likely to be used, since it is so widely adopted.","file":"docs/advanced/text-encodings.md","line":23,"lexical":0.65,"target":false},{"text":"File: docs/logging.md\nLine 32: …ers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Encoding', b'gzip'), (b'Accept-Ranges', b'bytes'), (b'Age', b'407727'), (b'Cache-Control', b'max-age=604800'), (b'Content-Type', b'text/html; charset=UTF-8'), (b'Date', b'Sat, 28 Sep 2024 13:2…","file":"docs/logging.md","line":32,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 659: * The encoding as specified by the charset parameter in the Content-Type header.","file":"httpx/_models.py","line":659,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_client.py\nLine 412: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/client/test_client.py","line":412,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 159: Use the charset encoding in the Content-Type header if possible.","file":"tests/models/test_responses.py","line":159,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_responses.py\nLine 854: headers = {\"Content-Type\": f\"application/json; charset={encoding}\"}","file":"tests/models/test_responses.py","line":854,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_responses.py\nLine 998: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/models/test_responses.py","line":998,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"localiza a função que realiza chamadas de leitura sem corpo de mensagem","query":"send get request","file":"httpx/_api.py","symbol":"get","line":174,"lang":"pt","candidates":[{"text":"File: docs/advanced/clients.md\nLine 53: Once you have a `Client`, you can send requests using `.get()`, `.post()`, etc. For example:","file":"docs/advanced/clients.md","line":53,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 53: # http11.send_request_headers.started {'request': <Request [b'GET']>}","file":"docs/advanced/extensions.md","line":53,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 55: # http11.send_request_body.started {'request': <Request [b'GET']>}","file":"docs/advanced/extensions.md","line":55,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 154: Using the 'target' extension to send requests without the standard path escaping rules...","file":"docs/advanced/extensions.md","line":154,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 42: :members: headers cookies params auth request get head options post put patch delete stream build_request send close","file":"docs/api.md","line":42,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/api.md\nLine 48: :members: headers cookies params auth request get head options post put patch delete stream build_request send aclose","file":"docs/api.md","line":48,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 220: For both query params (`params=`) and form data (`data=`), `requests` supports sending a list of tuples (e.g. `requests.get(..., params=[('key1', 'value1'), ('key1', 'value2')])`). This is not supported by HTTPX. Instead, use a dictionary with lists as val…","file":"docs/compatibility.md","line":220,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 27: DEBUG [2024-09-28 17:27:41] httpcore.http11 - send_request_headers.started request=<Request [b'GET']>","file":"docs/logging.md","line":27,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 29: DEBUG [2024-09-28 17:27:41] httpcore.http11 - send_request_body.started request=<Request [b'GET']>","file":"docs/logging.md","line":29,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_api.py\nLine 188: Sends a `GET` request.","file":"httpx/_api.py","line":188,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 1049: Send a `GET` request.","file":"httpx/_client.py","line":1049,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1764: Send a `GET` request.","file":"httpx/_client.py","line":1764,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"initialisierung der instanz mit dem datenstrom der antwort und dem zeitstempel","query":"stream response start","file":"httpx/_client.py","symbol":"__init__","line":145,"lang":"de","candidates":[{"text":"File: httpx/_api.py\nLine 150: [0]: /quickstart#streaming-responses","file":"httpx/_api.py","line":150,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 146: self, stream: SyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":146,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_client.py\nLine 169: self, stream: AsyncByteStream, response: Response, start: float","file":"httpx/_client.py","line":169,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 853: [0]: /quickstart#streaming-responses","file":"httpx/_client.py","line":853,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1020: response.stream, response=response, start=start","file":"httpx/_client.py","line":1020,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1568: [0]: /quickstart#streaming-responses","file":"httpx/_client.py","line":1568,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_client.py\nLine 1735: response.stream, response=response, start=start","file":"httpx/_client.py","line":1735,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"encontra onde se inicializa o transportador para testes com um manipulador de requisições","query":"mock transport handler","file":"httpx/_transports/mock.py","symbol":"__init__","line":16,"lang":"pt","candidates":[{"text":"File: docs/advanced/transports.md\nLine 251: The `httpx.MockTransport` class accepts a handler function, which can be used","file":"docs/advanced/transports.md","line":251,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 261: transport = httpx.MockTransport(handler)","file":"docs/advanced/transports.md","line":261,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 322: mounts = {\"all://example.org\": httpx.MockTransport(handler)}","file":"docs/advanced/transports.md","line":322,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"コネクションプールを閉じる処理はどこにありますか?","query":"pool close","file":"httpx/_transports/default.py","symbol":"close","line":261,"lang":"ja","candidates":[{"text":"File: docs/advanced/clients.md\nLine 41: Alternatively, you can explicitly close the connection pool without block-usage using `.close()`:","file":"docs/advanced/clients.md","line":41,"lexical":0.39999999999999997,"target":false},{"text":"File: httpx/_transports/default.py\nLine 262: self._pool.close()","file":"httpx/_transports/default.py","line":262,"lexical":0.39999999999999997,"target":true},{"text":"File: httpx/_transports/default.py\nLine 406: await self._pool.aclose()","file":"httpx/_transports/default.py","line":406,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"postリクエストのヘッダーが正しく設定されていることを確認する","query":"request headers","file":"tests/models/test_requests.py","symbol":"test_headers","line":68,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 227: * Support for custom headers in multipart/form-data requests (#1936)","file":"CHANGELOG.md","line":227,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 297: (status_code, headers, stream, extensions) = transport.handle_request(method, url, headers, stream, extensions)","file":"CHANGELOG.md","line":297,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 370: * Ensure that `Request(..., stream=...)` does not auto-generate any headers on the request instance. (Pull #1607)","file":"CHANGELOG.md","line":370,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 512: * Neater split between automatically populated headers on `Request` instances, vs default `client.headers`. (Pull #1248)","file":"CHANGELOG.md","line":512,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 569: * Ensure that automatically included headers on a request may be modified. (Pull #1205)","file":"CHANGELOG.md","line":569,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 951: - Request 'Authorization' headers now have priority over `.netrc` authentication info. (Commit 095b691)","file":"CHANGELOG.md","line":951,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 105: request.headers['X-Authentication'] = self.token","file":"docs/advanced/authentication.md","line":105,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 121: request.headers['X-Authentication'] = self.token","file":"docs/advanced/authentication.md","line":121,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 141: request.headers['X-Authentication'] = self.sign_request(...)","file":"docs/advanced/authentication.md","line":141,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 146: # `request.headers`, and `request.content`.","file":"docs/advanced/authentication.md","line":146,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 162: request.headers[\"X-Authentication\"] = self.access_token","file":"docs/advanced/authentication.md","line":162,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 171: request.headers[\"X-Authentication\"] = self.access_token","file":"docs/advanced/authentication.md","line":171,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 204: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":204,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 213: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":213,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/authentication.md\nLine 227: request.headers[\"Authorization\"] = f\"Token {token}\"","file":"docs/advanced/authentication.md","line":227,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 65: For example, to send a request with custom headers:","file":"docs/advanced/clients.md","line":65,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 72: >>> r.request.headers['X-Custom']","file":"docs/advanced/clients.md","line":72,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 80: For example, to apply a set of custom headers _on every request_:","file":"docs/advanced/clients.md","line":80,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 102: ... headers = {'X-Custom': 'from-request'}","file":"docs/advanced/clients.md","line":102,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 108: >>> r.request.headers['X-Auth']","file":"docs/advanced/clients.md","line":108,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 110: >>> r.request.headers['X-Custom']","file":"docs/advanced/clients.md","line":110,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 120: >>> _, _, auth = r.request.headers['Authorization'].partition(' ')","file":"docs/advanced/clients.md","line":120,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 170: print(request.headers[\"X-Client-ID\"]) # \"ABC123\"","file":"docs/advanced/clients.md","line":170,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/clients.md\nLine 173: del request.headers[\"X-Api-Key\"]","file":"docs/advanced/clients.md","line":173,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/event-hooks.md\nLine 44: request.headers['x-request-timestamp'] = datetime.now(tz=datetime.utc).isoformat()","file":"docs/advanced/event-hooks.md","line":44,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 53: # http11.send_request_headers.started {'request': <Request [b'GET']>}","file":"docs/advanced/extensions.md","line":53,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 54: # http11.send_request_headers.complete {'return_value': None}","file":"docs/advanced/extensions.md","line":54,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 57: # http11.receive_response_headers.started {'request': <Request [b'GET']>}","file":"docs/advanced/extensions.md","line":57,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 83: * `\"http11.send_request_headers\"`","file":"docs/advanced/extensions.md","line":83,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/extensions.md\nLine 92: * `\"http2.send_request_headers\"`","file":"docs/advanced/extensions.md","line":92,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/transports.md\nLine 285: def handle_request(self, method, url, headers, stream, extensions):","file":"docs/advanced/transports.md","line":285,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/api.md\nLine 42: :members: headers cookies params auth request get head options post put patch delete stream build_request send close","file":"docs/api.md","line":42,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"HTTPクライアントのテストを作成中なのですが、通信のライフサイクルが正しく動作しているか確認するために、コンテキストマネージャの挙動を記録できるモック用の通信層クラスがどこにあるか教えてください。接続の開始から終了までのイベントをリストに保存できるような仕組みを探しています。","query":"httpx mock transport","file":"tests/client/test_client.py","symbol":"Transport","line":264,"lang":"ja","candidates":[{"text":"File: CHANGELOG.md\nLine 430: * Add `httpx.MockTransport()`, allowing to mock out a transport using pre-determined responses. (Pull #1401, Pull #1449)","file":"CHANGELOG.md","line":430,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/transports.md\nLine 251: The `httpx.MockTransport` class accepts a handler function, which can be used","file":"docs/advanced/transports.md","line":251,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 261: transport = httpx.MockTransport(handler)","file":"docs/advanced/transports.md","line":261,"lexical":0.65,"target":false},{"text":"File: docs/advanced/transports.md\nLine 322: mounts = {\"all://example.org\": httpx.MockTransport(handler)}","file":"docs/advanced/transports.md","line":322,"lexical":0.65,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 261: client = httpx.AsyncClient(transport=httpx.MockTransport(hello_world))","file":"tests/client/test_async_client.py","line":261,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 282: async with httpx.AsyncClient(transport=httpx.MockTransport(hello_world)) as client:","file":"tests/client/test_async_client.py","line":282,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 303: transport = httpx.MockTransport(unmounted)","file":"tests/client/test_async_client.py","line":303,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 304: mounts = {\"custom://\": httpx.MockTransport(mounted)}","file":"tests/client/test_async_client.py","line":304,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 321: transport = httpx.MockTransport(hello_world)","file":"tests/client/test_async_client.py","line":321,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_async_client.py\nLine 361: transport = httpx.MockTransport(response_with_cancel_during_stream)","file":"tests/client/test_async_client.py","line":361,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 168: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":168,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 185: transport=httpx.MockTransport(app), auth=auth","file":"tests/client/test_auth.py","line":185,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 199: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":199,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 213: transport=httpx.MockTransport(app), auth=auth","file":"tests/client/test_auth.py","line":213,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 230: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":230,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 247: with httpx.Client(transport=httpx.MockTransport(app), auth=auth) as client:","file":"tests/client/test_auth.py","line":247,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 266: with httpx.Client(transport=httpx.MockTransport(app), auth=auth) as client:","file":"tests/client/test_auth.py","line":266,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 295: transport=httpx.MockTransport(app), auth=auth","file":"tests/client/test_auth.py","line":295,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 316: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":316,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 326: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":326,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 344: transport=httpx.MockTransport(app),","file":"tests/client/test_auth.py","line":344,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 348: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":348,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 362: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":362,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 376: client = httpx.Client(transport=httpx.MockTransport(app))","file":"tests/client/test_auth.py","line":376,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 391: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":391,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 405: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":405,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 434: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":434,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 465: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":465,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 497: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":497,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 510: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":510,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 521: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":521,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/client/test_auth.py\nLine 532: async with httpx.AsyncClient(transport=httpx.MockTransport(app)) as client:","file":"tests/client/test_auth.py","line":532,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"mostre como acessar os bytes do corpo da resposta","query":"response content bytes","file":"httpx/_models.py","symbol":"content","line":463,"lang":"pt","candidates":[{"text":"File: CHANGELOG.md\nLine 334: * `response.iter_bytes()` no longer raises a ValueError when called on a response with no content. (Pull #1827)","file":"CHANGELOG.md","line":334,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/clients.md\nLine 183: …erly determining download progress, because the total number of bytes returned by `response.content` or `response.iter_content()` will not always correspond with the raw content length of the response if HTTP response compression is being used.","file":"docs/advanced/clients.md","line":183,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 3: By default `httpx` will use `\"charset\"` information included in the response `Content-Type` header to determine how the response bytes should be decoded into text.","file":"docs/advanced/text-encodings.md","line":3,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 81: * `Response.aiter_bytes()` - For streaming the response content as bytes.","file":"docs/async.md","line":81,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/async.md\nLine 84: * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.","file":"docs/async.md","line":84,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/compatibility.md\nLine 142: * `.iter_bytes()` - Instead of `response.iter_content()`","file":"docs/compatibility.md","line":142,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/logging.md\nLine 32: DEBUG [2024-09-28 17:27:41] httpcore.http11 - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Content-Encoding', b'gzip'), (b'Accept-Ranges', b'bytes'), (b'Age', b'407727'), (b'Cache-Control', b'max-age=604800'), (b'Content-Typ…","file":"docs/logging.md","line":32,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 94: The response content can also be accessed as bytes, for non-text responses:","file":"docs/quickstart.md","line":94,"lexical":0.44999999999999996,"target":false},{"text":"File: docs/quickstart.md\nLine 369: In some cases you might want to access the raw bytes on the response without applying any HTTP content decoding. In this case any content encoding that the web server has applied such as `gzip`, `deflate`, `brotli`, or `zstd` will","file":"docs/quickstart.md","line":369,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_main.py\nLine 186: console.print(f\"<{len(response.content)} bytes of binary data>\")","file":"httpx/_main.py","line":186,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 13: from ._content import ByteStream, UnattachedStream, encode_request, encode_response","file":"httpx/_models.py","line":13,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_types.py\nLine 69: ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]","file":"httpx/_types.py","line":69,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/test_content.py\nLine 433: async def test_response_bytes_content():","file":"tests/test_content.py","line":433,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"trouve la fonction qui transforme les paramètres de requête en en-têtes et en flux de données","query":"encode request content","file":"httpx/_content.py","symbol":"encode_request","line":186,"lang":"fr","candidates":[{"text":"File: docs/compatibility.md\nLine 100: HTTPX uses `utf-8` for encoding `str` request bodies. For example, when using `content=<str>` the request body will be encoded to `utf-8` before being sent over the wire. This differs from Requests which uses `latin1`. If you need an explicit encoding, pas…","file":"docs/compatibility.md","line":100,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_content.py\nLine 199: # for raw request content, and `data=<form data>` for url encoded or","file":"httpx/_content.py","line":199,"lexical":0.65,"target":true},{"text":"File: httpx/_models.py\nLine 13: from ._content import ByteStream, UnattachedStream, encode_request, encode_response","file":"httpx/_models.py","line":13,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_multipart.py\nLine 226: Request content as streaming multipart encoded form data.","file":"httpx/_multipart.py","line":226,"lexical":0.44999999999999996,"target":false},{"text":"File: tests/models/test_requests.py\nLine 56: assert request.headers[\"Content-Type\"] == \"application/x-www-form-urlencoded\"","file":"tests/models/test_requests.py","line":56,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Estoy probando cómo se registran los disparadores de eventos durante las llamadas al cliente. ¿Podrías mostrarme dónde se captura la información de las cabeceras cuando se lanza un evento de petición?","query":"request event headers","file":"tests/client/test_event_hooks.py","symbol":"on_request","line":125,"lang":"es","candidates":[{"text":"File: tests/client/test_event_hooks.py\nLine 20: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":20,"lexical":0.65,"target":true},{"text":"File: tests/client/test_event_hooks.py\nLine 71: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":71,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 126: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":126,"lexical":0.65,"target":false},{"text":"File: tests/client/test_event_hooks.py\nLine 183: events.append({\"event\": \"request\", \"headers\": dict(request.headers)})","file":"tests/client/test_event_hooks.py","line":183,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"帮我找一下代码里是怎么自动识别文本编码类型的。","query":"detect encoding","file":"tests/models/test_responses.py","symbol":"autodetect","line":27,"lang":"zh","candidates":[{"text":"File: CHANGELOG.md\nLine 207: …r set, instead of falling back to `charset-normalizer` for auto-detection. To enable automatic character set detection, see [the documentation](https://www.python-httpx.org/advanced/text-encodings/#using-auto-detection). (#2165)","file":"CHANGELOG.md","line":207,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 1083: - Add `Response.stream_text()` with incremental encoding detection. (Pull #183)","file":"CHANGELOG.md","line":1083,"lexical":0.39999999999999997,"target":false},{"text":"File: CHANGELOG.md\nLine 1108: - Detect encoding for `Response.json()` (Pull #116)","file":"CHANGELOG.md","line":1108,"lexical":0.39999999999999997,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 43: In cases where the server is not reliably including character set information, and where we don't know what encoding is being used, we can enable auto-detection to make a best-guess attempt when decoding from bytes to text.","file":"docs/advanced/text-encodings.md","line":43,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 45: To use auto-detection you need to set the `default_encoding` argument to a callable instead of a string. This callable should be a function which takes the input bytes as an argument and returns the character set to use for decoding those bytes to text.","file":"docs/advanced/text-encodings.md","line":45,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 66: return chardet.detect(content).get(\"encoding\")","file":"docs/advanced/text-encodings.md","line":66,"lexical":0.6000000000000001,"target":false},{"text":"File: docs/advanced/text-encodings.md\nLine 69: client = httpx.Client(default_encoding=autodetect)","file":"docs/advanced/text-encodings.md","line":69,"lexical":0.6000000000000001,"target":false},{"text":"File: tests/client/test_client.py\nLine 13: return chardet.detect(content).get(\"encoding\")","file":"tests/client/test_client.py","line":13,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 411: # Ensure that a 'default_encoding=autodetect' on the response allows for","file":"tests/client/test_client.py","line":411,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 412: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/client/test_client.py","line":412,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 429: with httpx.Client(transport=transport, default_encoding=autodetect) as client:","file":"tests/client/test_client.py","line":429,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/client/test_client.py\nLine 456: with httpx.Client(transport=transport, default_encoding=autodetect) as client:","file":"tests/client/test_client.py","line":456,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 28: return chardet.detect(content).get(\"encoding\")","file":"tests/models/test_responses.py","line":28,"lexical":0.39999999999999997,"target":true},{"text":"File: tests/models/test_responses.py\nLine 241: 200, content=content, headers=headers, default_encoding=autodetect","file":"tests/models/test_responses.py","line":241,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 255: 200, content=content, headers=headers, default_encoding=autodetect","file":"tests/models/test_responses.py","line":255,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 997: # Ensure that a 'default_encoding=\"autodetect\"' on the response allows for","file":"tests/models/test_responses.py","line":997,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 998: # encoding autodetection to be used when no \"Content-Type: text/plain; charset=...\"","file":"tests/models/test_responses.py","line":998,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/models/test_responses.py\nLine 1010: response = httpx.Response(200, content=content, default_encoding=autodetect)","file":"tests/models/test_responses.py","line":1010,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_decoders.py\nLine 244: async def test_text_decoder_with_autodetect(data, encoding):","file":"tests/test_decoders.py","line":244,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_decoders.py\nLine 251: return chardet.detect(content).get(\"encoding\")","file":"tests/test_decoders.py","line":251,"lexical":0.39999999999999997,"target":false},{"text":"File: tests/test_decoders.py\nLine 254: response = httpx.Response(200, content=iterator(), default_encoding=autodetect)","file":"tests/test_decoders.py","line":254,"lexical":0.39999999999999997,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Es gibt ein Problem beim Initialisieren eines Objekts, das einen iterierbaren Byte-Stream verarbeitet. Es scheint nicht korrekt zu unterscheiden, ob es sich bei der Eingabe um einen Generator handelt oder nicht, was später zu Problemen beim Konsumieren des Inhalts führen könnte.","query":"stream generator inspect","file":"httpx/_content.py","symbol":"__init__","line":45,"lang":"de","candidates":[{"text":"File: httpx/_content.py\nLine 48: self._is_generator = inspect.isgenerator(stream)","file":"httpx/_content.py","line":48,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_content.py\nLine 73: self._is_generator = inspect.isasyncgen(stream)","file":"httpx/_content.py","line":73,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"ストリームの途中でキャンセルが発生した場合の挙動をテストするためのモックの作り方は?","query":"stream cancel test","file":"tests/client/test_async_client.py","symbol":"response_with_cancel_during_stream","line":346,"lang":"ja","candidates":[{"text":"File: tests/client/test_async_client.py\nLine 330: async def test_cancellation_during_stream():","file":"tests/client/test_async_client.py","line":330,"lexical":0.65,"target":true},{"text":"File: tests/client/test_async_client.py\nLine 347: class CancelledStream(httpx.AsyncByteStream):","file":"tests/client/test_async_client.py","line":347,"lexical":0.65,"target":false}]}
{"site":"project_search","repo":"httpx","task":"get logic for combining host and port into a network location string","query":"netloc host port","file":"httpx/_urlparse.py","symbol":"netloc","line":178,"lang":"en","candidates":[{"text":"File: httpx/_urlparse.py\nLine 239: # Replace \"netloc\" with \"host and \"port\".","file":"httpx/_urlparse.py","line":239,"lexical":0.44999999999999996,"target":true},{"text":"File: httpx/_urlparse.py\nLine 242: kwargs[\"host\"], _, kwargs[\"port\"] = netloc.partition(\":\")","file":"httpx/_urlparse.py","line":242,"lexical":0.44999999999999996,"target":false}]}
{"site":"project_search","repo":"httpx","task":"Es gibt ein Problem bei der Identifizierung von Statuscodes im Bereich der 3xx-Reihe. Es scheint keine eindeutige Unterscheidung zwischen einem reinen Statuscode-Indikator und einer tatsächlichen URL-Weiterleitung zu geben, was zu falschen Annahmen über das Verhalten der Antwort führen kann.","query":"3xx status redirect","file":"httpx/_models.py","symbol":"is_redirect","line":739,"lang":"de","candidates":[{"text":"File: CHANGELOG.md\nLine 330: properties for checking 1xx, 2xx, 3xx, 4xx, and 5xx response types. Note that the behaviour of `.is_redirect` is slightly different in that it now returns True for all 3xx responses, in order to allow for a consistent set of properties onto the different H…","file":"CHANGELOG.md","line":330,"lexical":0.44999999999999996,"target":false},{"text":"File: httpx/_models.py\nLine 743: Note that not all responses with a 3xx status code indicate a URL redirect.","file":"httpx/_models.py","line":743,"lexical":0.44999999999999996,"target":true},{"text":"File: tests/models/test_responses.py\nLine 108: # 3xx status codes are redirections.","file":"tests/models/test_responses.py","line":108,"lexical":0.44999999999999996,"target":false}]}