Skip to content
Myr

Drop unused methods from BaseEvent (#626)

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

authored by Tom Christie · committed by GitHub · parent 00a875d · Browse files · 3 files+12 added−15 removed
This commit

State

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

Diff stats

3 files+12 added−15 removed

  • other:+12 added−15 removed

3 files+12 added−15 removed

modified:httpx/concurrency/asyncio.py+12 added-1 removed
263 unmodified lines
264 def get_semaphore(self, max_value: int) -> BasePoolSemaphore:265 return PoolSemaphore(max_value)266267 def create_event(self) -> BaseEvent:268 return typing.cast(BaseEvent, asyncio.Event())268 return Event()269270271class Event(BaseEvent):272 def __init__(self) -> None:273 self._event = asyncio.Event()274275 def set(self) -> None:276 self._event.set()277278 async def wait(self) -> None:279 await self._event.wait()
modified:httpx/concurrency/base.py-6 removed
60 unmodified lines
6162 def set(self) -> None:63 raise NotImplementedError() # pragma: no cover6465 def is_set(self) -> bool:66 raise NotImplementedError() # pragma: no cover6768 def clear(self) -> None:69 raise NotImplementedError() # pragma: no cover7065 async def wait(self) -> None:66 raise NotImplementedError() # pragma: no cover6768
48 unmodified lines
modified:httpx/concurrency/trio.py-8 removed
168 unmodified lines
169170 def set(self) -> None:171 self._event.set()172173 def is_set(self) -> bool:174 return self._event.is_set()175173 async def wait(self) -> None:174 await self._event.wait()178179 def clear(self) -> None:180 # trio.Event.clear() was deprecated in Trio 0.12.181 # https://github.com/python-trio/trio/issues/637182 self._event = trio.Event()