Hello community,

here is the log from the commit of package python3-case for openSUSE:Factory 
checked in at 2016-11-28 15:10:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-case (Old)
 and      /work/SRC/openSUSE:Factory/.python3-case.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-case"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-case/python3-case.changes        
2016-10-28 10:47:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-case.new/python3-case.changes   
2016-11-28 15:10:21.000000000 +0100
@@ -1,0 +2,16 @@
+Sat Nov 26 18:55:43 UTC 2016 - [email protected]
+
+- update to version 1.5.2:
+  * Using setup/teardown instead of setup_method/teardown_method was a
+    bad idea.
+
+- changes from version 1.5.1:
+  * 1.5.0 had a left over print statement :blush:
+
+- changes from version 1.5.0:
+  * Pytest: When decorating classes using the "skip.*" and "mock.*"
+    decorators, these now augment "cls.setup"/"cls.teardown" instead
+    of "cls.setup_method"/"cls.teardown_method".
+  * Pytest: Adds "patching.object".
+
+-------------------------------------------------------------------

Old:
----
  case-1.4.0.tar.gz

New:
----
  case-1.5.2.tar.gz

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

Other differences:
------------------
++++++ python3-case.spec ++++++
--- /var/tmp/diff_new_pack.3kGjND/_old  2016-11-28 15:10:23.000000000 +0100
+++ /var/tmp/diff_new_pack.3kGjND/_new  2016-11-28 15:10:23.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-case
-Version:        1.4.0
+Version:        1.5.2
 Release:        0
 Summary:        Python unittest Utilities
 License:        BSD-3-Clause

++++++ case-1.4.0.tar.gz -> case-1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/Changelog new/case-1.5.2/Changelog
--- old/case-1.4.0/Changelog    2016-10-18 03:54:35.000000000 +0200
+++ new/case-1.5.2/Changelog    2016-10-29 01:14:41.000000000 +0200
@@ -1,6 +1,58 @@
 Changes
 =======
 
+1.5.2
+=====
+:release-date: 2016-10-28 03:40 p.m. PDT
+:release-by: Ask Solem
+
+- Using setup/teardown instead of setup_method/teardown_method was a bad idea.
+
+    Since it's way more common to override setup/teardown, and it's
+    likely people forget to call super in these methods, the change
+    crashed several test suites.
+
+    So on pytest the decorators are now back to augmenting
+    setup_method/teardown_method again.
+
+1.5.1
+=====
+:release-date: 2016-10-28 03:40 p.m. PDT
+:release-by: Ask Solem
+
+- 1.5.0 had a left over print statement :blush:
+
+.. _version-1.5.0:
+
+1.5.0
+=====
+:release-date: 2016-10-28 03:36 p.m. PDT
+:release-by: Ask Solem
+
+- Pytest: When decorating classes using the ``skip.*`` and ``mock.*``
+  decorators, these now augment ``cls.setup``/``cls.teardown`` instead of
+  ``cls.setup_method``/``cls.teardown_method``.
+
+    It's a bit hard to find in the pytest documentation, but pytest
+    will always call test_cls.setup and test_cls.teardown.
+
+- Pytest: Adds ``patching.object``.
+
+    This works exactly like :func:`unittest.mock.patch.object`,
+    you give it an object and an attribute name, and it will patch
+    that attribute on the object.  It also supports the same arguments
+    and extra options.
+
+    Example:
+
+    .. code-block:: python
+
+        @pytest.fixture
+        def channel(patching):
+            c = Channel()
+            patching(c, 'connect')
+            return c
+
 .. _version-1.4.0:
 
 1.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/PKG-INFO new/case-1.5.2/PKG-INFO
--- old/case-1.4.0/PKG-INFO     2016-10-18 03:56:30.000000000 +0200
+++ new/case-1.5.2/PKG-INFO     2016-10-29 01:16:18.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: case
-Version: 1.4.0
+Version: 1.5.2
 Summary: Python unittest Utilities
 Home-page: http://github.com/celery/case
 Author: Ask Solem
@@ -12,7 +12,7 @@
         
         |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
         
-        :Version: 1.4.0
+        :Version: 1.5.2
         :Web: http://case.readthedocs.org/
         :Download: http://pypi.python.org/pypi/case/
         :Source: http://github.com/celery/case/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/README.rst new/case-1.5.2/README.rst
--- old/case-1.4.0/README.rst   2016-10-18 03:54:44.000000000 +0200
+++ new/case-1.5.2/README.rst   2016-10-29 01:14:37.000000000 +0200
@@ -4,7 +4,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
 
-:Version: 1.4.0
+:Version: 1.5.2
 :Web: http://case.readthedocs.org/
 :Download: http://pypi.python.org/pypi/case/
 :Source: http://github.com/celery/case/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/case/__init__.py 
new/case-1.5.2/case/__init__.py
--- old/case-1.4.0/case/__init__.py     2016-10-18 03:54:44.000000000 +0200
+++ new/case-1.5.2/case/__init__.py     2016-10-29 01:14:37.000000000 +0200
@@ -11,7 +11,7 @@
 from . import mock
 from . import skip
 
-__version__ = '1.4.0'
+__version__ = '1.5.2'
 __author__ = 'Ask Solem'
 __contact__ = '[email protected]'
 __homepage__ = 'http://github.com/celery/case'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/case/pytest.py 
new/case-1.5.2/case/pytest.py
--- old/case-1.4.0/case/pytest.py       2016-09-30 20:58:36.000000000 +0200
+++ new/case-1.5.2/case/pytest.py       2016-10-29 00:17:01.000000000 +0200
@@ -6,6 +6,7 @@
 from functools import partial, wraps
 from six import iteritems as items
 
+from . import patch
 from . import mock
 
 sentinel = object()
@@ -61,6 +62,11 @@
         self.monkeypatch.setattr(path, value)
         return value
 
+    def object(self, target, attribute, *args, **kwargs):
+        return _wrap_context(
+            patch.object(target, attribute, *args, **kwargs),
+            self.request)
+
     def _value_or_mock(self, value, new, name, path, **kwargs):
         if value is sentinel:
             value = new(name=name or path.rpartition('.')[2])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/case/utils.py new/case-1.5.2/case/utils.py
--- old/case-1.4.0/case/utils.py        2016-08-19 23:39:00.000000000 +0200
+++ new/case-1.5.2/case/utils.py        2016-10-29 01:08:27.000000000 +0200
@@ -56,26 +56,24 @@
 
 def is_unittest_testcase(cls):
     try:
-        mro = cls.mro
+        cls.mro
     except AttributeError:
         pass  # py.test uses old style classes
     else:
-        for parent in mro():
-            if issubclass(parent, unittest.TestCase):
-                return True
+        return issubclass(cls, unittest.TestCase)
 
 
 def augment_setup(orig_setup, context, pargs, pkwargs):
-    def around_setup_method(*args, **kwargs):
+    def around_setup_method(self, *args, **kwargs):
         try:
-            contexts = args[0].__rb3dc_contexts__
+            contexts = self.__rb3dc_contexts__
         except AttributeError:
-            contexts = args[0].__rb3dc_contexts = []
+            contexts = self.__rb3dc_contexts = []
         p = context(*pargs, **pkwargs)
         p.__enter__()
         contexts.append(p)
         if orig_setup:
-            return orig_setup(*args, **kwargs)
+            return orig_setup(self, *args, **kwargs)
     if orig_setup:
         around_setup_method = wraps(orig_setup)(around_setup_method)
         around_setup_method.__wrapped__ = orig_setup
@@ -83,16 +81,16 @@
 
 
 def augment_teardown(orig_teardown, context, pargs, pkwargs):
-    def around_teardown(*args, **kwargs):
+    def around_teardown(self, *args, **kwargs):
         try:
-            contexts = args[0].__rb3dc_contexts__
+            contexts = self.__rb3dc_contexts__
         except AttributeError:
             pass
         else:
             for context in contexts:
                 context.__exit__(*sys.exc_info())
         if orig_teardown:
-            orig_teardown(*args, **kwargs)
+            orig_teardown(self, *args, **kwargs)
     if orig_teardown:
         around_teardown = wraps(orig_teardown)(around_teardown)
         around_teardown.__wrapped__ = orig_teardown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/case.egg-info/PKG-INFO 
new/case-1.5.2/case.egg-info/PKG-INFO
--- old/case-1.4.0/case.egg-info/PKG-INFO       2016-10-18 03:56:27.000000000 
+0200
+++ new/case-1.5.2/case.egg-info/PKG-INFO       2016-10-29 01:16:11.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: case
-Version: 1.4.0
+Version: 1.5.2
 Summary: Python unittest Utilities
 Home-page: http://github.com/celery/case
 Author: Ask Solem
@@ -12,7 +12,7 @@
         
         |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
         
-        :Version: 1.4.0
+        :Version: 1.5.2
         :Web: http://case.readthedocs.org/
         :Download: http://pypi.python.org/pypi/case/
         :Source: http://github.com/celery/case/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.4.0/docs/includes/introduction.txt 
new/case-1.5.2/docs/includes/introduction.txt
--- old/case-1.4.0/docs/includes/introduction.txt       2016-10-18 
03:54:44.000000000 +0200
+++ new/case-1.5.2/docs/includes/introduction.txt       2016-10-29 
01:14:37.000000000 +0200
@@ -1,4 +1,4 @@
-:Version: 1.4.0
+:Version: 1.5.2
 :Web: http://case.readthedocs.org/
 :Download: http://pypi.python.org/pypi/case/
 :Source: http://github.com/celery/case/


Reply via email to