Repository navigation
Commit e210f92
authored
fix(storage): pickle the zarr.storage module by name (#4557)
* fix(storage): pickle the zarr.storage module by name
`zarr.storage` swaps its class for a `VerboseModule` subclass to warn
when `default_compressor` is set. Serializers that dispatch on the exact
type, such as cloudpickle (Dask's default), had no reduce for the
subclass and raised `TypeError: cannot pickle 'VerboseModule' object`.
Give `VerboseModule` a `__reduce__` that re-imports the module by name,
so `pickle` and `cloudpickle` both round-trip it. The deprecation
warning is unchanged; removing it is left for a minor release.
Refs #4029.
Assisted-by: ClaudeCode:claude-opus-5-5
* chore: name the changelog fragment after the pull request
Assisted-by: ClaudeCode:claude-opus-5-51 parent 957a5f6 commit e210f92
3 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
44 | 51 | | |
45 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
0 commit comments