Black specifies a requirement for click>=7.1.2 but actually requires click>=8.0
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
typer 0.3.2 has requirement click<7.2.0,>=7.1.1, but you'll have ...
So to resolve this ERROR: typer 0.3.2 has requirement click<7.2.0 ... Try installing a specific click version, pip install click==7.2.0.
Read more >Should You Use Upper Bound Version Constraints?
First, if you are writing a library, your “users” are specifying your package in their dependencies; if an update breaks them, they can...
Read more >black · PyPI
Black can be installed by running pip install black . It requires Python 3.7+ to run. If you want to format Jupyter Notebooks,...
Read more >Acceptance Test Kit - DFNET Research
Tests & Requirements; 1.2. ... Examining data values according to user-specified criteria. 15.6. ... Modify Levels = 0-4. Write = 0-4.
Read more >Computer Organization
Digital circuits of your computer use voltage levels to represent 1 and 0. ... The combinational circuit is like a black box but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This didn’t fix the problem.
I still got the problem with:
python:
3.7
black:22.1.0
click:8.0.4
Forcing click>=8.0.0 on users for a dev dependency is pretty harsh. There are MANY application dependencies that are still locked to <=7.1.2.
Due to this I can’t upgrade from the latest Black beta release.