diff --git a/pyproject.toml b/pyproject.toml index c643ad0d4f8..621219634eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,6 @@ dependencies = [ "tabulate", "tqdm>=4.62.0", "typing_extensions>=4.5", - "uvloop", "uvicorn >= 0.17.0", "websockets", "xarray", diff --git a/src/_ert/async_utils.py b/src/_ert/async_utils.py index 652aba5cc54..c8e18cc6800 100644 --- a/src/_ert/async_utils.py +++ b/src/_ert/async_utils.py @@ -4,9 +4,7 @@ import logging import traceback from contextlib import suppress -from typing import Any, Coroutine, Generator, Mapping, TypeVar, Union - -import uvloop +from typing import Any, Coroutine, Generator, TypeVar, Union logger = logging.getLogger(__name__) @@ -15,7 +13,7 @@ def new_event_loop() -> asyncio.AbstractEventLoop: - loop = uvloop.new_event_loop() + loop = asyncio.new_event_loop() loop.set_task_factory(_create_task) return loop @@ -32,10 +30,9 @@ def get_running_loop() -> asyncio.AbstractEventLoop: def _create_task( loop: asyncio.AbstractEventLoop, coro: Union[Coroutine[Any, Any, _T], Generator[Any, None, _T]], - **kwargs: Mapping[str, Any], ) -> asyncio.Task[_T]: assert asyncio.iscoroutine(coro) - task = asyncio.Task(coro, loop=loop, **kwargs) # type: ignore + task = asyncio.Task(coro, loop=loop) task.add_done_callback(_done_callback) return task diff --git a/src/ert/__main__.py b/src/ert/__main__.py index fbcfa4ffa51..1b96ca94b6e 100755 --- a/src/ert/__main__.py +++ b/src/ert/__main__.py @@ -13,7 +13,6 @@ from typing import Any, Dict, Optional, Sequence, Union from uuid import UUID -import uvloop import yaml from opentelemetry.instrumentation.threading import ThreadingInstrumentor from opentelemetry.trace import Status, StatusCode @@ -636,7 +635,6 @@ def log_process_usage() -> None: @tracer.start_as_current_span("ert.application.start") def main() -> None: - uvloop.install() span = trace.get_current_span() warnings.filterwarnings("ignore", category=DeprecationWarning) locale.setlocale(locale.LC_NUMERIC, "C")