Hello community,

here is the log from the commit of package python-hypothesis for 
openSUSE:Factory checked in at 2017-11-10 14:38:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hypothesis (Old)
 and      /work/SRC/openSUSE:Factory/.python-hypothesis.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hypothesis"

Fri Nov 10 14:38:18 2017 rev:9 rq:539900 version:3.36.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hypothesis/python-hypothesis.changes      
2017-10-18 10:44:30.021727644 +0200
+++ /work/SRC/openSUSE:Factory/.python-hypothesis.new/python-hypothesis.changes 
2017-11-10 14:38:23.705301554 +0100
@@ -1,0 +2,45 @@
+Tue Nov  7 23:22:24 UTC 2017 - [email protected]
+
+- update to version 3.36.0:
+  * This release adds a setting to the public API, and does some
+    internal cleanup:
+    + The derandomize setting is now documented (issue #890)
+    + Removed - and disallowed - all ‘bare excepts’ in Hypothesis
+      (issue #953)
+    + Documented the strict setting as deprecated, and updated the
+      build so our docs always match deprecations in the code.
+
+- changes from version 3.35.0:
+  * This minor release supports constraining uuids() to generate
+    uuid.UUID`s of a particular version. (:issue:`721)
+
+-------------------------------------------------------------------
+Sat Nov  4 02:01:40 UTC 2017 - [email protected]
+
+- update to version 3.34.1:
+  * This patch updates the documentation to suggest builds(callable)
+    instead of just(callable()).
+
+-------------------------------------------------------------------
+Fri Nov  3 05:13:56 UTC 2017 - [email protected]
+
+- update to version 3.34.0:
+  * Hypothesis now emits deprecation warnings if you apply @given more
+    than once to a target.
+    Applying @given repeatedly wraps the target multiple times. Each
+    wrapper will search the space of of possible parameters
+    separately. This is equivalent but will be much more inefficient
+    than doing it with a single call to @given.
+    For example, instead of @given(booleans()) @given(integers()), you
+    could write @given(booleans(), integers())
+
+- changes from version 3.33.1 :
+  * builds() would try to infer a strategy for required positional
+    arguments of the target from type hints, even if they had been
+    given to builds() as positional arguments (issue #946). Now it
+    only infers missing required arguments.
+  * An internal introspection function wrongly reported self as a
+    required argument for bound methods, which might also have
+    affected builds(). Now it knows better.
+
+-------------------------------------------------------------------

Old:
----
  hypothesis-3.33.0.tar.gz

New:
----
  hypothesis-3.36.0.tar.gz

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

Other differences:
------------------
++++++ python-hypothesis.spec ++++++
--- /var/tmp/diff_new_pack.IwyhPZ/_old  2017-11-10 14:38:24.657267149 +0100
+++ /var/tmp/diff_new_pack.IwyhPZ/_new  2017-11-10 14:38:24.657267149 +0100
@@ -24,7 +24,7 @@
 %endif
 %bcond_with test
 Name:           python-hypothesis
-Version:        3.33.0
+Version:        3.36.0
 Release:        0
 Summary:        A library for property based testing
 License:        MPL-2.0

++++++ hypothesis-3.33.0.tar.gz -> hypothesis-3.36.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/PKG-INFO 
new/hypothesis-3.36.0/PKG-INFO
--- old/hypothesis-3.33.0/PKG-INFO      2017-10-16 09:13:49.000000000 +0200
+++ new/hypothesis-3.36.0/PKG-INFO      2017-11-06 15:20:13.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: hypothesis
-Version: 3.33.0
+Version: 3.36.0
 Summary: A library for property based testing
 Home-page: https://github.com/HypothesisWorks/hypothesis-python
 Author: David R. MacIver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/_settings.py 
new/hypothesis-3.36.0/src/hypothesis/_settings.py
--- old/hypothesis-3.33.0/src/hypothesis/_settings.py   2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/_settings.py   2017-11-06 
15:19:12.000000000 +0100
@@ -74,12 +74,12 @@
 
     @property
     def __doc__(self):
+        description = all_settings[self.name].description
+        deprecation_message = all_settings[self.name].deprecation_message
         default = repr(getattr(settings.default, self.name)) if \
             self.show_default else '(dynamically calculated)'
-        return '\n'.join((
-            all_settings[self.name].description,
-            'default value: %s' % (default,)
-        ))
+        return '\n\n'.join([description, 'default value: %s' % (default,),
+                            (deprecation_message or '').strip()]).strip()
 
 
 default_variable = DynamicVariable(None)
@@ -373,17 +373,6 @@
 )
 
 settings.define_setting(
-    'max_mutations',
-    default=10,
-    description="""
-Hypothesis will try this many variations on a single example before moving on
-to an entirely fresh start. If you've got hard to satisfy properties, raising
-this might help, but you probably shouldn't touch this dial unless you really
-know what you're doing.
-"""
-)
-
-settings.define_setting(
     'buffer_size',
     default=8 * 1024,
     description="""
@@ -421,15 +410,12 @@
 limit - Hypothesis won't e.g. interrupt execution of the called
 function to stop it. If this value is <= 0 then no timeout will be
 applied.
-
-Note: This setting is deprecated. In future Hypothesis will be removing the
-timeout feature.
 """,
     deprecation_message="""
-The timeout feature will go away in a future version of Hypothesis. To get
-the future behaviour set timeout=hypothesis.unlimited instead (which will
-remain valid for a further deprecation period after this setting has gone
-away).
+The timeout setting is deprecated and will be removed in a future version of
+Hypothesis. To get the future behaviour set ``timeout=hypothesis.unlimited``
+instead (which will remain valid for a further deprecation period after this
+setting has gone away).
 """,
     future_default=unlimited,
     validator=_validate_timeout
@@ -443,8 +429,8 @@
 where each falsification uses a random number generator that is seeded
 based on the hypothesis to falsify, which will be consistent across
 multiple runs. This has the advantage that it will eliminate any
-randomness from your tests, which may be preferable for some situations
-. It does have the disadvantage of making your tests less likely to
+randomness from your tests, which may be preferable for some situations.
+It does have the disadvantage of making your tests less likely to
 find novel breakages.
 """
 )
@@ -456,14 +442,14 @@
 If set to True, anything that would cause Hypothesis to issue a warning will
 instead raise an error. Note that new warnings may be added at any time, so
 running with strict set to True means that new Hypothesis releases may validly
-break your code.
+break your code.  Note also that, as strict mode is itself deprecated,
+enabling it is now an error!
 
 You can enable this setting temporarily by setting the HYPOTHESIS_STRICT_MODE
 environment variable to the string 'true'.
 """,
     deprecation_message="""
 Strict mode is deprecated and will go away in a future version of Hypothesis.
-
 To get the same behaviour, use
 warnings.simplefilter('error', HypothesisDeprecationWarning).
 """,
@@ -619,15 +605,6 @@
 )
 
 settings.define_setting(
-    'report_statistics',
-    default=Statistics.interesting,
-    description=u"""
-If set to True, Hypothesis will run a preliminary health check before
-attempting to actually execute your test.
-"""
-)
-
-settings.define_setting(
     'deadline',
     default=not_set,
     description=u"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/control.py 
new/hypothesis-3.36.0/src/hypothesis/control.py
--- old/hypothesis-3.33.0/src/hypothesis/control.py     2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/control.py     2017-11-06 
15:19:12.000000000 +0100
@@ -81,7 +81,7 @@
         for task in self.tasks:
             try:
                 task()
-            except:
+            except BaseException:
                 any_failed = True
                 report(traceback.format_exc())
         return any_failed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/core.py 
new/hypothesis-3.36.0/src/hypothesis/core.py
--- old/hypothesis-3.33.0/src/hypothesis/core.py        2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/core.py        2017-11-06 
15:19:12.000000000 +0100
@@ -847,7 +847,6 @@
 
         for falsifying_example in self.falsifying_examples:
             self.__was_flaky = False
-            raised_exception = False
             try:
                 with self.settings:
                     self.test_runner(
@@ -862,13 +861,11 @@
                     'Unreliable assumption: An example which satisfied '
                     'assumptions on the first run now fails it.'
                 )
-            except:
+            except BaseException:
                 if len(self.falsifying_examples) <= 1:
                     raise
-                raised_exception = True
                 report(traceback.format_exc())
-
-            if not raised_exception:
+            else:
                 if (
                     isinstance(
                         falsifying_example.__expected_exception,
@@ -977,6 +974,17 @@
             # Tell pytest to omit the body of this function from tracebacks
             __tracebackhide__ = True
 
+            if getattr(test, 'is_hypothesis_test', False):
+                note_deprecation((
+                    'You have applied @given to a test more than once. In '
+                    'future this will be an error. Applying @given twice '
+                    'wraps the test twice, which can be extremely slow. A '
+                    'similar effect can be gained by combining the arguments '
+                    'to the two calls to given. For example, instead of '
+                    '@given(booleans()) @given(integers()), you could write '
+                    '@given(booleans(), integers())'
+                ))
+
             settings = wrapped_test._hypothesis_internal_use_settings
 
             random = get_random_for_wrapped_test(test, wrapped_test)
@@ -1017,7 +1025,7 @@
                 state = StateForActualGivenExecution(
                     test_runner, search_strategy, test, settings, random)
                 state.run()
-            except:
+            except BaseException:
                 generated_seed = \
                     wrapped_test._hypothesis_internal_use_generated_seed
                 if generated_seed is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/database.py 
new/hypothesis-3.36.0/src/hypothesis/database.py
--- old/hypothesis-3.33.0/src/hypothesis/database.py    2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/database.py    2017-11-06 
15:19:12.000000000 +0100
@@ -172,7 +172,7 @@
                 yield cursor
             finally:
                 cursor.close()
-        except:
+        except BaseException:
             conn.rollback()
             raise
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/internal/classmap.py 
new/hypothesis-3.36.0/src/hypothesis/internal/classmap.py
--- old/hypothesis-3.33.0/src/hypothesis/internal/classmap.py   2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/internal/classmap.py   1970-01-01 
01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-# coding=utf-8
-#
-# This file is part of Hypothesis, which may be found at
-# https://github.com/HypothesisWorks/hypothesis-python
-#
-# Most of this work is copyright (C) 2013-2017 David R. MacIver
-# ([email protected]), but it contains contributions by others. See
-# CONTRIBUTING.rst for a full list of people who may hold copyright, and
-# consult the git log if you need to determine who owns an individual
-# contribution.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public License,
-# v. 2.0. If a copy of the MPL was not distributed with this file, You can
-# obtain one at http://mozilla.org/MPL/2.0/.
-#
-# END HEADER
-
-from __future__ import division, print_function, absolute_import
-
-
-class ClassMap(object):
-
-    def __init__(self):
-        self.data = {}
-
-    def all_mappings(self, key):
-        for c in type.mro(key):
-            try:
-                yield self.data[c]
-            except KeyError:
-                pass
-
-    def __getitem__(self, key):
-        try:
-            return self.data[key]
-        except KeyError:
-            for m in self.all_mappings(key):
-                return m
-        raise KeyError(key)
-
-    def __setitem__(self, key, value):
-        self.data[key] = value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/internal/conjecture/engine.py 
new/hypothesis-3.36.0/src/hypothesis/internal/conjecture/engine.py
--- old/hypothesis-3.33.0/src/hypothesis/internal/conjecture/engine.py  
2017-10-16 09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/internal/conjecture/engine.py  
2017-11-06 15:19:12.000000000 +0100
@@ -125,7 +125,7 @@
             if e.testcounter != data.testcounter:
                 self.save_buffer(data.buffer)
                 raise e
-        except:
+        except BaseException:
             self.save_buffer(data.buffer)
             raise
         finally:
@@ -735,8 +735,11 @@
                 elif (
                     data.status < prev_data.status or
                     not self.target_selector.has_tag(target, data) or
-                    mutations >= self.settings.max_mutations
+                    mutations >= 10
                 ):
+                    # Cap the variations of a single example and move on to
+                    # an entirely fresh start.  Ten is an entirely arbitrary
+                    # constant, but it's been working well for years.
                     mutations = 0
                     mutator = self._new_mutator()
             if getattr(data, 'hit_zero_bound', False):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/internal/coverage.py 
new/hypothesis-3.36.0/src/hypothesis/internal/coverage.py
--- old/hypothesis-3.33.0/src/hypothesis/internal/coverage.py   2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/internal/coverage.py   2017-11-06 
15:19:12.000000000 +0100
@@ -89,7 +89,7 @@
             description = ' in '.join(reversed(description_stack)) + ' passed'
             yield
             record_branch(description, True)
-        except:
+        except BaseException:
             record_branch(description, False)
             raise
         finally:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/internal/reflection.py 
new/hypothesis-3.36.0/src/hypothesis/internal/reflection.py
--- old/hypothesis-3.33.0/src/hypothesis/internal/reflection.py 2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/internal/reflection.py 2017-11-06 
15:19:12.000000000 +0100
@@ -91,17 +91,29 @@
 
 
 def required_args(target, args=(), kwargs=()):
-    """Return a set of required args to target."""
+    """Return a set of names of required args to target that were not supplied
+    in args or kwargs.
+
+    This is used in builds() to determine which arguments to attempt to
+    fill from type hints.  target may be any callable (including classes
+    and bound methods).  args and kwargs should be as they are passed to
+    builds() - that is, a tuple of values and a dict of names: values.
+
+    """
     try:
         spec = getfullargspec(
             target.__init__ if inspect.isclass(target) else target)
     except TypeError:  # pragma: no cover
         return None
-    # For classes, self is present in the argspec but not really required
-    posargs = spec.args[1:] if inspect.isclass(target) else spec.args
-    return set(posargs + spec.kwonlyargs) \
+    # self appears in the argspec of __init__ and bound methods, but it's an
+    # error to explicitly supply it - so we might skip the first argument.
+    skip_self = int(inspect.isclass(target) or inspect.ismethod(target))
+    # Start with the args that were not supplied and all kwonly arguments,
+    # then remove all positional arguments with default values, and finally
+    # remove kwonly defaults and any supplied keyword arguments
+    return set(spec.args[skip_self + len(args):] + spec.kwonlyargs) \
         - set(spec.args[len(spec.args) - len(spec.defaults or ()):]) \
-        - set(spec.kwonlydefaults or ()) - set(args) - set(kwargs)
+        - set(spec.kwonlydefaults or ()) - set(kwargs)
 
 
 def convert_keyword_arguments(function, args, kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/searchstrategy/strategies.py 
new/hypothesis-3.36.0/src/hypothesis/searchstrategy/strategies.py
--- old/hypothesis-3.33.0/src/hypothesis/searchstrategy/strategies.py   
2017-10-16 09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/searchstrategy/strategies.py   
2017-11-06 15:19:12.000000000 +0100
@@ -361,7 +361,7 @@
             self.do_validate()
             self.is_empty
             self.has_reusable_values
-        except:
+        except Exception:
             self.validate_called = False
             raise
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis/searchstrategy/types.py 
new/hypothesis-3.36.0/src/hypothesis/searchstrategy/types.py
--- old/hypothesis-3.33.0/src/hypothesis/searchstrategy/types.py        
2017-10-16 09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/searchstrategy/types.py        
2017-11-06 15:19:12.000000000 +0100
@@ -32,7 +32,7 @@
 
 def type_sorting_key(t):
     """Minimise to None, then non-container types, then container types."""
-    if t is None or t is type(None):
+    if t is None or t is type(None):  # noqa: E721
         return -1
     return issubclass(t, collections.abc.Container)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/strategies.py 
new/hypothesis-3.36.0/src/hypothesis/strategies.py
--- old/hypothesis-3.33.0/src/hypothesis/strategies.py  2017-10-16 
09:12:42.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/strategies.py  2017-11-06 
15:19:12.000000000 +0100
@@ -172,9 +172,13 @@
 
 
 def just(value):
-    """Return a strategy which only generates value.
+    """Return a strategy which only generates ``value``.
 
-    Note: value is not copied. Be wary of using mutable values.
+    Note: ``value`` is not copied. Be wary of using mutable values.
+
+    If ``value`` is the result of a callable, you can use
+    :func:`builds(callable) <hypothesis.strategies.builds>` instead
+    of ``just(callable())`` to get a fresh value each time.
 
     """
     from hypothesis.searchstrategy.misc import JustStrategy
@@ -1507,16 +1511,25 @@
 
 @cacheable
 @defines_strategy_with_reusable_values
-def uuids():
+def uuids(version=None):
     """Returns a strategy that generates :class:`UUIDs <uuid.UUID>`.
 
+    If the optional version argument is given, value is passed through
+    to :class:`~python:uuid.UUID` and only UUIDs of that version will
+    be generated.
+
     All returned values from this will be unique, so e.g. if you do
     ``lists(uuids())`` the resulting list will never contain duplicates.
 
     """
     from uuid import UUID
+    if version not in (None, 1, 2, 3, 4, 5):
+        raise InvalidArgument((
+            'version=%r, but version must be in (None, 1, 2, 3, 4, 5) '
+            'to pass to the uuid.UUID constructor.') % (version, )
+        )
     return shared(randoms(), key='hypothesis.strategies.uuids.generator').map(
-        lambda r: UUID(int=r.getrandbits(128))
+        lambda r: UUID(version=version, int=r.getrandbits(128))
     )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis/version.py 
new/hypothesis-3.36.0/src/hypothesis/version.py
--- old/hypothesis-3.33.0/src/hypothesis/version.py     2017-10-16 
09:13:48.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis/version.py     2017-11-06 
15:20:13.000000000 +0100
@@ -17,5 +17,5 @@
 
 from __future__ import division, print_function, absolute_import
 
-__version_info__ = (3, 33, 0)
+__version_info__ = (3, 36, 0)
 __version__ = '.'.join(map(str, __version_info__))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hypothesis-3.33.0/src/hypothesis.egg-info/PKG-INFO 
new/hypothesis-3.36.0/src/hypothesis.egg-info/PKG-INFO
--- old/hypothesis-3.33.0/src/hypothesis.egg-info/PKG-INFO      2017-10-16 
09:13:48.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis.egg-info/PKG-INFO      2017-11-06 
15:20:13.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: hypothesis
-Version: 3.33.0
+Version: 3.36.0
 Summary: A library for property based testing
 Home-page: https://github.com/HypothesisWorks/hypothesis-python
 Author: David R. MacIver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/hypothesis-3.33.0/src/hypothesis.egg-info/SOURCES.txt 
new/hypothesis-3.36.0/src/hypothesis.egg-info/SOURCES.txt
--- old/hypothesis-3.33.0/src/hypothesis.egg-info/SOURCES.txt   2017-10-16 
09:13:48.000000000 +0200
+++ new/hypothesis-3.36.0/src/hypothesis.egg-info/SOURCES.txt   2017-11-06 
15:20:13.000000000 +0100
@@ -35,7 +35,6 @@
 src/hypothesis/internal/__init__.py
 src/hypothesis/internal/cache.py
 src/hypothesis/internal/charmap.py
-src/hypothesis/internal/classmap.py
 src/hypothesis/internal/compat.py
 src/hypothesis/internal/coverage.py
 src/hypothesis/internal/detection.py


Reply via email to