Replace token= keyword with name= in map_blocks#3597
Conversation
Behavior here was reversed from normal dask.array conventions. This does an abrupt change of the name= semantics and issues a warning when users use token=, pointing them to name= See dask#3226 (comment)
|
cc @jakirkham |
| name = '%s-%s' % (token or funcname(func), | ||
| tokenize(token or func, args, **kwargs)) | ||
| if token: | ||
| warnings.warn("The token= keyword to map_blocks has been moved to name=") |
There was a problem hiding this comment.
Should we note when we plan to drop token?
There was a problem hiding this comment.
Perhaps? When I run into warnings like this the future version number rarely means much to me. I mostly care about "how far into the future will this work?" the answer I get is some version number, which doesn't mean much to me, so I go ahead and change my code anyway.
Happy to adhere to some convention though if it exists.
There was a problem hiding this comment.
This point of including versions in deprecations came up once in a NumPy PR I submitted. So it seemed like a fair point to raise. That said, I don't have particularly strong feelings about it.
There was a problem hiding this comment.
OK, in that case I'll probably pass on this.
|
Thanks @mrocklin. This seems fine to me. Had one question about the warning. The CI failures seemed unrelated. So went ahead and restarted the failing builds. |
Was using `name` the old way, which is no longer needed. So changed to use `name` in the new way.
|
Found usage of |
|
Thanks for the find @jakirkham . I've gone ahead and remove the use of |
b5f9ab3 to
add56dc
Compare
Behavior here was reversed from normal dask.array conventions.
This does an abrupt change of the name= semantics and issues a warning
when users use token=, pointing them to name=
See #3226 (comment)
flake8 dask