Skip to content

ImportError: cannot import name '_unicodefun' from 'click' #2976

@enaskopelja

Description

@enaskopelja

Describe the bug
A recent version of click has been released which removes _unicodefun, breaking black (see also dask/distributed#6013).

To Reproduce

docker run --rm -it python:3.9-alpine sh

In the container:

pip install "click==8.1.0" "black==22.1.0"
black .

The resulting error is:

Traceback (most recent call last):
  File "/usr/local/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/usr/local/lib/python3.9/site-packages/black/__init__.py", line 1423, in patched_main
    patch_click()
  File "/usr/local/lib/python3.9/site-packages/black/__init__.py", line 1409, in patch_click
    from click import _unicodefun
ImportError: cannot import name '_unicodefun' from 'click' (/usr/local/lib/python3.9/site-packages/click/__init__.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    R: duplicateThis issue or pull request already existsT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions