From 5b7481af8ade38b566b17835bbeedf1a485cc1dd Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Mon, 21 Sep 2026 20:44:37 -0400 Subject: [PATCH] Python 3.14 is supported, and CI proves it JP moved to 3.14. Every dependency installs on it -- the Windows Bluetooth packages included -- and the suite passes: 2705 passed, 1 skipped, on 3.14.7 as on 3.10. - pyproject gains the 3.14 classifier. requires-python stays >=3.10: the uConsole on bookworm runs 3.11, and a pip or pipx install on an older system should keep working. - CI keeps its shape, which is Linux over the whole range and the other two runners at its ends. Linux gains a 3.14 leg, and 3.14 replaces 3.13 as the top end on Windows and macOS. - Three tests reached a loop through asyncio.get_event_loop_policy(), which 3.14 deprecates and 3.16 removes, and never closed the loop they made. The two countdown tests now make one with new_event_loop() and close it; the sweep test uses asyncio.run(), which does both. On 3.14 the suite is back to no warnings. The standalone installers still bundle 3.10; moving their build to 3.14 is for 0.9.1. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 5 +++-- pyproject.toml | 2 ++ tests/test_cooldown.py | 24 ++++++++++++++++-------- tests/test_live_screens.py | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) 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: