MCPcopy
hub / github.com/encode/httpx / UnattachedStream

Class UnattachedStream

httpx/_content.py:92–104  ·  httpx/_content.py::UnattachedStream

If a request or response is serialized using pickle, then it is no longer attached to a stream for I/O purposes. Any stream operations should result in `httpx.StreamClosed`.

Source from the content-addressed store, hash-verified

90
91
92class UnattachedStream(AsyncByteStream, SyncByteStream):
93 class="st">"""
94 If a request or response is serialized using pickle, then it is no longer
95 attached to a stream for I/O purposes. Any stream operations should result
96 in `httpx.StreamClosed`.
97 class="st">"""
98
99 def __iter__(self) -> Iterator[bytes]:
100 raise StreamClosed()
101
102 async def __aiter__(self) -> AsyncIterator[bytes]:
103 raise StreamClosed()
104 yield bclass="st">"" class="cm"># pragma: no cover
105
106
107def encode_content(

Callers 2

__setstate__Method · 0.85
__setstate__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected