mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Fixes to add python 3.6 compatibility
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
from contextlib import asynccontextmanager
|
||||
from typing import Any, AsyncIterator, Dict, Tuple, cast
|
||||
|
||||
import factory
|
||||
@ -33,6 +32,12 @@ from .constants import (
|
||||
)
|
||||
from .utils import connect, connect_swarm
|
||||
|
||||
try:
|
||||
from contextlib import asynccontextmanager
|
||||
except ImportError:
|
||||
# NOTE: mypy complains about a duplicate import without the following ``# type: ignore``
|
||||
from async_generator import asynccontextmanager # type: ignore
|
||||
|
||||
|
||||
def initialize_peerstore_with_our_keypair(self_id: ID, key_pair: KeyPair) -> PeerStore:
|
||||
peer_store = PeerStore()
|
||||
|
||||
Reference in New Issue
Block a user