Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ddt for openSUSE:Factory 
checked in at 2023-12-01 21:24:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ddt (Old)
 and      /work/SRC/openSUSE:Factory/.python-ddt.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ddt"

Fri Dec  1 21:24:33 2023 rev:20 rq:1129175 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ddt/python-ddt.changes    2023-04-22 
22:02:27.909935581 +0200
+++ /work/SRC/openSUSE:Factory/.python-ddt.new.25432/python-ddt.changes 
2023-12-01 21:24:33.840105715 +0100
@@ -1,0 +2,7 @@
+Mon Nov 27 15:42:45 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.7.0:
+  * Add async flag when wrapping async function (#111)
+  * Dropping support for Python 2.7
+
+-------------------------------------------------------------------

Old:
----
  ddt-1.6.0.tar.gz

New:
----
  ddt-1.7.0.tar.gz

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

Other differences:
------------------
++++++ python-ddt.spec ++++++
--- /var/tmp/diff_new_pack.eA6Lym/_old  2023-12-01 21:24:34.664135979 +0100
+++ /var/tmp/diff_new_pack.eA6Lym/_new  2023-12-01 21:24:34.664135979 +0100
@@ -16,10 +16,9 @@
 #
 
 
-%bcond_without python2
 %{?sle15_python_module_pythons}
 Name:           python-ddt
-Version:        1.6.0
+Version:        1.7.0
 Release:        0
 Summary:        Data-Driven/Decorated Tests
 License:        MIT
@@ -33,11 +32,8 @@
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module PyYAML}
+BuildRequires:  %{python_module aiounittest}
 BuildRequires:  %{python_module pytest}
-%if %{with python2}
-BuildRequires:  python2-enum34
-BuildRequires:  python2-mock
-%endif
 # /SECTION
 %python_subpackages
 

++++++ ddt-1.6.0.tar.gz -> ddt-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ddt-1.6.0/PKG-INFO new/ddt-1.7.0/PKG-INFO
--- old/ddt-1.6.0/PKG-INFO      2022-08-10 18:45:43.834721600 +0200
+++ new/ddt-1.7.0/PKG-INFO      2023-11-08 04:05:40.583957200 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ddt
-Version: 1.6.0
+Version: 1.7.0
 Summary: Data-Driven/Decorated Tests
 Home-page: https://github.com/datadriventests/ddt
 Author: Carles Barrobés
@@ -20,5 +20,6 @@
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Topic :: Software Development :: Testing
 License-File: LICENSE.md
+Requires-Dist: enum34; python_version < "3"
 
 A library to multiply test cases
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ddt-1.6.0/ddt.egg-info/PKG-INFO 
new/ddt-1.7.0/ddt.egg-info/PKG-INFO
--- old/ddt-1.6.0/ddt.egg-info/PKG-INFO 2022-08-10 18:45:43.000000000 +0200
+++ new/ddt-1.7.0/ddt.egg-info/PKG-INFO 2023-11-08 04:05:40.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ddt
-Version: 1.6.0
+Version: 1.7.0
 Summary: Data-Driven/Decorated Tests
 Home-page: https://github.com/datadriventests/ddt
 Author: Carles Barrobés
@@ -20,5 +20,6 @@
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Topic :: Software Development :: Testing
 License-File: LICENSE.md
+Requires-Dist: enum34; python_version < "3"
 
 A library to multiply test cases
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ddt-1.6.0/ddt.egg-info/SOURCES.txt 
new/ddt-1.7.0/ddt.egg-info/SOURCES.txt
--- old/ddt-1.6.0/ddt.egg-info/SOURCES.txt      2022-08-10 18:45:43.000000000 
+0200
+++ new/ddt-1.7.0/ddt.egg-info/SOURCES.txt      2023-11-08 04:05:40.000000000 
+0100
@@ -12,6 +12,7 @@
 ddt.egg-info/top_level.txt
 test/__init__.py
 test/mycode.py
+test/test_async.py
 test/test_example.py
 test/test_functional.py
 test/test_named_data.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ddt-1.6.0/ddt.py new/ddt-1.7.0/ddt.py
--- old/ddt-1.6.0/ddt.py        2022-08-10 18:45:24.000000000 +0200
+++ new/ddt-1.7.0/ddt.py        2023-11-08 04:05:30.000000000 +0100
@@ -27,7 +27,7 @@
     # Python 2.7
     from collections import Sequence
 
-__version__ = '1.6.0'
+__version__ = '1.7.0'
 
 # These attributes will not conflict with any real python attribute
 # They are added to the decorated test method and processed later
@@ -215,9 +215,15 @@
     This internal method decorator feeds the test data item to the test.
 
     """
-    @wraps(func)
-    def wrapper(self):
-        return func(self, *args, **kwargs)
+    if inspect.iscoroutinefunction(func):
+        @wraps(func)
+        async def wrapper(self):
+            return await func(self, *args, **kwargs)
+    else:
+        @wraps(func)
+        def wrapper(self):
+            return func(self, *args, **kwargs)
+
     wrapper.__name__ = new_name
     wrapper.__wrapped__ = func
     # set docstring if exists
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ddt-1.6.0/test/test_async.py 
new/ddt-1.7.0/test/test_async.py
--- old/ddt-1.6.0/test/test_async.py    1970-01-01 01:00:00.000000000 +0100
+++ new/ddt-1.7.0/test/test_async.py    2023-11-08 04:05:30.000000000 +0100
@@ -0,0 +1,11 @@
+import aiounittest
+
+from ddt import ddt, data
+from test.mycode import larger_than_two
+
+
+@ddt
+class TestAsync(aiounittest.AsyncTestCase):
+    @data(3, 4, 12, 23)
+    async def test_larger_than_two(self, value):
+        self.assertTrue(larger_than_two(value))

Reply via email to