Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-blue for openSUSE:Factory 
checked in at 2022-03-19 22:20:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-blue (Old)
 and      /work/SRC/openSUSE:Factory/.python-blue.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-blue"

Sat Mar 19 22:20:49 2022 rev:4 rq:963039 version:0.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-blue/python-blue.changes  2022-01-21 
01:25:56.438373108 +0100
+++ /work/SRC/openSUSE:Factory/.python-blue.new.25692/python-blue.changes       
2022-03-19 22:23:00.988959001 +0100
@@ -1,0 +2,9 @@
+Sat Mar 19 10:29:26 UTC 2022 - Ben Greiner <[email protected]>
+
+- Update to 0.8.0
+  * Fix compatibility with flake8 v4 (GH#58)
+- Drop support-new-flake8.patch fixed upstream
+- Add unpin-black.patch and unpin-tomli.patch
+- Clean requirements
+
+-------------------------------------------------------------------

Old:
----
  blue-0.7.0.tar.gz
  support-new-flake8.patch

New:
----
  blue-0.8.0.tar.gz
  unpin-black.patch
  unpin-tomli.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-blue.spec ++++++
--- /var/tmp/diff_new_pack.Tncu90/_old  2022-03-19 22:23:01.432959563 +0100
+++ /var/tmp/diff_new_pack.Tncu90/_new  2022-03-19 22:23:01.436959568 +0100
@@ -16,48 +16,32 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?!python_module:%define python_module() python3-%{**}}
 %define skip_python2 1
-%define modname blue
 Name:           python-blue
-Version:        0.7.0
+Version:        0.8.0
 Release:        0
 Summary:        A code formatter written in, and written for Python
 License:        MIT
 URL:            https://github.com/grantjenks/blue
-Source:         
https://github.com/grantjenks/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
-Patch0:         support-new-flake8.patch
+Source:         
https://github.com/grantjenks/blue/archive/v%{version}.tar.gz#/blue-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE unpin-black.patch -- we can't have a fixed black version 
in the distribution
+Patch0:         unpin-black.patch
+# PATCH-FIX-OPENSUSE unpin-tomli.patch -- gh#grantjenks/blue#66
+Patch1:         unpin-tomli.patch
 BuildRequires:  %{python_module Sphinx}
 BuildRequires:  %{python_module base >= 3.6}
 BuildRequires:  %{python_module black >= 21.7}
-# BuildRequires:  %%{python_module doc8}
-BuildRequires:  %{python_module flake8}
-BuildRequires:  %{python_module pytest-cov}
-BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module rstcheck}
+BuildRequires:  %{python_module flake8 >= 3.8}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module twine}
-BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-BuildRequires:  (python3-dataclasses if python3-base < 3.7)
-BuildRequires:  (python36-dataclasses if python36-base)
-Requires:       python-aiohttp >= 3.3.2
-Requires:       python-aiohttp_cors
-Requires:       python-appdirs
-Requires:       python-attrs >= 18.1.0
+# SECTION doc and test requirements
+BuildRequires:  %{python_module Sphinx}
+BuildRequires:  %{python_module pytest}
+# /SECTION
 Requires:       python-black >= 21.7
-Requires:       python-click >= 7.1.2
-Requires:       python-flake8
-Requires:       python-mypy_extensions >= 0.4.3
-Requires:       python-pathspec >= 0.6
-Requires:       python-regex >= 2020.1.8
-Requires:       python-toml >= 0.10.1
-Requires:       python-typed-ast >= 1.4.0
-Requires:       python-typing_extensions
-%if 0%{?python_version_nodots} == 36
-Requires:       python-dataclasses
-%endif
+Requires:       python-flake8 > 3.8
 Requires(post): update-alternatives
 Requires(postun):update-alternatives
 BuildArch:      noarch
@@ -83,6 +67,8 @@
 
 %prep
 %autosetup -p1 -n blue-%{version}
+# avoid pytest addopts for coverage checks
+sed -i '/--cov/d' tox.ini
 
 %build
 %python_build
@@ -105,8 +91,8 @@
 %doc README.rst
 %license LICENSE
 %python_alternative %{_bindir}/blue
-%{python_sitelib}/blue/
-%{python_sitelib}/blue-%{version}-py*.egg-info
+%{python_sitelib}/blue
+%{python_sitelib}/blue-%{version}*-info
 
 %files -n python-blue-doc
 %doc docs/_build/html

++++++ blue-0.7.0.tar.gz -> blue-0.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blue-0.7.0/.gitignore new/blue-0.8.0/.gitignore
--- old/blue-0.7.0/.gitignore   2021-08-17 05:09:01.000000000 +0200
+++ new/blue-0.8.0/.gitignore   2022-02-22 18:57:49.000000000 +0100
@@ -18,3 +18,4 @@
 
 # macOS metadata
 .DS_Store
+/blue/.mypy_cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blue-0.7.0/blue/__init__.py 
new/blue-0.8.0/blue/__init__.py
--- old/blue-0.7.0/blue/__init__.py     2021-08-17 05:09:01.000000000 +0200
+++ new/blue-0.8.0/blue/__init__.py     2022-02-22 18:57:49.000000000 +0100
@@ -41,7 +41,7 @@
 from click.decorators import version_option
 
 
-__version__ = '0.7.0'
+__version__ = '0.8.0'
 
 LOG = logging.getLogger(__name__)
 
@@ -332,7 +332,13 @@
     return black_format_file_in_place(*args, **kws)
 
 
-class MergedConfigParser(flake8_config.MergedConfigParser):
+try:
+    BaseConfigParser = flake8_config.ConfigParser  # flake8 4
+except AttributeError:
+    BaseConfigParser = flake8_config.MergedConfigParser  # flake8 3
+
+
+class MergedConfigParser(BaseConfigParser):
     def _parse_config(self, config_parser, parent=None):
         """Skip option parsing in flake8's config parsing."""
         config_dict = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blue-0.7.0/docs/index.rst 
new/blue-0.8.0/docs/index.rst
--- old/blue-0.7.0/docs/index.rst       2021-08-17 05:09:01.000000000 +0200
+++ new/blue-0.8.0/docs/index.rst       2022-02-22 18:57:49.000000000 +0100
@@ -5,6 +5,11 @@
 =======
 
 
+2022-02-22 (0.8.0)
+------------------
+- Fix compatibility with flake8 v4 (GH#58)
+
+
 2021-08-16 (0.7.0)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blue-0.7.0/setup.py new/blue-0.8.0/setup.py
--- old/blue-0.7.0/setup.py     2021-08-17 05:09:01.000000000 +0200
+++ new/blue-0.8.0/setup.py     2022-02-22 18:57:49.000000000 +0100
@@ -37,7 +37,7 @@
     packages=['blue'],
     tests_require=['tox'],
     cmdclass={'test': Tox},
-    install_requires=['black==21.7b0', 'flake8==3.8.4'],
+    install_requires=['black==21.7b0', 'flake8>=3.8'],
     project_urls={
         'Documentation': 'https://blue.readthedocs.io/en/latest',
         'Source': 'https://github.com/grantjenks/blue.git',

++++++ unpin-black.patch ++++++
Index: blue-0.8.0/blue/__init__.py
===================================================================
--- blue-0.8.0.orig/blue/__init__.py
+++ blue-0.8.0/blue/__init__.py
@@ -387,8 +387,9 @@ def main():
         'Black', 'Blue'
     )
     # Change the config param callback to support setup.cfg, tox.ini, etc.
-    config_param = black.main.params[21]
-    assert config_param.name == 'config'
+    # the index changed somewhere between black 21.7b and 21.12b
+    cfgidx = {p.name: i for (i, p) in enumerate(black.main.params)}['config']
+    config_param = black.main.params[cfgidx]
     config_param.callback = read_configs
     # Change the version string by adding a redundant Click `version_option`
     # decorator on `black.main`. Fortunately the added `version_option` takes
Index: blue-0.8.0/setup.py
===================================================================
--- blue-0.8.0.orig/setup.py
+++ blue-0.8.0/setup.py
@@ -37,7 +37,7 @@ setup(
     packages=['blue'],
     tests_require=['tox'],
     cmdclass={'test': Tox},
-    install_requires=['black==21.7b0', 'flake8>=3.8'],
+    install_requires=['black>=21.7b0', 'flake8>=3.8'],
     project_urls={
         'Documentation': 'https://blue.readthedocs.io/en/latest',
         'Source': 'https://github.com/grantjenks/blue.git',

++++++ unpin-tomli.patch ++++++
Index: blue-0.8.0/blue/__init__.py
===================================================================
--- blue-0.8.0.orig/blue/__init__.py
+++ blue-0.8.0/blue/__init__.py
@@ -263,8 +263,8 @@ def parse_pyproject_toml(path_config: st
 
     If parsing fails, will raise a tomli.TOMLDecodeError
     """
-    with open(path_config, encoding="utf8") as f:
-        pyproject_toml = tomli.load(f)  # type: ignore  # due to deprecated 
API usage
+    with open(path_config, mode='rb') as f:
+        pyproject_toml = tomli.load(f)
     config = pyproject_toml.get("tool", {}).get("blue", {})
     return {k.replace("--", "").replace("-", "_"): v for k, v in 
config.items()}
 
(No newline at EOF)

Reply via email to