Subject: CVS commit: pkgsrc/devel/py-hypothesis
From: Adam Ciarcinski
Date: 2019-08-22 13:05:27
Message id:

Log Message:
py-hypothesis: updated to 4.33.1

This patch works around a crash when an incompatible version of Numpy
is installed under PyPy 5.10 (Python 2.7).

If you are still using Python 2, please upgrade to Python 3 as soon
as possible - it will be unsupported at the end of this year.

This release improves the
strategy, as well as the :func:~hypothesis.provisional.urls and
the :func:~hypothesis.strategies.emails strategies which use it.
These strategies now use the full IANA list of Top Level Domains
and are correct as per :rfc:1035.

Passing tests using these strategies may now fail.

This patch tidies up the repr of several settings-related objects,
at runtime and in the documentation, and deprecates the undocumented
edge case that phases=None was treated like phases=tuple(Phase).

It *also* fixes :func:~hypothesis.extra.lark.from_lark with
:pypi:lark 0.7.2 <lark-parser> and later.

This patch updates some internal comments for :pypi:mypy 0.720.
There is no user-visible impact.

This release changes how the shrinker represents its progress internally. For \ 
large generated test cases
this should result in significantly less memory usage and possibly faster \ 
shrinking. Small generated
test cases may be slightly slower to shrink but this shouldn't be very noticeable.

This release makes :func:~hypothesis.extra.numpy.arrays more pedantic about
elements strategies that cannot be exactly represented as array elements.

In practice, you will see new warnings if you were using a float16 or
float32 dtype without passing :func:~hypothesis.strategies.floats the
width=16 or width=32 arguments respectively.

The previous behaviour could lead to silent truncation, and thus some elements
being equal to an explicitly excluded bound (:issue:1899).

This patch changes an internal use of MD5 to SHA hashes, to better support
users subject to FIPS-140.  There is no user-visible or API change.

This release simplifies the logic of the :attr:~hypothesis.settings.print_blob \ 
setting by removing the option to set it to PrintSettings.INFER.
As a result the print_blob setting now takes a single boolean value, and the use \ 
of PrintSettings is deprecated.

This patch improves the docstrings of several Hypothesis strategies, by
clarifying markup and adding cross-references.  There is no runtime change.

This patch improves the behaviour of the :func:~hypothesis.strategies.text
strategy when passed an alphabet which is not a strategy.  The value is
now interpreted as whitelist_characters to :func:~hypothesis.strategies.characters
instead of a sequence for :func:~hypothesis.strategies.sampled_from, which
standardises the distribution of examples and the shrinking behaviour.

You can get the previous behaviour by using
lists(sampled_from(alphabet)).map("".map) instead.

This release deprecates find().  The .example() method is a better
replacement if you want *an* example, and for the rare occasions where you
want the *minimal* example you can get it from :func:@given <hypothesis.given>.

:func:@given <hypothesis.given> has steadily outstripped find() in both
features and performance over recent years, and as we do not have the resources
to maintain and test both we think it is better to focus on just one.

This release refactors the implementation of the .example() method,
to more accurately represent the data which will be generated by
:func:@given <hypothesis.given>.

As a result, calling s.example() on an empty strategy s
(such as :func:~hypothesis.strategies.nothing) now raises Unsatisfiable
instead of the old NoExamples exception.

This patch ensures that the Pandas extra will keep working when Python 3.8
removes abstract base classes from the top-level :obj:python:collections
namespace.  This also fixes the relevant warning in Python 3.7, but there
is no other difference in behaviour and you do not need to do anything.

This release fixes  :issue:2027, by changing the way Hypothesis tries to \ 
generate distinct examples to be more efficient.

This may result in slightly different data distribution, and should improve \ 
generation performance in general,
but should otherwise have minimal user impact.

This release fixes :issue:1864, where some simple tests would perform very slowly,
because they would run many times with each subsequent run being progressively \ 
They will now stop after a more reasonable number of runs without hitting this \ 

Unless you are hitting exactly this issue, it is unlikely that this release will \ 
have any effect,
but certain classes of custom generators that are currently very slow may become \ 
a bit faster,
or start to trigger health check failures.

This release adds the strategy :func:~hypothesis.extra.numpy.integer_array_indices,
which generates tuples of Numpy arrays that can be used for
advanced indexing \ 
to select an array of a specified shape.

This release significantly improves the performance of drawing unique \ 
collections whose
elements are drawn from  :func:~hypothesis.strategies.sampled_from  strategies.

As a side effect, this detects an error condition that would previously have
passed silently: When the min_size argument on a collection with distinct elements
is greater than the number of elements being sampled, this will now raise an error.

This release removes some defunct internal functionality that was only being used
for testing. It should have no user visible impact.

This release deprecates and disables the buffer_size setting,
which should have been treated as a private implementation detail
all along.  We recommend simply deleting this settings argument.

This patch makes :func:~hypothesis.strategies.datetimes more efficient,
as it now handles short months correctly by construction instead of filtering.

This patch improves the development experience by simplifying the tracebacks
you will see when e.g. you have used the .map(...) method of a strategy
and the mapped function raises an exception.

No new exceptions can be raised, nor existing exceptions change anything but
their traceback.  We're simply using if-statements rather than exceptions for
control flow in a certain part of the internals!

This patch fixes :issue:2014, where our compatibility layer broke with version
3.7.4 of the :pypi:typing module backport on PyPI.

This issue only affects Python 2.  We remind users that Hypothesis, like many other
packages, will drop Python 2 support on 2020-01-01 \ 
and already has several features that are only available on Python 3.

This patch improves the implementation of an internal wrapper on Python 3.8
beta1 (and will break on the alphas; but they're not meant to be stable).
On other versions, there is no change at all.