diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ab9bd..238e9ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,9 +64,10 @@ jobs: - { os: ubuntu-latest, python: "3.11" } - { os: ubuntu-latest, python: "3.12" } - { os: ubuntu-latest, python: "3.13" } + - { os: ubuntu-latest, python: "3.14" } - { os: windows-latest, python: "3.10" } - - { os: windows-latest, python: "3.13" } - - { os: macos-latest, python: "3.13" } + - { os: windows-latest, python: "3.14" } + - { os: macos-latest, python: "3.14" } steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index c34ae71..4231aa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,8 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.14", "Topic :: Communications :: Ham Radio", "Topic :: System :: Networking", ] diff --git a/tests/test_cooldown.py b/tests/test_cooldown.py index a7853a2..8faad82 100644 --- a/tests/test_cooldown.py +++ b/tests/test_cooldown.py @@ -140,20 +140,28 @@ def test_the_box_does_not_resize_as_it_counts() -> None: def test_the_countdown_resolves_itself_at_zero() -> None: """Reaching zero is the dialog's own answer: the wait is over, the action goes ahead.""" dialog = CountdownDialog("Advert", 5.0) - dialog.future = asyncio.get_event_loop_policy().new_event_loop().create_future() - dialog.set_remaining(3.0) - assert not dialog.future.done() - dialog.set_remaining(0.0) - assert dialog.future.done() and dialog.future.result() is True + loop = asyncio.new_event_loop() + try: + dialog.future = loop.create_future() + dialog.set_remaining(3.0) + assert not dialog.future.done() + dialog.set_remaining(0.0) + assert dialog.future.done() and dialog.future.result() is True + finally: + loop.close() @pytest.mark.parametrize("key", ["enter", "escape"]) def test_either_key_abandons_the_wait(key: str) -> None: """There is nothing to choose between, so Enter and Esc both mean cancel.""" dialog = CountdownDialog("Advert", 30.0) - dialog.future = asyncio.get_event_loop_policy().new_event_loop().create_future() - dialog.handle(key) - assert dialog.future.done() and dialog.future.result() is CANCEL + loop = asyncio.new_event_loop() + try: + dialog.future = loop.create_future() + dialog.handle(key) + assert dialog.future.done() and dialog.future.result() is CANCEL + finally: + loop.close() # -- the wait -------------------------------------------------------------------- diff --git a/tests/test_live_screens.py b/tests/test_live_screens.py index 4bab5a9..56eadba 100644 --- a/tests/test_live_screens.py +++ b/tests/test_live_screens.py @@ -1209,7 +1209,7 @@ def test_sweep_screen_new_sweep_clears_the_old_evidence() -> None: assert "TX 19" not in body and "-2.0" not in body await task - asyncio.get_event_loop_policy().new_event_loop().run_until_complete(go()) + asyncio.run(go()) def test_sweep_screen_escape_resolves() -> None: