Skip to content
Myr

Drop `iterate_in_threadpool` and `iterate` (#564)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Drop iterate_in_threadpool * Drop iterate from concurrency backends

authored by Tom Christie · committed by GitHub · parent 5fccc04 · Browse files · 1 file+0 added−23 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−23 removed

  • other:+0 added−23 removed

1 file+0 added−23 removed

modified:httpx/concurrency/base.py-23 removed
127 unmodified lines
128 self, func: typing.Callable, *args: typing.Any, **kwargs: typing.Any129 ) -> typing.Any:130 raise NotImplementedError() # pragma: no cover131132 async def iterate_in_threadpool(self, iterator): # type: ignore133 class IterationComplete(Exception):134 pass135136 def next_wrapper(iterator): # type: ignore137 try:138 return next(iterator)139 except StopIteration:140 raise IterationComplete()141142 while True:143 try:144 yield await self.run_in_threadpool(next_wrapper, iterator)145 except IterationComplete:146 break147132 def run(133 self, coroutine: typing.Callable, *args: typing.Any, **kwargs: typing.Any134 ) -> typing.Any:135 raise NotImplementedError() # pragma: no cover136153 def iterate(self, async_iterator): # type: ignore154 while True:155 try:156 yield self.run(async_iterator.__anext__)157 except StopAsyncIteration:158 break159137 def create_event(self) -> BaseEvent:138 raise NotImplementedError() # pragma: no cover139140 def background_manager(
23 unmodified lines