Commit dd86ac7
fix: convert zarr Array to numpy before __setitem__ async dispatch (#3857)
* fix: convert zarr Array to numpy before __setitem__ async dispatch
When the value passed to Array.__setitem__ is itself a zarr Array, the
codec pipeline later calls value[...] from inside an already-running
async event loop, which raises SyncError. Convert the value to a
NumPy array eagerly before entering the async context to avoid this.
Closes #3611
Made-with: Cursor
* fix: restore skip marker on test_setitem_repeated_index
Inserting test_setitem_zarr_array_as_value between the existing
@pytest.mark.skip decorator and test_setitem_repeated_index accidentally
moved the skip onto the new test, leaving test_setitem_repeated_index
unskipped and failing. Restore the skip to its original target.
Made-with: Cursor
---------
Co-authored-by: Leo Ji <nuglifeleoji@gmail.com>1 parent 378ef10 commit dd86ac7
File tree
3 files changed
+25
-0
lines changed- changes
- src/zarr/core
- tests
3 files changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2930 | 2930 | | |
2931 | 2931 | | |
2932 | 2932 | | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2933 | 2939 | | |
2934 | 2940 | | |
2935 | 2941 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
| |||
0 commit comments