Skip to content

Missing keys raise KeyError; _convert_numeric_list passes non-lists through - #9

Merged
thorwhalen merged 2 commits into
masterfrom
fix/4-5-missing-keys-numeric-list
Oct 13, 2026
Merged

thorwhalen merged 2 commits into
masterfrom
fix/4-5-missing-keys-numeric-list

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Fixes #4, fixes #5.

  • RedisBytesCollection/Reader/RedisCollection.__getitem__ raise KeyError for absent keys (so store.get(k, default) works). Behaviour change: callers that relied on None must now catch KeyError / use .get.
  • _convert_numeric_list returns data unchanged for non-lists (string values no longer come back as None, dict(store) works). Documented that the numeric-lists store returns a detached snapshot list.
  • Tests against fakeredis (15 pass).

Review and dependents-gate notes to follow in a comment before merge.

thorwhalen and others added 2 commits October 13, 2026 07:38
…ric_list

Fixes #4, fixes #5

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nsupported redis types

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@thorwhalen

Copy link
Copy Markdown
Member Author

Adversarial review (fresh Opus subagent): sound for #4/#5, two confirmed gaps, both fixed in the last commit: (1) hash/set/etc keys returned None -> now TypeError naming the redis type (loud, like RedisBytesPersister); (2) with decode_responses=True the type string is text, so every key returned None -> type is normalised. Both have tests (17 pass). Out of scope, tracked: RedisList IndexError (#7); store_from_source(r, RedisStoreWithNumericLists) AttributeError ('store') -> new issue. Dependents gate: priv test-dependents redisdol --transitive finds no dependents with suites (py2store only re-exports via import *).

@thorwhalen
thorwhalen merged commit fe944e3 into master Oct 13, 2026
8 checks passed
@thorwhalen
thorwhalen deleted the fix/4-5-missing-keys-numeric-list branch October 13, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant