From 1590466de9cc344bf4dd941ae2f0f567d52c6416 Mon Sep 17 00:00:00 2001 From: Adam Romanek Date: Fri, 11 Feb 2022 12:23:06 +0100 Subject: [PATCH] Fix CI for Python 2 Black dropped Python 2 support in 22.1.0. Unfortunately we can't pin the version as <22.1.0 becasue in the past Black was versioned using just main.major, not main.major.minor, and they were only releasing beta versions, hence the 'b' suffix. Pluggy 1.0.0 dropped Python 2 support. It seams JJB should drop support for Python 2 too. Otherwise it will be harder and harder to maintain dependencies... Change-Id: I13b82a02bb50ab46183ff04aae521b44e475f743 --- .pre-commit-config.yaml | 1 + test-requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2780448f0..ea49edb45 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,4 +21,5 @@ repos: additional_dependencies: - flake8>=3.7.8 - flake8-black + - black==21.12b0 # the last version that supports Python 2 language_version: python3 diff --git a/test-requirements.txt b/test-requirements.txt index 66e09e84d..db1d8077d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,3 +12,4 @@ stestr>=2.0.0,!=3.0.0 # Apache-2.0/BSD tox>=2.9.1 # MIT mock>=2.0; python_version < '3.0' # BSD sphinxcontrib-programoutput +pluggy<1.0.0 # the last version that supports Python 2