You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve Command(resume) warning about invalid packet type dict (#83)
Issue #83: Command with resume argument failing in v0.1.0
Users reported warning 'Ignoring invalid packet type <class 'dict'> in pending sends'
when using Command(resume={'interrupt_id': {'some': 'result'}}) after upgrading
from 0.0.8 to 0.1.0.
Root cause: Type annotation mismatch in _load_pending_sends methods. They were
annotated as returning List[Tuple[str, bytes]] but Redis JSON actually returns
strings for blob data, not bytes, causing List[Tuple[str, Union[str, bytes]]].
This type mismatch caused the warning when Command(resume) tried to process
pending sends containing dict values through the TASKS channel.
Changes:
- Updated return type hints for _load_pending_sends methods in both sync and async
- Updated _load_pending_sends_with_registry_check type hints
- Updated _abatch_load_pending_sends and local variable annotations in async
- Added test that simulates Command(resume) scenario and verifies no warning
- Added test for type compatibility with Redis JSON string blobs
The fix ensures Command(resume) works without warnings while maintaining
backward compatibility with code that passes bytes.
0 commit comments