Commit f4dbd66
committed
Fix #1308: Remove dead dask.config.set() at module import time
The module-level call in ag3.py:
dask.config.set(**{"array.slicing.split_native_chunks": False})
was historically present to silence a dask `PerformanceWarning` emitted
on certain slicing operations. On current dask (>=2025), the
`array.slicing.split_native_chunks` config key is unrecognised (returns
no default) and the associated `PerformanceWarning` has been removed
from `dask.array.slicing`. The setting therefore has no observable
effect in any currently-supported dask version.
Removing the line directly addresses the filed bug — `import
malariagen_data` no longer modifies global dask configuration — without
introducing scoped context managers or any other new machinery.
Verified:
- `import malariagen_data` leaves `dask.config.get('array.slicing.
split_native_chunks', 'DEFAULT') == 'DEFAULT'`.
- `tests/anoph/test_snp_data.py` (193 tests), `test_frq.py`,
`test_cnv_data.py`, `test_hapclust.py`, `test_dipclust.py`,
`test_hap_data.py`, `test_aim_data.py` all pass with no new warnings;
in particular no `PerformanceWarning` is emitted from any of the
`da.take` / `da.compress` call sites in `util.py` or `snp_data.py`.
- pre-commit, ruff, ruff-format, mypy all clean.1 parent b46f450 commit f4dbd66
1 file changed
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
0 commit comments