Commit 2aeeb67
committed
fix(zarr-metadata): the store reader checks that it read bytes
`load_store_json` takes a mapping of store keys to `bytes` and never
checked the values: `json.loads` decoded a `str` as if it were bytes,
and raised `TypeError` for `None` or a `memoryview`, which its
docstring promised would never leak. A value that is not `bytes` is now
an `invalid_type` problem at its key.
Assisted-by: ClaudeCode:claude-opus-5-51 parent b3045a2 commit 2aeeb67
3 files changed
Lines changed: 34 additions & 3 deletions
File tree
- packages/zarr-metadata
- changes
- src/zarr_metadata/model
- tests/model
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
908 | | - | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
| |||
915 | 916 | | |
916 | 917 | | |
917 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
918 | 926 | | |
919 | | - | |
| 927 | + | |
920 | 928 | | |
921 | 929 | | |
922 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
403 | 422 | | |
404 | 423 | | |
405 | 424 | | |
| |||
0 commit comments