diff --git a/flake8-v5-compatibility.patch b/flake8-v5-compatibility.patch new file mode 100644 index 0000000..638ddae --- /dev/null +++ b/flake8-v5-compatibility.patch @@ -0,0 +1,17 @@ +--- a/blue/__init__.py ++++ b/blue/__init__.py +@@ -397,9 +397,12 @@ def format_file_in_place(*args, **kws): + + + try: +- BaseConfigParser = flake8_config.ConfigParser # flake8 v4 ++ BaseConfigParser = flake8_config.configparser.ConfigParser # flake8 v5 + except AttributeError: +- BaseConfigParser = flake8_config.MergedConfigParser # flake8 v3 ++ try: ++ BaseConfigParser = flake8_config.ConfigParser # flake8 v4 ++ except AttributeError: ++ BaseConfigParser = flake8_config.MergedConfigParser # flake8 v3 + + + class MergedConfigParser(BaseConfigParser): diff --git a/python-blue.changes b/python-blue.changes index a8c6dd0..94e5627 100644 --- a/python-blue.changes +++ b/python-blue.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 19 10:14:39 UTC 2022 - Daniel Garcia + +- Add flake8-v5-compatibility.patch wich makes it work with flake8 v5 + gh#grantjenks/blue#78 + ------------------------------------------------------------------- Wed May 4 17:28:34 UTC 2022 - Matej Cepl diff --git a/python-blue.spec b/python-blue.spec index a6b4b49..c8d7bc5 100644 --- a/python-blue.spec +++ b/python-blue.spec @@ -29,6 +29,8 @@ Source: https://github.com/grantjenks/blue/archive/v%{version}.tar.gz#/b Patch0: unpin-black.patch # PATCH-FIX-OPENSUSE unpin-tomli.patch -- gh#grantjenks/blue#66 Patch1: unpin-tomli.patch +# PATCH-FIX-UPSTREAM flake8-v5-compatibility.patch -- gh#grantjenks/blue#78 +Patch2: flake8-v5-compatibility.patch BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module base >= 3.6} BuildRequires: %{python_module black >= 21.7}