Use async-exit-stack over contextlib

For `AsyncExitStack`
This commit is contained in:
mhchia 2019-12-24 14:44:28 +08:00
parent ce5663705f
commit 6fe5871d96
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A
3 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,6 @@
from contextlib import AsyncExitStack
from typing import Any, AsyncIterator, Dict, List, Sequence, Tuple, cast
# NOTE: import ``asynccontextmanager`` from ``contextlib`` when support for python 3.6 is dropped.
from async_exit_stack import AsyncExitStack
from async_generator import asynccontextmanager
from async_service import background_trio_service
import factory

View File

@ -1,6 +1,7 @@
from contextlib import AsyncExitStack, asynccontextmanager
from typing import AsyncIterator, Dict, Tuple
from async_exit_stack import AsyncExitStack
from async_generator import asynccontextmanager
from async_service import Service, background_trio_service
from libp2p.host.host_interface import IHost

View File

@ -76,6 +76,7 @@ install_requires = [
"async_generator==1.10",
"trio>=0.13.0",
"async-service>=0.1.0a2,<0.2.0",
"async-exit-stack==1.0.1",
]