From 60b4abc7df83a0d5b2bc33d555dddbaef5a8e56b Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 14:42:46 +0300 Subject: [PATCH 1/8] Fix using incorrect hidden property on ProgressBar instance Signed-off-by: Theodore Aptekarev --- src/commoncode/cliutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commoncode/cliutils.py b/src/commoncode/cliutils.py index 8ec419c..a1d2723 100644 --- a/src/commoncode/cliutils.py +++ b/src/commoncode/cliutils.py @@ -177,7 +177,7 @@ def make_step(self, n_steps): # overriden and copied from Click to work around Click woes for # https://github.com/aboutcode-org/scancode-toolkit/issues/2583 def generator(self): - if self.is_hidden: + if self.hidden: yield from self.iter else: for rv in self.iter: @@ -196,7 +196,7 @@ class EnhancedProgressBar(DebuggedProgressBar): """ def render_progress(self): - if not self.is_hidden: + if not self.hidden: return super(EnhancedProgressBar, self).render_progress() @@ -217,7 +217,7 @@ class ProgressLogger(ProgressBar): def __init__(self, *args, **kwargs): super(ProgressLogger, self).__init__(*args, **kwargs) - self.is_hidden = False + self.hidden = False def render_progress(self): line = self.format_progress_line() From 754fbd4d73d2d68c29dd1cdc121874a2553b83f4 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:04:28 +0300 Subject: [PATCH 2/8] Bump minimal click version in dependencies specification Signed-off-by: Theodore Aptekarev --- requirements.txt | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 562ae0b..5eaf6f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ attrs==22.2.0 beautifulsoup4==4.13.3 certifi==2022.12.7 chardet==5.2.0 -click==8.1.3 +click==8.2.0 idna==3.4 pip==23.0 PyYAML==6.0 diff --git a/setup.cfg b/setup.cfg index 063b149..e73496c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ python_requires = >=3.9 install_requires = attrs >= 18.1, !=20.1.0 Beautifulsoup4[chardet] >= 4.13.0 - click >= 6.7, !=7.0 + click >= 8.2 requests[use_chardet_on_py3] >= 2.7.0 saneyaml >= 0.5.2 text_unidecode >= 1.0 From 8ad21e7145f1cde441a7fe53419f3a7899255af0 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:27:11 +0300 Subject: [PATCH 3/8] Be more explicit with the minimal dependency version Signed-off-by: Theodore Aptekarev --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index e73496c..219bd51 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ python_requires = >=3.9 install_requires = attrs >= 18.1, !=20.1.0 Beautifulsoup4[chardet] >= 4.13.0 - click >= 8.2 + click >= 8.2.0 requests[use_chardet_on_py3] >= 2.7.0 saneyaml >= 0.5.2 text_unidecode >= 1.0 From e6f0061bca791ee536be5b75b583f096a0233986 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:30:51 +0300 Subject: [PATCH 4/8] Revert "Be more explicit with the minimal dependency version" This reverts commit 15dcc61e71e593dce4369a8e8e303cc5a25e6d26. Signed-off-by: Theodore Aptekarev --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 219bd51..e73496c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ python_requires = >=3.9 install_requires = attrs >= 18.1, !=20.1.0 Beautifulsoup4[chardet] >= 4.13.0 - click >= 8.2.0 + click >= 8.2 requests[use_chardet_on_py3] >= 2.7.0 saneyaml >= 0.5.2 text_unidecode >= 1.0 From 39ff77750a70fb8501d3aa2f501f328e687a6031 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:30:59 +0300 Subject: [PATCH 5/8] Revert "Bump minimal click version in dependencies specification" This reverts commit c58a014d8f63e62cc751e398b9e4bd25702dd960. Signed-off-by: Theodore Aptekarev --- requirements.txt | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5eaf6f4..562ae0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ attrs==22.2.0 beautifulsoup4==4.13.3 certifi==2022.12.7 chardet==5.2.0 -click==8.2.0 +click==8.1.3 idna==3.4 pip==23.0 PyYAML==6.0 diff --git a/setup.cfg b/setup.cfg index e73496c..063b149 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ python_requires = >=3.9 install_requires = attrs >= 18.1, !=20.1.0 Beautifulsoup4[chardet] >= 4.13.0 - click >= 8.2 + click >= 6.7, !=7.0 requests[use_chardet_on_py3] >= 2.7.0 saneyaml >= 0.5.2 text_unidecode >= 1.0 From 14e18e07beddc98cabfa8900000233de2e345242 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:31:18 +0300 Subject: [PATCH 6/8] Revert "Fix using incorrect hidden property on ProgressBar instance" This reverts commit 13f2addfd1c7c1596bdf2ed41cf8a859f3327121. Signed-off-by: Theodore Aptekarev --- src/commoncode/cliutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commoncode/cliutils.py b/src/commoncode/cliutils.py index a1d2723..8ec419c 100644 --- a/src/commoncode/cliutils.py +++ b/src/commoncode/cliutils.py @@ -177,7 +177,7 @@ def make_step(self, n_steps): # overriden and copied from Click to work around Click woes for # https://github.com/aboutcode-org/scancode-toolkit/issues/2583 def generator(self): - if self.hidden: + if self.is_hidden: yield from self.iter else: for rv in self.iter: @@ -196,7 +196,7 @@ class EnhancedProgressBar(DebuggedProgressBar): """ def render_progress(self): - if not self.hidden: + if not self.is_hidden: return super(EnhancedProgressBar, self).render_progress() @@ -217,7 +217,7 @@ class ProgressLogger(ProgressBar): def __init__(self, *args, **kwargs): super(ProgressLogger, self).__init__(*args, **kwargs) - self.hidden = False + self.is_hidden = False def render_progress(self): line = self.format_progress_line() From befc58ad8801cadaf4b90331250e32bfd28927d8 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:32:49 +0300 Subject: [PATCH 7/8] Cap the version of click supported Signed-off-by: Theodore Aptekarev --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 063b149..4dc4de9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ python_requires = >=3.9 install_requires = attrs >= 18.1, !=20.1.0 Beautifulsoup4[chardet] >= 4.13.0 - click >= 6.7, !=7.0 + click >= 6.7, !=7.0, <8.2 requests[use_chardet_on_py3] >= 2.7.0 saneyaml >= 0.5.2 text_unidecode >= 1.0 From d8c040f499a645a987864412a913c1b7d312f074 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Mon, 19 May 2025 15:36:38 +0300 Subject: [PATCH 8/8] Bump click to the latest compatible version Signed-off-by: Theodore Aptekarev --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 562ae0b..c65232a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ attrs==22.2.0 beautifulsoup4==4.13.3 certifi==2022.12.7 chardet==5.2.0 -click==8.1.3 +click==8.1.8 idna==3.4 pip==23.0 PyYAML==6.0