Skip to content

The new asyncio server_forever() implementation in 17.0 has broken compatibility with uvloop #1746

Closed

Description

@pmarcelll

The improved serve_forever() introduced in #1745 relies on CPython's private _serving_forever_fut attribute, which breaks compatibility with uvloop, since it utilizes its own Cython-based Server implementation:

  File "/home/dockeruser/.local/lib/python3.12/site-packages/websockets/asyncio/server.py", line 534, in serve_forever
    if self.server._serving_forever_fut is not None:  # type: ignore[attr-defined]
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'uvloop.loop.Server' object has no attribute '_serving_forever_fut'

Activity

  1. aaugustin commented on Jul 30, 2026

    @aaugustin
    Member

    Ah, I didn't see that one coming... I'll fix it.

  2. aaugustin commented on Jul 30, 2026

    @aaugustin
    Member

    Fixed in eb3600c. I will release 17.0.1 with this fix now as soon as I fix another bug which I just discovered.

  3. aaugustin commented on Jul 30, 2026

    @aaugustin
    Member

    Thank you for letting me know!

  4. aaugustin commented on Jul 31, 2026

    @aaugustin
    Member

    17.0.1 is on PyPI now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions