Overhaul deprecations system in dask.config#10499
Conversation
| -------- | ||
| dask.config.get | ||
| dask.config.set | ||
| """ |
There was a problem hiding this comment.
Deliberately not linking this to the sphinx docs
1634a8d to
fdc6bf2
Compare
b037a7a to
d60408d
Compare
config.rename support for dot-separated keys and deprecations
dask/config.py
Outdated
| warnings.warn( | ||
| f"dask config key {o!r} has been renamed to {n!r}", | ||
| FutureWarning, | ||
| ) |
There was a problem hiding this comment.
We have a separate check_deprecations method for handling deprecations here -- does this result in multiple warnings being emitted?
There was a problem hiding this comment.
Ah. I completely missed that.
This looks like a bit of a mess. dask/dask uses check_deprecations, while dask/distributed uses rename. The two systems are completely independent.
I'll rework this PR to unify them somehow.
There was a problem hiding this comment.
Upon further inspection:
- dask/dask uses
check_deprecations, which works fordask.config.setbut not for~/.config/dask.yaml - dask/distributed uses
rename, which works for~/.config/dask.yamlbut not fordask.config.set
I overhauled and unified the whole system.
Follow-up: dask/distributed#8179
d60408d to
48e2e16
Compare
config.rename support for dot-separated keys and deprecations914e273 to
6344cf4
Compare
|
@jrbourbeau this PR is ready for review again |
|
@jrbourbeau this is now blocking #10507 |
81647cb to
6344cf4
Compare
dask.config
|
I think this may have introduced an accidental change in the behavior of dask.config.get (I think dask/dask-kubernetes#816 is referring to the same thing, albeit somewhat cryptically 🙂): I believe this also contradicts the docstring so I think it's a clear bug and not just a neutral change
cc @crusaderky @jrbourbeau @fjetter edit: opened #10519 to discuss |
The config deprecation system was problematic:
check_deprecations, which worked fordask.config.setbut not for~/.config/dask.yamlrename, which worked for~/.config/dask.yamlbut not fordask.config.setThis PR overhauls and unifies the whole system.
Additionally, it adds support in
renamefor dot-separated old keys and None values.Follow-up: dask/distributed#8179