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:
@ -297,7 +297,7 @@ class DummyRouter(IPeerRouting):
|
||||
self._routing_table[peer_id] = PeerInfo(peer_id, addrs)
|
||||
|
||||
async def find_peer(self, peer_id: ID) -> PeerInfo:
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
return self._routing_table.get(peer_id, None)
|
||||
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ async def perform_test_from_obj(obj, pubsub_factory) -> None:
|
||||
# Avoid repeated works
|
||||
if topic in queues_map[node_id]:
|
||||
# Checkpoint
|
||||
await trio.hazmat.checkpoint()
|
||||
await trio.lowlevel.checkpoint()
|
||||
return
|
||||
sub = await pubsub_map[node_id].subscribe(topic)
|
||||
queues_map[node_id][topic] = sub
|
||||
|
||||
Reference in New Issue
Block a user