fix: resolve Command(resume) warning about invalid packet type dict (#83) #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
The fix ensures Command(resume) works without warnings while maintaining backward compatibility with code that passes bytes.