Hello community,

here is the log from the commit of package python3-case for openSUSE:Factory 
checked in at 2016-07-15 12:53:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-06-19 10:47:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-case.new/python3-case.changes   
2016-07-15 12:53:50.000000000 +0200
@@ -1,0 +2,21 @@
+Wed Jul 13 02:47:51 UTC 2016 - a...@gmx.de
+
+- specfile:
+  * updated source url
+
+- update to version 1.2.2:
+  * "mock.reload_modules": Fixed compatibility with Python 3.
+
+- changes from version 1.2.1:
+  * "mock.reload_modules" now re-imports the module and calls
+    "reload()" on it.  This fixes issues with side effects not being
+    properly reset after context exits.
+
+- changes from version 1.2.0:
+  * Adds "mock.mute" decorator to suppress stdout with no return
+    value.  Contributed by Tony Narlock.
+  * Adds "Mock.on_nth_call_do_raise(excA, excB, n)".  This will make
+    the mock raise excA until called n times, in which it will start
+    to raise excB.
+
+-------------------------------------------------------------------

Old:
----
  case-1.1.4.tar.gz

New:
----
  case-1.2.2.tar.gz

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

Other differences:
------------------
++++++ python3-case.spec ++++++
--- /var/tmp/diff_new_pack.Ls9Etp/_old  2016-07-15 12:53:51.000000000 +0200
+++ /var/tmp/diff_new_pack.Ls9Etp/_new  2016-07-15 12:53:51.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-case
 #
-# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -13,21 +13,22 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python3-case
-Version:        1.1.4
+Version:        1.2.2
 Release:        0
-License:        BSD-3-Clause
 Summary:        Python unittest Utilities
-Url:            http://github.com/celery/case
+License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Source:         https://pypi.io/packages/source/c/case/case-%{version}.tar.gz
+Url:            http://github.com/celery/case
+Source:         
https://files.pythonhosted.org/packages/source/c/case/case-%{version}.tar.gz
+BuildRequires:  python3-coverage >= 3.0
 BuildRequires:  python3-devel
+BuildRequires:  python3-nose >= 1.3.7
 BuildRequires:  python3-setuptools >= 0.7
 BuildRequires:  python3-six
-BuildRequires:  python3-coverage >= 3.0
-BuildRequires:  python3-nose >= 1.3.7
 Requires:       python3-nose >= 1.3.7
 Requires:       python3-six
 BuildArch:      noarch
@@ -50,6 +51,7 @@
 %files
 %defattr(-,root,root,-)
 %doc Changelog LICENSE README.rst
+
 %{python3_sitelib}/*
 
 %changelog

++++++ case-1.1.4.tar.gz -> case-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.1.4/Changelog new/case-1.2.2/Changelog
--- old/case-1.1.4/Changelog    2016-05-13 00:04:39.000000000 +0200
+++ new/case-1.2.2/Changelog    2016-06-23 23:47:06.000000000 +0200
@@ -1,6 +1,44 @@
 Changes
 =======
 
+.. _version-1.2.2:
+
+1.2.2
+=====
+:release-date: 2016-06-23 02:46 P.M PDT
+:release-by: Ask Solem
+
+- ``mock.reload_modules``: Fixed compatibility with Python 3.
+
+.. _version-1.2.1:
+
+1.2.1
+=====
+:release-date: 2016-06-23 12:111 P.M PDT
+:release-by: Ask Solem
+
+- ``mock.reload_modules`` now re-imports the module and
+  calls ``reload()`` on it.
+
+  This fixes issues with side effects not being properly reset after
+  context exits.
+
+.. _version-1.2.0:
+
+1.2.0
+=====
+:release-date: 2016-06-13 05:00 P.M PDT
+:release-by: Ask Solem
+
+- Adds ``mock.mute`` decorator to suppress stdout with no return value.
+
+    Contributed by Tony Narlock.
+
+- Adds ``Mock.on_nth_call_do_raise(excA, excB, n)``.
+
+    This will make the mock raise excA until called n times, in which
+    it will start to raise excB.
+
 .. _version-1.1.4:
 
 1.1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.1.4/PKG-INFO new/case-1.2.2/PKG-INFO
--- old/case-1.1.4/PKG-INFO     2016-05-13 00:06:23.000000000 +0200
+++ new/case-1.2.2/PKG-INFO     2016-06-23 23:48:05.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: case
-Version: 1.1.4
+Version: 1.2.2
 Summary: Python unittest Utilities
 Home-page: http://github.com/celery/case
 Author: Ask Solem
@@ -10,7 +10,7 @@
          Python unittest utilities
         =====================================================================
         
-        :Version: 1.1.4
+        :Version: 1.2.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.1.4/README.rst new/case-1.2.2/README.rst
--- old/case-1.1.4/README.rst   2016-05-13 00:04:53.000000000 +0200
+++ new/case-1.2.2/README.rst   2016-06-23 23:47:14.000000000 +0200
@@ -2,7 +2,7 @@
  Python unittest utilities
 =====================================================================
 
-:Version: 1.1.4
+:Version: 1.2.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.1.4/case/__init__.py 
new/case-1.2.2/case/__init__.py
--- old/case-1.1.4/case/__init__.py     2016-05-13 00:04:49.000000000 +0200
+++ new/case-1.2.2/case/__init__.py     2016-06-23 23:47:21.000000000 +0200
@@ -7,7 +7,7 @@
 from . import mock
 from . import skip
 
-VERSION = (1, 1, 4)
+VERSION = (1, 2, 2)
 __version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:])
 __author__ = 'Ask Solem'
 __contact__ = 'a...@celeryproject.org'
@@ -20,7 +20,7 @@
     b'Case',
 
     b'ANY', b'ContextMock', b'MagicMock', b'Mock',
-    b'call', b'patch',  b'sentinel',
+    b'call', b'patch', b'sentinel',
 
     b'mock', b'skip',
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.1.4/case/mock.py new/case-1.2.2/case/mock.py
--- old/case-1.1.4/case/mock.py 2016-04-21 02:22:26.000000000 +0200
+++ new/case-1.2.2/case/mock.py 2016-06-23 23:45:45.000000000 +0200
@@ -1,5 +1,6 @@
 from __future__ import absolute_import, unicode_literals
 
+import importlib
 import inspect
 import logging
 import os
@@ -16,6 +17,14 @@
 from .utils import WhateverIO, decorator, get_logger_handlers, noop
 
 try:
+    from importlib import reload
+except ImportError:
+    try:
+        from imp import reload
+    except ImportError:
+        reload = reload
+
+try:
     from unittest import mock
 except ImportError:
     import mock  # noqa
@@ -32,7 +41,7 @@
     'ANY', 'ContextMock', 'MagicMock', 'Mock', 'MockCallbacks',
     'call', 'patch', 'sentinel',
 
-    'wrap_logger', 'environ', 'sleepdeprived', 'mask_modules',
+    'wrap_logger', 'environ', 'sleepdeprived', 'mask_modules', 'mute',
     'stdouts', 'replace_module_value', 'sys_version', 'pypy_version',
     'platform_pyimp', 'sys_platform', 'reset_modules', 'module',
     'open', 'restore_logging', 'module_exists', 'create_patcher',
@@ -67,6 +76,32 @@
         self.side_effect = on_call
         return self
 
+    def on_nth_call_do_raise(self, excA, excB, n=1):
+        """Change exception raised after ``n`` calls.
+
+        Mock will raise excA until called `n` times, which after
+        it will raise excB'.
+
+        Example::
+
+            >>> mock.on_nth_call_do_raise(KeyError(), RuntimError(), n=3)
+            >>> mock()
+            KeyError()
+            >>> mock()
+            KeyError()
+            >>> mock()
+            KeyError()
+            >>> mock()
+            RuntimeError()
+
+        """
+        def on_call(*args, **kwargs):
+            if self.call_count >= n:
+                self.side_effect = excB
+            raise excA
+        self.side_effect = on_call
+        return self
+
     def on_nth_call_return(self, retval, n=1):
         """Change Mock to return specific return value after ``n`` calls.
 
@@ -363,6 +398,33 @@
 
 
 @decorator
+def mute():
+    """Redirect `sys.stdout` and `sys.stderr` to /dev/null, silencent them.
+    Decorator example::
+        @mock.mute
+        def test_foo(self):
+            something()
+    Context example::
+        with mock.mute():
+            something()
+    """
+    prev_out, prev_err = sys.stdout, sys.stderr
+    prev_rout, prev_rerr = sys.__stdout__, sys.__stderr__
+    devnull = open(os.devnull, 'w')
+    mystdout, mystderr = devnull, devnull
+    sys.stdout = sys.__stdout__ = mystdout
+    sys.stderr = sys.__stderr__ = mystderr
+
+    try:
+        yield
+    finally:
+        sys.stdout = prev_out
+        sys.stderr = prev_err
+        sys.__stdout__ = prev_rout
+        sys.__stderr__ = prev_rerr
+
+
+@decorator
 def replace_module_value(module, name, value=None):
     """Mock module value, given a module, attribute name and value.
 
@@ -497,6 +559,8 @@
     prev = dict((k, sys.modules.pop(k))
                 for k in modules if k in sys.modules)
     try:
+        for k in modules:
+            reload(importlib.import_module(k))
         yield
     finally:
         sys.modules.update(prev)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.1.4/case.egg-info/PKG-INFO 
new/case-1.2.2/case.egg-info/PKG-INFO
--- old/case-1.1.4/case.egg-info/PKG-INFO       2016-05-13 00:06:07.000000000 
+0200
+++ new/case-1.2.2/case.egg-info/PKG-INFO       2016-06-23 23:47:59.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: case
-Version: 1.1.4
+Version: 1.2.2
 Summary: Python unittest Utilities
 Home-page: http://github.com/celery/case
 Author: Ask Solem
@@ -10,7 +10,7 @@
          Python unittest utilities
         =====================================================================
         
-        :Version: 1.1.4
+        :Version: 1.2.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.1.4/case.egg-info/SOURCES.txt 
new/case-1.2.2/case.egg-info/SOURCES.txt
--- old/case-1.1.4/case.egg-info/SOURCES.txt    2016-05-13 00:06:07.000000000 
+0200
+++ new/case-1.2.2/case.egg-info/SOURCES.txt    2016-06-23 23:47:59.000000000 
+0200
@@ -25,7 +25,6 @@
 docs/_templates/sidebardonations.html
 docs/images/celery_128.png
 docs/images/favicon.ico
-docs/includes/.introduction.txt.swp
 docs/includes/installation.txt
 docs/includes/introduction.txt
 docs/reference/case.case.rst
Files old/case-1.1.4/docs/includes/.introduction.txt.swp and 
new/case-1.2.2/docs/includes/.introduction.txt.swp differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/case-1.1.4/docs/includes/introduction.txt 
new/case-1.2.2/docs/includes/introduction.txt
--- old/case-1.1.4/docs/includes/introduction.txt       2016-05-13 
00:04:52.000000000 +0200
+++ new/case-1.2.2/docs/includes/introduction.txt       2016-06-23 
23:47:12.000000000 +0200
@@ -1,4 +1,4 @@
-:Version: 1.1.4
+:Version: 1.2.2
 :Web: http://case.readthedocs.org/
 :Download: http://pypi.python.org/pypi/case/
 :Source: http://github.com/celery/case/


Reply via email to