Conversation
|
+1 — Confirmed hitting the same Symptoms: DingTalk gateway completely broken — stream client fails to connect, gateway logs show the coroutine TypeError on every reconnect attempt. Other platforms (Feishu, Weixin) work fine. Fix verified: Applied a similar monkey-patch locally in This is a critical fix — DingTalk gateway is completely unusable without it for anyone on websockets >= 11. Would be great to get this merged soon! 🙏 |
f5a99b6 to
e51f6bc
Compare
|
Thanks for investigating the DingTalk reconnection failure. This is now covered on current main by fixing the shared Feishu wrapper that produced the coroutine/context-manager mismatch. Automated hermes-sweeper review evidence:
|
Summary
dingtalk-stream(<=0.24.3) usesasync with websockets.connect(uri)which breaks with websockets >= 11 becausewebsockets.connect()became a coroutine function and must be awaited first.This PR adds a monkey-patch in
gateway/platforms/dingtalk.pythat replacesDingTalkStreamClient.startwith a fixed version usingasync with await websockets.connect(uri)— the only change from upstream.Why not pin websockets?
dingtalk-streamrequireswebsockets >= 11.0.2, but all versions >= 11 haveconnect()as a coroutine, so pinning alone cannot fix this. A runtime monkey-patch is the only self-contained fix.How it works
The patch is applied at module import time in the DingTalk adapter. It can be removed cleanly once
dingtalk-streamreleases a fix upstream.Testing