mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Use trio.lowlevel instead of trio.hazmat
Since trio 0.15.0, hazmat has been deprecated. trio-typing and mypy are bumped to support newer trio and each other.
This commit is contained in:
@ -32,10 +32,10 @@ class PubsubNotifee(INotifee):
|
||||
self.dead_peers_queue = dead_peers_queue
|
||||
|
||||
async def opened_stream(self, network: INetwork, stream: INetStream) -> None:
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
|
||||
async def closed_stream(self, network: INetwork, stream: INetStream) -> None:
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
|
||||
async def connected(self, network: INetwork, conn: INetConn) -> None:
|
||||
"""
|
||||
@ -67,7 +67,7 @@ class PubsubNotifee(INotifee):
|
||||
pass
|
||||
|
||||
async def listen(self, network: INetwork, multiaddr: Multiaddr) -> None:
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
|
||||
async def listen_close(self, network: INetwork, multiaddr: Multiaddr) -> None:
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
|
||||
Reference in New Issue
Block a user