From 05bbb348cd4b10e423cab38028023a3b13203f5d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 15 Aug 2023 14:29:22 -0400 Subject: [PATCH] fix: running black on python 3.11 Black 22.0 is incompatible with click >= 8.1 [1], pin it to a working version. Traceback (most recent call last): File ".pyenv/bin/black", line 8, in sys.exit(patched_main()) ^^^^^^^^^^^^^^ File ".pyenv/lib/python3.11/site-packages/black/__init__.py", line 6606, in patched_main patch_click() File ".pyenv/lib/python3.11/site-packages/black/__init__.py", line 6595, in patch_click from click import _unicodefun # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name '_unicodefun' from 'click' (.pyenv/lib/python3.11/site-packages/click/__init__.py) [1] https://github.com/psf/black/issues/2964 Change-Id: I502f10e4cdedae4c431a243fc621fa10ab8bc5cf Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/10604 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10618 --- dev-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev-requirements.txt b/dev-requirements.txt index 8a6bc811..ab152984 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,2 +1,4 @@ black == 20.8b1 flake8 >= 3.8 +# Required for black 22.0, it's broken with click >= 8.1 +click < 8.1 -- 2.34.1