Repository navigation
fix: every RedisList operation on a wrong-type key is a TypeError; bytes-like elements (#15) - #16
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #15. Reads, slices, len, iteration, append, extend, insert, pop and the MutableSequence mixins on a key holding a string/hash/... now raise
TypeError(cause: theResponseError), consistent with[i]=/del; other Redis errors pass through.clear()checks the type and deletes in one WATCH/MULTI transaction, so it no longer destroys a non-list key. Bytes-like list elements (bytearray, memoryview, also a codec's output) are sent as their bytes, inRedisListand in the store's list path._wrapped_class_ofreads dol's new_wrapped_class/_delegation_attr(i2mint/dol#131) with the old closure read as fallback; it still refuses a subclass that has its own__init__.Adversarial Opus review: the list fix held; it confirmed two regressions in the new
_wrapped_class_of(subclass with own__init__built half-initialised; mixin between wrapper and Store skipped) — fixed, with a test each. fakeredis only.🤖 Generated with Claude Code