Skip to content

Black specifies a requirement for click>=7.1.2 but actually requires click>=8.0 #2774

@enpaul

Description

@enpaul

Describe the bug

Installing black from the head of the main branch and click<8.0 results in a stack trace whenever the tool is run.

To Reproduce

python3 -m venv black-click-compat-bug
source black-click-compat-bug/bin/activate
python -m pip install \
  "click<8.0" \
  git+https://github.com/psf/black
black --help

Resulting traceback:

Traceback (most recent call last):
  File "/home/enpaul/black-click-compat-bug/bin/black", line 5, in <module>
    from black import patched_main
  File "/home/enpaul/black-click-compat-bug/lib64/python3.10/site-packages/black/__init__.py", line 34, in <module>
    from click.core import ParameterSource
ImportError: cannot import name 'ParameterSource' from 'click.core' (/home/enpaul/black-click-compat-bug/lib64/python3.10/site-packages/click/core.py)

Expected behavior

Black should specify a requirement for click>=8.0.0 (actual specification is for >=7.1.2)

Environment

  • Black's version: 21.12b1.dev40+g565f9c9
  • OS: Linux (Fedora 35)
  • Python: Python 3.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: packagingInstallation and packaging of BlackT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions