Skip to content

dask-scheduler and dask-worker CLI break with click==8.0.0  #4809

Closed

Description

@ManuelBahr

What happened:

When using click=8.0.0 which was released on May 11th, the scheduler as well as worker CLI don't come up.

What you expected to happen:

Working scheduler and worker CLIs

Minimal Complete Verifiable Example:

$ dask-scheduler --version
ValueError: 'default' must be a list when 'multiple' is true.
$ dask-worker --version
AttributeError: module 'click._unicodefun' has no attribute '_verify_python3_env'

Anything else we need to know?:

Probable root cause for dask-scheduler:

Click changelog:

The default value for a parameter with nargs > 1 and multiple=True must be a list of tuples. #1649

dask-worker doesn't set a default for multiple options and therefore is not affected by this, but shows a different failure.

Probable root cause for dask-worker:

def check_python_3():

Environment:

  • pip install distributed reproduces the issue
  • Click version needs to be: 8.0.0

Activity

  1. quasiben commented on May 12, 2021

    @quasiben
    Member

    Thanks for the report @ManuelBahr . Confirmed that this is an issue:

    mamba create -n dask-click-test -c conda-forge python
    conda activate dask-click-test
    python -m pip install distributed
    

    Do you know how challenging it would be to support older and latest versions of click ?

  2. ManuelBahr commented on May 12, 2021

    @ManuelBahr
    Author

    The fix for multiple is trivial since the new version of clicks seems to enforce a restriction that would have made sense earlier. The issue is that all older versions of dask will suffer from this as well with the newest click. Not sure how you would go about that.

    For the dask-worker I believe that code fragment that distributed used was something internal to click. Not sure how that looks like nowadays.

  3. quasiben commented on May 12, 2021

    @quasiben
    Member

    Probably the easiest thing to do right now is set a pin for pip / conda and restrict to less than 8.X.

  4. jrbourbeau commented on May 12, 2021

    @jrbourbeau
    Member

    Thanks for reporting @ManuelBahr and investigating @quasiben! I opened up a PR over in #4810 which proposes we add some compatibility code to handle the changes in click 8

  5. ManuelBahr commented on May 12, 2021

    @ManuelBahr
    Author

    Do you plan to backport those changes to the last version that supported Python3.6?

  6. quasiben commented on May 12, 2021

    @quasiben
    Member

    Do you plan to backport those changes to the last version that supported Python3.6?

    I don't think we need to do that. Dask has dropped Python 3.6 support: dask/dask#7006

  7. ManuelBahr commented on May 12, 2021

    @ManuelBahr
    Author

    Sure that is the definition of ending support. However, that renders dask effectively unusable for Python 3.6 users until they discover the solution to constrain click. Up to now they were just frozen at a certain version.

  8. quasiben commented on May 12, 2021

    @quasiben
    Member

    That is true. There is not a plan at moment to take this action . Dask has typically not made patches for older versions and instead opted to encourage folks to upgrade. We recognize this comes with some frustration but we've also found this to be helpful is resolving bugs quickly while also delivering new features/improvements.

    With that said, Is Python 3.6 critical for you and/or some community you are involved with ? If so, can you describe some of the blockers for moving on from 3.6 ?

  9. ManuelBahr commented on May 12, 2021

    @ManuelBahr
    Author

    is Python 3.6 critical for you and/or some community you are involved with ?

    No, I was just thinking about the new user experience for that segment of dask users.

  10. quasiben commented on May 14, 2021

    @quasiben
    Member

    @ManuelBahr FYI, a patch was submitted to conda-forge to restrict click <8 for versions of dask older than 2021.05.0:
    conda-forge/conda-forge-repodata-patches-feedstock#142

  11. akamaus commented on Jun 16, 2021

    @akamaus

    Stumbled upon this issue using dask-2021.6.0 and click-8.0.1 After upgrading to click-7.1.2 problem fixed.

  12. jrbourbeau commented on Jun 16, 2021

    @jrbourbeau
    Member

    @akamaus could you confirm that you were using distributed=2021.6.0 and click=8.0.1 when you saw this issue? I'm not able to reproduce with the following:

    $ conda create -n test distributed=2021.6.0 click=8.0.1
    $ conda activate test
    $ dask-scheduler --version
    dask-scheduler, version 2021.6.0
  13. akamaus commented on Jun 17, 2021

    @akamaus

    looks like previously I had click-8.0.1, dask-2021.6.0 and distributed-2.18.0. After I upgraded to distributed-2021.6.0 I can no longer reproduce the issue. Dask was installed as a dependency in my case, I don't know why authors pinned distributed-2.18.0 (https://github.com/huawei-noah/vega/blob/master/setup.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions