Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flake8-polyfill for 
openSUSE:Factory checked in at 2021-05-20 19:23:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8-polyfill (Old)
 and      /work/SRC/openSUSE:Factory/.python-flake8-polyfill.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flake8-polyfill"

Thu May 20 19:23:49 2021 rev:3 rq:894326 version:1.0.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-flake8-polyfill/python-flake8-polyfill.changes
    2018-12-13 19:44:38.712996911 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-flake8-polyfill.new.2988/python-flake8-polyfill.changes
  2021-05-20 19:24:18.662127115 +0200
@@ -1,0 +2,15 @@
+Wed May 19 10:42:19 UTC 2021 - pgaj...@suse.com
+
+- added patches
+  fix https://gitlab.com/pycqa/flake8-polyfill/-/issues/3
+  + python-flake8-polyfill-tool-pytest.patch
+
+-------------------------------------------------------------------
+Wed May 19 07:13:03 UTC 2021 - pgaj...@suse.com
+
+- actually run the testsuite, use %pytest macro
+- added patches
+  fix use unittest.mock instead of mock
+  + python-flake8-polyfill-use-unittest-mock.patch
+
+-------------------------------------------------------------------

New:
----
  python-flake8-polyfill-tool-pytest.patch
  python-flake8-polyfill-use-unittest-mock.patch

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

Other differences:
------------------
++++++ python-flake8-polyfill.spec ++++++
--- /var/tmp/diff_new_pack.F0QFfx/_old  2021-05-20 19:24:19.090125304 +0200
+++ /var/tmp/diff_new_pack.F0QFfx/_new  2021-05-20 19:24:19.090125304 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-flake8-polyfill
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,24 +17,30 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
 Name:           python-flake8-polyfill
 Version:        1.0.2
 Release:        0
 Summary:        Polyfill package for Flake8 plugins
 License:        MIT
 Group:          Development/Languages/Python
-Url:            https://gitlab.com/pycqa/flake8-polyfill
+URL:            https://gitlab.com/pycqa/flake8-polyfill
 Source:         
https://files.pythonhosted.org/packages/source/f/flake8-polyfill/flake8-polyfill-%{version}.tar.gz
+# https://gitlab.com/pycqa/flake8-polyfill/-/merge_requests/8
+Patch0:         python-flake8-polyfill-use-unittest-mock.patch
+# https://gitlab.com/pycqa/flake8-polyfill/-/issues/3
+Patch1:         python-flake8-polyfill-tool-pytest.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-%if %{with test}
-BuildRequires:  %{python_module flake8}
-%endif
 Requires:       python-flake8
 BuildArch:      noarch
-
+# SECTION test requirements
+%if %{suse_version} <= 1500
+BuildRequires:  python2-mock
+%endif
+BuildRequires:  %{python_module flake8}
+BuildRequires:  %{python_module pytest}
+# /SECTION
 %python_subpackages
 
 %description
@@ -43,6 +49,8 @@
 
 %prep
 %setup -q -n flake8-polyfill-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %python_build
@@ -51,13 +59,11 @@
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%if %{with test}
 %check
-%python_exec setup.py test
-%endif
+# tests/test_stdin.py: we do not have pep8 module in TW
+%pytest tests/test_options.py
 
 %files %{python_files}
-%defattr(-,root,root,-)
 %doc AUTHORS.rst CHANGELOG.rst README.rst
 %license LICENSE
 %{python_sitelib}/*

++++++ python-flake8-polyfill-tool-pytest.patch ++++++
-- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,7 @@
 [bdist_wheel]
 universal = 1
 
-[pytest]
+[tool:pytest]
 norecursedirs = .git .* *.egg* old docs dist build
 addopts = -rw
++++++ python-flake8-polyfill-use-unittest-mock.patch ++++++
Index: flake8-polyfill-1.0.2/tests/test_options.py
===================================================================
--- flake8-polyfill-1.0.2.orig/tests/test_options.py    2017-12-30 
14:45:28.000000000 +0100
+++ flake8-polyfill-1.0.2/tests/test_options.py 2021-05-19 09:45:18.723426614 
+0200
@@ -2,7 +2,10 @@
 import optparse
 import os
 
-import mock
+try:
+    import unittest.mock as mock
+except ImportError:
+    import mock
 import pytest
 
 from flake8_polyfill import options

Reply via email to