streamz icon indicating copy to clipboard operation
streamz copied to clipboard

Support for Python 3.14

Open amotl opened this issue 3 weeks ago • 2 comments

Hi again,

we know the package is currently low on maintenance (GH-476), but might need some action now to make it compatible with Python 3.14. When enabling Python 3.14 on LorryStream's (GH-470) CI per https://github.com/daq-tools/lorrystream/pull/217, the workflow fails:

 self = <streamz.orderedweakset.OrderedSet object at 0x7fcfd0a078c0>

    def __iter__(self):
>       for itemref in self.data.copy():
                       ^^^^^^^^^^^^^^
E       AttributeError: 'OrderedSet' object has no attribute 'copy'

With kind regards, Andreas.

amotl avatar Dec 04 '25 14:12 amotl

A few cycles later, this error comes up.

AttributeError: module 'asyncio' has no attribute 'SafeChildWatcher'
    def test_func():
        with pristine_loop() as loop:
            cor = gen.coroutine(func)
            try:
>               loop.run_sync(cor, timeout=timeout)

streamz/utils_test.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/lib/python3.14/site-packages/tornado/ioloop.py:547: in run_sync
    return future_cell["future"].result()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.14/site-packages/tornado/gen.py:239: in wrapper
    yielded = ctx_run(next, result)
              ^^^^^^^^^^^^^^^^^^^^^
streamz/tests/test_sources.py:125: in test_process_str
    watcher = asyncio.SafeChildWatcher()
              ^^^^^^^^^^^^^^^^^^^^^^^^

References

  • https://github.com/python/typeshed/issues/13357
  • https://github.com/beeware/rubicon-objc/pull/529

amotl avatar Dec 04 '25 16:12 amotl

Hi again. We've submitted a patch to improve the situation.

  • GH-483

amotl avatar Dec 04 '25 16:12 amotl