Skip to content

Commit

Permalink
Update stubs for trio 0.18.0
Browse files Browse the repository at this point in the history
- Remove max_refill_bytes from SSL (python-trio/trio#959)
- Add synchronous close and context managers to the memory channels (python-trio/trio#1797)
  • Loading branch information
tjstum committed Aug 5, 2021
1 parent fc22746 commit 994e434
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions trio-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,19 @@ class MemorySendChannel(trio.abc.SendChannel[T_contra]):
def clone(self: T) -> T: ...
async def aclose(self) -> None: ...
def statistics(self) -> _Statistics: ...
def close(self) -> None: ...
def __enter__(self) -> MemorySendChannel: ...
def __exit__(self, *exc: object) -> None: ...

class MemoryReceiveChannel(trio.abc.ReceiveChannel[T_co]):
def receive_nowait(self) -> T_co: ...
async def receive(self) -> T_co: ...
def clone(self: T) -> T: ...
async def aclose(self) -> None: ...
def statistics(self) -> _Statistics: ...
def close(self) -> None: ...
def __enter__(self) -> MemoryReceiveChannel: ...
def __exit__(self, *exc: object) -> None: ...

# written as a class so you can say open_memory_channel[int](5)
class open_memory_channel(Tuple[MemorySendChannel[T], MemoryReceiveChannel[T]]):
Expand Down Expand Up @@ -511,7 +517,6 @@ class SSLStream(trio.abc.Stream):
server_hostname: Optional[str] = None,
server_side: bool = False,
https_compatible: bool = False,
max_refill_bytes: int = ...,
) -> None: ...
def getpeercert(self, binary_form: bool = ...) -> ssl._PeerCertRetType: ...
def selected_npn_protocol(self) -> Optional[str]: ...
Expand All @@ -536,7 +541,6 @@ class SSLListener(trio.abc.Listener[SSLStream]):
ssl_context: ssl.SSLContext,
*,
https_compatible: bool = False,
max_refill_bytes: int = ...,
) -> None: ...
async def accept(self) -> SSLStream: ...
async def aclose(self) -> None: ...
Expand Down

0 comments on commit 994e434

Please sign in to comment.