Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-before-after for 
openSUSE:Factory checked in at 2022-03-24 22:58:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-before-after (Old)
 and      /work/SRC/openSUSE:Factory/.python-before-after.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-before-after"

Thu Mar 24 22:58:12 2022 rev:2 rq:964447 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-before-after/python-before-after.changes  
2020-09-08 22:50:13.923601202 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-before-after.new.1900/python-before-after.changes
        2022-03-24 23:00:19.416385095 +0100
@@ -1,0 +2,7 @@
+Thu Mar 24 04:44:38 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Add pr_10.patch:
+  * Use stdlib unittest.mock.
+- Drop {Build,}Requires on mock. 
+
+-------------------------------------------------------------------

New:
----
  pr_10.patch

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

Other differences:
------------------
++++++ python-before-after.spec ++++++
--- /var/tmp/diff_new_pack.fUBzuE/_old  2022-03-24 23:00:19.864385528 +0100
+++ /var/tmp/diff_new_pack.fUBzuE/_new  2022-03-24 23:00:19.872385535 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-before-after
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,13 +27,12 @@
 # https://github.com/c-oreills/before_after/issues/8
 Source1:        
https://raw.githubusercontent.com/c-oreills/before_after/master/LICENSE
 Patch0:         
https://patch-diff.githubusercontent.com/raw/c-oreills/before_after/pull/6.patch#/pr_6.patch
+Patch1:         
https://patch-diff.githubusercontent.com/raw/c-oreills/before_after/pull/10.patch#/pr_10.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-mock >= 1.0.1
 BuildArch:      noarch
 # SECTION test requirements
-BuildRequires:  %{python_module mock >= 1.0.1}
 BuildRequires:  %{python_module pytest}
 # /SECTION
 %python_subpackages
@@ -42,8 +41,7 @@
 before_after provides utilities for testing race conditions.
 
 %prep
-%setup -q -n before_after-%{version}
-%patch0 -p1
+%autosetup -p1 -n before_after-%{version}
 cp %{SOURCE1} .
 
 %build

++++++ pr_10.patch ++++++
>From 11c0ecc7e8a2f90a762831e216c1bc40abfda43a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
Date: Mon, 10 May 2021 22:01:00 +0200
Subject: [PATCH] Use built-in unittest.mock in Python 3.3+

---
 before_after/__init__.py | 5 ++++-
 setup.py                 | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/before_after/__init__.py b/before_after/__init__.py
index 1081684..e713a61 100644
--- a/before_after/__init__.py
+++ b/before_after/__init__.py
@@ -50,7 +50,10 @@ def inner(*a, **k):
             return ret
         return inner
 
-    from mock import patch
+    if sys.version_info >= (3, 3):
+        from unittest.mock import patch
+    else:
+        from mock import patch
 
     patcher = patch(target, **kwargs)
     original, _ = patcher.get_original()
diff --git a/setup.py b/setup.py
index 572470c..b1167df 100644
--- a/setup.py
+++ b/setup.py
@@ -31,8 +31,9 @@
         'Natural Language :: English',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
     ],
     keywords=['testing', 'race conditions'],
 
-    install_requires=['mock>=1.0.1'],
+    install_requires=['mock>=1.0.1; python_version < "3.3"'],
 )

Reply via email to