From ab290a9237660af406f530edb995b751dda2b6fb Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Thu, 18 Aug 2022 01:31:12 -0400 Subject: [PATCH] fix coverage --- fastapi/concurrency.py | 11 ++--------- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/fastapi/concurrency.py b/fastapi/concurrency.py index becac3f33db76..e3dd11dbbb550 100644 --- a/fastapi/concurrency.py +++ b/fastapi/concurrency.py @@ -1,4 +1,5 @@ -import sys +from contextlib import AsyncExitStack as AsyncExitStack # noqa +from contextlib import asynccontextmanager as asynccontextmanager from typing import AsyncGenerator, ContextManager, TypeVar from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool # noqa @@ -7,14 +8,6 @@ run_until_first_complete as run_until_first_complete, ) -if sys.version_info >= (3, 7): - from contextlib import AsyncExitStack as AsyncExitStack - from contextlib import asynccontextmanager as asynccontextmanager -else: - from contextlib2 import AsyncExitStack as AsyncExitStack # noqa - from contextlib2 import asynccontextmanager as asynccontextmanager # noqa - - _T = TypeVar("_T") diff --git a/pyproject.toml b/pyproject.toml index 3ae0085770838..2a9d62ddb38ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,6 @@ test = [ # types "types-ujson ==4.2.1", "types-orjson ==3.6.2", - "types-dataclasses ==0.6.5; python_version<'3.7'", ] doc = [ "mkdocs >=1.1.2,<2.0.0",