-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul deprecations system in dask.config
#10499
Conversation
-------- | ||
dask.config.get | ||
dask.config.set | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon further inspection:
- dask/dask uses
check_deprecations
, which works fordask.config.set
but not for~/.config/dask.yaml
- dask/distributed uses
rename
, which works for~/.config/dask.yaml
but 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @crusaderky
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.set
but not for~/.config/dask.yaml
rename
, which worked for~/.config/dask.yaml
but not fordask.config.set
This PR overhauls and unifies the whole system.
Additionally, it adds support in
rename
for dot-separated old keys and None values.Follow-up: dask/distributed#8179