Subject: CVS commit: pkgsrc/devel/py-hypothesis
From: Adam Ciarcinski
Date: 2019-10-22 15:20:27
Message id:

Log Message:
py-hypothesis: updated to 4.41.3

This patch is to ensure that our internals remain comprehensible to :pypi:`mypy` \ 
0.740 - there is no user-visible change.

This patch changes some internal hashes to SHA384, to better support users \ 
subject to FIPS-140. There is no user-visible API change.

This release makes --hypothesis-show-statistics much more useful for tests using \ 
a :class:`~hypothesis.stateful.RuleBasedStateMachine`, by simplifying the reprs \ 
so that events are aggregated correctly.

This release upgrades the :func:`~hypothesis.strategies.fixed_dictionaries` \ 
strategy to support optional keys (:issue:`1913`).

This release makes some minor internal changes in support of improving the \ 
Hypothesis test suite. It should not have any user visible impact.

This release changes how Hypothesis checks if a parameter to a test function is \ 
a mock object. It is unlikely to have any noticeable effect, but may result in a \ 
small performance improvement, especially for test functions where a mock object \ 
is being passed as the first argument.

This release fixes a bug where our example database logic did not distinguish \ 
between failing examples based on arguments from a \ 
@pytest.mark.parametrize(...). This could in theory cause data loss if a common \ 
failure overwrote a rare one, and in practice caused occasional file-access \ 
collisions in highly concurrent workloads (e.g. during a 300-way parametrize on \ 
16 cores).

For internal reasons this also involves bumping the minimum supported version of \ 
:pypi:`pytest` to 4.3

This patch improves our type hints on the :func:`~hypothesis.strategies.emails`, \ 
:func:`~hypothesis.strategies.functions`, \ 
:func:`~hypothesis.strategies.integers`, \ 
:func:`~hypothesis.strategies.iterables`, and \ 
:func:`~hypothesis.strategies.slices` strategies, as well as the .filter() \ 

There is no runtime change, but if you use :pypi:`mypy` or a similar \ 
type-checker on your tests the results will be a bit more precise.

This patch improves the performance of unique collections such as \ 
:func:`~hypothesis.strategies.sets` of :func:`~hypothesis.strategies.just` or \ 
:func:`~hypothesis.strategies.booleans` strategies. They were already pretty \ 
good though, so you're unlikely to notice much!

If a value in a dict passed to :func:`~hypothesis.strategies.fixed_dictionaries` \ 
is not a strategy, Hypothesis now tells you which one.

This release adds the :func:`~hypothesis.extra.numpy.basic_indices` strategy, to \ 
generate basic indexes for arrays of the specified shape (:issue:`1930`).

It generates tuples containing some mix of integers, :obj:`python:slice` \ 
objects, ... (Ellipsis), and :obj:`numpy:numpy.newaxis`; which when used to \ 
index an array of the specified shape produce either a scalar or a shared-memory \ 
view of the array. Note that the index tuple may be longer or shorter than the \ 
array shape, and may produce a view with another dimensionality again!

This patch defers creation of the .hypothesis directory until we have something \ 
to store in it, meaning that it will appear when Hypothesis is used rather than \ 
simply installed.

This patch bumps our dependency on :pypi:`attrs` to >=19.2.0; but there are \ 
no user-visible changes to Hypothesis.

This is a comment-only patch which tells :pypi:`mypy` 0.730 to ignore some \ 
internal compatibility shims we use to support older Pythons.

This release adds the :func:`` function, which implements \ 
experimental support for :ref:`targeted property-based testing \ 
<targeted-search>` (:issue:`1779`).

By calling :func:`` in your test function, Hypothesis can do a \ 
hill-climbing search for bugs. If you can calculate a suitable metric such as \ 
the load factor or length of a queue, this can help you find bugs with inputs \ 
that are highly improbably from unguided generation - however good our \ 
heuristics, example diversity, and deduplication logic might be. After all, \ 
those features are at work in targeted PBT too!

This release emits a warning if you use the .example() method of a strategy in a \ 
non-interactive context.

:func:`~hypothesis.given` is a much better choice for writing tests, whether you \ 
care about performance, minimal examples, reproducing failures, or even just the \ 
variety of inputs that will be tested!

This patch disables part of the :mod:`typing`-based inference for the \ 
:pypi:`attrs` package under Python 3.5.0, which has some incompatible internal \ 
details (:issue:`2095`).

This patch fixes a bug in strategy inference for :pypi:`attrs` classes where \ 
Hypothesis would fail to infer a strategy for attributes of a generic type such \ 
as Union[int, str] or List[bool] (:issue:`2091`).

This patch deprecates min_len or max_len of 0 in \ 
:func:`~hypothesis.extra.numpy.byte_string_dtypes` and \ 
:func:`~hypothesis.extra.numpy.unicode_string_dtypes`. The lower limit is now 1.

Numpy uses a length of 0 in these dtypes to indicate an undetermined size, \ 
chosen from the data at array creation. However, as the \ 
:func:`~hypothesis.extra.numpy.arrays` strategy creates arrays before filling \ 
them, strings were truncated to 1 byte.

This patch improves the messaging that comes from invalid size arguments to \ 
collection strategies such as :func:`~hypothesis.strategies.lists`.

This release improves the :func:`~hypothesis.extra.lark.from_lark` strategy, \ 
tightening argument validation and adding the explicit argument to allow use \ 
with terminals that use @declare instead of a string or regular expression.

This feature is required to handle features such as indent and dedent tokens in \ 
Python code, which can be generated with the :pypi:`hypothesmith` package.

The :func:`~hypothesis.strategies.from_type` strategy now knows to look up the \ 
subclasses of abstract types, which cannot be instantiated directly.

This is very useful for :pypi:`hypothesmith` to support :pypi:`libCST`.