From 6ce537810b1ec23bf6cf555a68e9a02d1ba2fd2d Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 4 Dec 2025 17:15:08 +0100 Subject: [PATCH 1/3] Python 3.14 (Runtime): Adjust code base about Python 3.14 syntax AttributeError: 'OrderedSet' object has no attribute 'copy' --- streamz/orderedweakset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/streamz/orderedweakset.py b/streamz/orderedweakset.py index ba4b3649..3d4e9a2b 100644 --- a/streamz/orderedweakset.py +++ b/streamz/orderedweakset.py @@ -26,6 +26,9 @@ def add(self, value): def discard(self, value): self._od.pop(value, None) + def copy(self): + return OrderedSet(self._od.copy()) + class OrderedWeakrefSet(weakref.WeakSet): def __init__(self, values=()): From edbe02f4386db486bdf86a07ea48fd034aeb0668 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 4 Dec 2025 17:30:30 +0100 Subject: [PATCH 2/3] Python 3.14 (Tests): `SafeChildWatcher` is deprecated in Python 3.14 --- streamz/tests/test_sources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamz/tests/test_sources.py b/streamz/tests/test_sources.py index b0ad87ba..8210a8d8 100644 --- a/streamz/tests/test_sources.py +++ b/streamz/tests/test_sources.py @@ -103,7 +103,7 @@ def test_http(): def test_process(): cmd = ["python", "-c", "for i in range(4): print(i, end='')"] s = Source.from_process(cmd, with_end=True) - if sys.platform != "win32": + if sys.platform != "win32" and sys.version_info < (3, 14): # don't know why - something with pytest and new processes policy = asyncio.get_event_loop_policy() watcher = asyncio.SafeChildWatcher() @@ -119,7 +119,7 @@ def test_process(): def test_process_str(): cmd = 'python -c "for i in range(4): print(i)"' s = Source.from_process(cmd) - if sys.platform != "win32": + if sys.platform != "win32" and sys.version_info < (3, 14): # don't know why - something with pytest and new processes policy = asyncio.get_event_loop_policy() watcher = asyncio.SafeChildWatcher() From e736bca39f66f2c3cee6392acadaa986707305e6 Mon Sep 17 00:00:00 2001 From: David Skoog Date: Wed, 17 Dec 2025 14:59:28 -0500 Subject: [PATCH 3/3] Python 3.14 (CI): Add to test matrix on CI/GHA --- .github/workflows/main.yaml | 2 +- ci/environment-py314.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ci/environment-py314.yml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7308a4ef..be35b4fb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - CONDA_ENV: [py39, py310, py311, py312, py313] + CONDA_ENV: [py39, py310, py311, py312, py313, py314] # env: # STREAMZ_LAUNCH_KAFKA: true diff --git a/ci/environment-py314.yml b/ci/environment-py314.yml new file mode 100644 index 00000000..68b4ea71 --- /dev/null +++ b/ci/environment-py314.yml @@ -0,0 +1,27 @@ +name: test_env +channels: + - conda-forge + - defaults +dependencies: + - python=3.14 + - pytest + - flake8 + - black + - isort + - tornado + - toolz + - librdkafka + - dask + - distributed + - pandas + - python-confluent-kafka + - codecov + - coverage + - networkx + - graphviz + - pytest-asyncio + - python-graphviz + - bokeh + - ipywidgets + - flaky + - pytest-cov