diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60e4950..89323d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,10 @@ jobs: strategy: matrix: py_version: - - '3.8' - '3.9' - '3.10' - '3.11' + - '3.12' steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/launart/manager.py b/launart/manager.py index 2eac11e..3261c4f 100644 --- a/launart/manager.py +++ b/launart/manager.py @@ -93,10 +93,20 @@ def launch_blocking( loop: asyncio.AbstractEventLoop | None = None, stop_signal: Iterable[signal.Signals] = (signal.SIGINT,), ): + from creart import it import contextlib import threading - loop = asyncio.new_event_loop() + if loop is not None: # pragma: no cover + from warnings import warn + + warn( + "The loop argument is deprecated since launart 0.6.4, " "and scheduled for removal in launart 0.7.0.", + DeprecationWarning, + stacklevel=2, + ) + + loop = it(asyncio.AbstractEventLoop) logger.info("Starting launart main task...", style="green bold") diff --git a/pyproject.toml b/pyproject.toml index 643fced..593e5f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,8 @@ profile = "black" [tool.coverage.run] branch = true source = ["."] -omit = ["tests/*", "test.py"] +# omit = ["tests/*", "test.py"] +omit = ["test.py"] # TODO: fix tests/* [tool.coverage.report] # Regexes for lines to exclude from consideration