mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
PTB's HTTPXRequest/BaseRequest use __slots__. On Python 3.13 their instances no longer carry a __dict__, so the getUpdates progress instrumentation's `request.do_request = wrapper` monkey-patch raises `AttributeError: 'HTTPXRequest' object attribute 'do_request' is read-only`, failing every Telegram connect (#64482). It only worked on Python 3.12, where the instance still had a __dict__ — the Docker image ships Python 3.13, so the release broke Telegram outright. Re-tag the request to a thin `__slots__ = ()` subclass that overrides do_request instead of mutating the instance. This preserves the exact progress-observation semantics, works on both 3.12 and 3.13, and covers the real request and the test doubles alike. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| plugin.yaml | ||
| telegram_ids.py | ||
| telegram_network.py | ||