The NetBSD Project

CVS log for pkgsrc/devel/py-hypothesis/PLIST

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / devel / py-hypothesis

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.42 / (download) - annotate - [select for diffs], Thu Jan 25 10:58:23 2024 UTC (2 months, 2 weeks ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1, HEAD
Changes since 1.41: +4 -1 lines
Diff to previous 1.41 (colored)

py-hypothesis: updated to 6.97.0

6.97.0

Changes the distribution of sampled_from() when sampling from a Flag. Previously, no-flags-set values would never be generated, and all-flags-set values would be unlikely for large enums. With this change, the distribution is more uniform in the number of flags set.

6.96.4

This patch slightly refactors some internals. There is no user-visible change.

6.96.3

This patch fixes a spurious warning about slow imports when HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY was set.

6.96.2

This patch refactors some more internals, continuing our work on supporting alternative backends (issue 3086). There is no user-visible change.

6.96.1

Fix a spurious warning seen when running pytestãàÑÔ test suite, caused by never realizing we got out of initialization due to imbalanced hook calls.

6.96.0

Warns when constructing a repr that is overly long. This can happen by accident if stringifying arbitrary strategies, and is expensive in time and memory. The associated deferring of these long strings in sampled_from() should also lead to improved performance.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Dec 11 20:46:39 2023 UTC (4 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Changes since 1.40: +10 -14 lines
Diff to previous 1.40 (colored)

py-hypothesis: updated to 6.92.0

6.92.0

This release adds an experimental observability mode. You can read the docs about it here.

6.91.2

This patch refactors some more internals, continuing our work on supporting alternative backends. There is no user-visible change.

6.91.1

This patch fixes an issue where builds() could not be used with attrs objects that defined private attributes (i.e. attributes with a leading underscore).

This patch also adds support more generally for using builds() with attrsãàalias parameter, which was previously unsupported.

This patch increases the minimum required version of attrs to 22.2.0.

6.91.0

This release adds an optional payload argument to hypothesis.event(), so that you can clearly express the difference between the label and the value of an observation. Test statistics will still summarize it as a string, but future observability options can preserve the distinction.

6.90.1

This patch supports assigning settings = settings(...) as a class attribute on a subclass of a .TestCase attribute of a RuleBasedStateMachine. Previously, this did nothing at all.

Thanks to Joey Tran for reporting these settings-related edge cases in stateful testing.

6.90.0

This release makes it an error to assign settings = settings(...) as a class attribute on a RuleBasedStateMachine. This has never had any effect, and it should be used as a decorator instead:

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 4 20:40:59 2023 UTC (6 months, 1 week ago) by adam
Branch: MAIN
Changes since 1.39: +7 -10 lines
Diff to previous 1.39 (colored)

py-hypothesis: updated to 6.87.1

6.87.1

Fixes issue 3755, where an internal condition turns out to be reachable after all.

6.87.0

This release deprecates use of assume() and reject() outside of property-based tests, because these functions work by raising a special exception (issue 3743). It also fixes some type annotations

Revision 1.39 / (download) - annotate - [select for diffs], Sun May 7 08:35:49 2023 UTC (11 months, 1 week ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2
Changes since 1.38: +10 -7 lines
Diff to previous 1.38 (colored)

py-hypothesis: update to 6.75.2.

6.75.2 - 2023-05-04

Improved the documentation regarding how to use GitHubArtifactDatabase and fixed a bug that occurred in repositories with no existing artifacts.

Thanks to Agustín Covarrubias for this contribution.

6.75.1 - 2023-04-30

hypothesis.errors will now raise AttributeError when attempting to access an undefined attribute, rather than returning None.

6.75.0 - 2023-04-30

Sick of adding @example()s by hand? Our Pytest plugin now writes .patch files to insert them for you, making this workflow easier than ever before.

Note that youÑÍl need LibCST (via hypothesis[codemods]), and that @example().via() requires PEP 614 (Python 3.9 or later).

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 4 18:34:09 2022 UTC (17 months, 1 week ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

py-hypothesis: fix build for Python 3.7; avoid self-conflict; bump revision

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 25 09:08:45 2022 UTC (17 months, 3 weeks ago) by adam
Branch: MAIN
Changes since 1.36: +4 -1 lines
Diff to previous 1.36 (colored)

py-hypothesis: updated to 6.56.3

6.56.3 - 2022-10-17

This patch teaches text() to rewrite a few more filter predicates. YouãàÑÓe unlikely to notice any change.

6.56.2 - 2022-10-10

This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy, and fixes some incorrect examples in the docs for mutually_broadcastable_shapes().

6.56.1 - 2022-10-05

This patch improves the error message when Hypothesis detects ãà×Çlush to zeroãàmode for floating-point: we now report which package(s) enabled this, which can make debugging much easier.

6.56.0 - 2022-10-02

This release defines __bool__() on SearchStrategy. It always returns True, like before, but also emits a warning to help with cases where you intended to draw a value.

6.55.0 - 2022-09-29

In preparation for future versions of the Array API standard, make_strategies_namespace() now accepts an optional api_version argument, which determines the version conformed to by the returned strategies namespace. If None, the version of the passed array module xp is inferred.

This release also introduces xps.real_dtypes(). This is currently equivalent to the existing xps.numeric_dtypes() strategy, but exists because the latter is expected to include complex numbers in the next version of the standard.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Dec 2 11:15:26 2021 UTC (2 years, 4 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4
Changes since 1.35: +4 -1 lines
Diff to previous 1.35 (colored)

py-hypothesis: updated to 6.29.3

6.29.3

This patch fixes a bug in mutually_broadcastable_shapes(), which restricted the patterns of singleton dimensions that could be generated for dimensions that extended beyond base_shape.

6.29.2

This patch clarifies our pretty-printing of DataFrames.

6.29.1

This patch documents timezones() Windows-only requirement for the tzdata package, and ensures that pip install hypothesis[zoneinfo] will install the latest version.

6.29.0

This release teaches builds() to use deferred() when resolving unrecognised type hints, so that you can conveniently register strategies for recursive types with constraints on some arguments:

class RecursiveClass:
    def __init__(self, value: int, next_node: typing.Optional["SomeClass"]):
        assert value > 0
        self.value = value
        self.next_node = next_node


st.register_type_strategy(
    RecursiveClass, st.builds(RecursiveClass, value=st.integers(min_value=1))
)
6.28.1

This release fixes some internal calculations related to collection sizes.

6.28.0

This release modifies our pytest plugin, to avoid importing Hypothesis and therefore triggering Hypothesisãàentry points for test suites where Hypothesis is installed but not actually used.

6.27.3

This release fixes issue 3080, where from_type() failed on unions containing PEP 585 builtin generic types (like list[int]) in Python 3.9 and later.

6.27.2

This patch makes the hypothesis codemod command somewhat faster.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Nov 25 20:01:56 2021 UTC (2 years, 4 months ago) by adam
Branch: MAIN
Changes since 1.34: +4 -1 lines
Diff to previous 1.34 (colored)

py-hypothesis: updated to 6.27.1

6.27.1

This patch changes the backing datastructures of register_random() and a few internal caches to use weakref.WeakKeyDictionary. This reduces memory usage and may improve performance when registered Random instances are only used for a subset of your tests.

6.27.0

This release teaches Hypothesisãàmultiple-error reporting to format tracebacks using pytest or better-exceptions, if they are installed and enabled.

6.26.0

Did you know that of the 264 possible floating-point numbers, 253 of them are nan

While nans usually have all zeros in the sign bit and mantissa, this isnãàÑÕ always true, and ãàÏÔignalingãànans might trap or error. To help distinguish such errors in e.g. CI logs, Hypothesis now prints -nan for negative nans, and adds a comment like # Saw 3 signaling NaNs if applicable.

6.25.0

This release adds special filtering logic to make a few special cases like s.map(lambda x: x) and lists().filter(len) more efficient.

6.24.6

This patch makes floats() generate ãà×Ôubnormalãàfloating point numbers more often, as these rare values can have strange interactions with unsafe compiler optimisations like -ffast-math.

6.24.5

This patch fixes a rare internal error in the datetimes() strategy, where the implementation of allow_imaginary=False crashed when checking a time during the skipped hour of a DST transition if the DST offset is negative

6.24.4

This patch gives Hypothesis itãàÑÔ own internal Random instance, ensuring that test suites which reset the global random state donãàÑÕ induce weird correlations between property-based tests.

6.24.3

This patch updates documentation of note()

Revision 1.34 / (download) - annotate - [select for diffs], Sun Sep 12 09:53:53 2021 UTC (2 years, 7 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3
Changes since 1.33: +7 -1 lines
Diff to previous 1.33 (colored)

py-hypothesis: updated to 6.21.0

6.21.0 - 2021-09-11

This release introduces strategies for array/tensor libraries adopting the Array API standard. They are available in the hypothesis.extra.array_api extra, and work much like the existing strategies for NumPy.

6.20.1 - 2021-09-10

This patch fixes issue 961, where calling given() inline on a bound method would fail to handle the self argument correctly.

6.20.0 - 2021-09-09

This release allows slices() to generate step=None, and fixes an off-by-one error where the start index could be equal to size. This works fine for all Python sequences and Numpy arrays, but is undefined behaviour in the Array API standard.

6.19.0 - 2021-09-08

This release makes stateful testing more likely to tell you if you do something unexpected and unsupported:

The return_value health check now applies to rule() and initialize() rules, if they donãàÑÕ have target bundles, as well as invariant().
Using a consumes() bundle as a target is deprecated, and will be an error in a future version.
If existing code triggers these new checks, check for related bugs and misunderstandings - these patterns never had any effect.

6.18.0 - 2021-09-06

This release teaches from_type() a neat trick: when resolving an typing.Annotated type, if one of the annotations is a strategy object we use that as the inferred strategy. For example:

PositiveInt = Annotated[int, st.integers(min_value=1)]
If there are multiple strategies, we use the last outer-most annotation. See issue 2978 and pull request 3082 for discussion.

Requires Python 3.9 or later for get_type_hints(..., include_extras=False).

6.17.4 - 2021-08-31

This patch makes unique arrays() much more efficient, especially when there are only a few valid elements - such as for eight-bit integers.

6.17.3 - 2021-08-30

This patch fixes the repr of array_shapes().

6.17.2 - 2021-08-30

This patch wraps some internal helper code in our proxies decorator to prevent mutations of method docstrings carrying over to other instances of the respective methods.

6.17.1 - 2021-08-29

This patch moves some internal helper code in preparation for issue 3065. There is no user-visible change, unless you depended on undocumented internals.

6.17.0 - 2021-08-27

This release adds type annotations to the stateful testing API.

Thanks to Ruben Opdebeeck for this contribution!

6.16.0 - 2021-08-27

This release adds the DrawFn type as a reusable type hint for the draw argument of @composite functions.

Thanks to Ruben Opdebeeck for this contribution!

6.15.0 - 2021-08-22

This release emits a more useful error message when @given() is applied to a coroutine function, i.e. one defined using async def.

This was previously only handled by the generic return_value health check, which doesnãàÑÕ direct you to use either a custom executor or a library such as pytest-trio or pytest-asyncio to handle it for you.

6.14.9 - 2021-08-20

This patch fixes a regression in Hypothesis 6.14.8, where from_type() failed to resolve types which inherit from multiple parametrised generic types, affecting the returns package.

6.14.8 - 2021-08-16

This patch ensures that registering a strategy for a subclass of a a parametrised generic type such as class Lines(Sequence[str]): will not ãà×Íeakãàinto unrelated strategies such as st.from_type(Sequence[int]). Unfortunately this fix requires PEP 560, meaning Python 3.7 or later.

6.14.7 - 2021-08-14

This patch fixes issue 3050, where attrs classes could cause an internal error in the ghostwriter.

6.14.6 - 2021-08-07

This patch improves the error message for issue 3016, where PEP 585 builtin generics with self-referential forward-reference strings cannot be resolved to a strategy by from_type().

6.14.5 - 2021-07-27

This patch fixes hypothesis.strategies._internal.types.is_a_new_type. It was failing on Python 3.10.0b4, where NewType is a function.

6.14.4 - 2021-07-26

This patch fixes from_type() and register_type_strategy() for typing.NewType on Python 3.10, which changed the underlying implementation (see bpo-44353 for details).

6.14.3 - 2021-07-18

This patch updates our autoformatting tools, improving our code style without any API changes.

6.14.2 - 2021-07-12

This patch ensures that we shorten tracebacks for tests which fail due to inconsistent data generation between runs (i.e. raise Flaky).

6.14.1 - 2021-07-02

This patch updates some internal type annotations. There is no user-visible change.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 17 13:13:31 2021 UTC (3 years, 1 month ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1
Changes since 1.32: +9 -0 lines
Diff to previous 1.32 (colored)

py-hypothesis: update to 6.8.1.

6.8.1 - 2021-03-14

This patch lays more groundwork for filter rewriting (issue #2701).
There is no user-visible changeãàyet.

6.8.0 - 2021-03-11

This release registers the remaining builtin types, and teaches
from_type() to try resolving ForwardRef and Type references to
built-in types.

6.7.0 - 2021-03-10

This release teaches RuleBasedStateMachine to avoid checking
invariant()s until all initialize() rules have been run. You can
enable checking of specific invariants for incompletely initialized
machines by using @invariant(check_during_init=True) (issue #2868).

In previous versions, it was possible if awkward to implement this
behaviour using precondition() and an auxiliary variable.

6.6.1 - 2021-03-09

This patch improves the error message when from_type() fails to
resolve a forward-reference inside a typing.Type such as Type["int"]
(issue #2565).

6.6.0 - 2021-03-07

This release makes it an explicit error to apply invariant() to a
rule() or initialize() rule in stateful testing. Such a combination
had unclear semantics, especially in combination with precondition(),
and was never meant to be allowed (issue #2681).

6.5.0 - 2021-03-07

This release adds the explain phase, in which Hypothesis attempts
to explain why your test failed by pointing to suspicious lines of
code (i.e. those which were always, and only, run on failing inputs).
We plan to include ×Èeneralisingãàfailing examples in this phase
in a future release (issue #2192).

6.4.3 - 2021-03-04

This patch fixes issue #2794, where nesting deferred() strategies
within recursive() strategies could trigger an internal assertion.
While it was always possible to get the same results from a more
sensible strategy, the convoluted form now works too.

6.4.2 - 2021-03-04

This patch fixes several problems with mypy when ãàÅÏo-implicit-reexport
was activated in user projects.

Thanks to Nikita Sobolev for fixing issue #2884!

6.4.1 - 2021-03-04

This patch fixes an exception that occurs when using type unions
of the typing_extensions Literal backport on Python 3.6.

Thanks to Ben Anhalt for identifying and fixing this bug.

6.4.0 - 2021-03-02

This release fixes stateful testing methods with multiple precondition()
decorators. Previously, only the outer-most precondition was checked
(issue #2681).

6.3.4 - 2021-02-28

This patch refactors some internals of RuleBasedStateMachine. There
is no change to the public API or behaviour.

6.3.3 - 2021-02-26

This patch moves some internal code, so that future work can avoid
creating import cycles. There is no user-visible change.

6.3.2 - 2021-02-25

This patch enables register_type_strategy() for subclasses of
typing.TypedDict. Previously, from_type() would ignore the registered
strategy (issue #2872).

Thanks to Ilya Lebedev for identifying and fixing this bug!

6.3.1 - 2021-02-24

This release lays the groundwork for automatic rewriting of simple
filters, for example converting integers().filter(lambda x: x > 9)
to integers(min_value=10).

Note that this is not supported yet, and we will continue to
recommend writing the efficient form directly wherever possible -
predicate rewriting is provided mainly for the benefit of downstream
libraries which would otherwise have to implement it for themselves
(e.g. pandera and icontract-hypothesis). See issue #2701 for details.

6.3.0 - 2021-02-20

The Hypothesis pytest plugin now requires pytest version 4.6 or
later. If the plugin detects an earlier version of pytest, it will
automatically deactivate itself.

(4.6.x is the earliest pytest branch that still accepts community
bugfixes.)

Hypothesis-based tests should continue to work in earlier versions
of pytest, but enhanced integrations provided by the plugin (such
as --hypothesis-show-statistics and other command-line flags) will
no longer be available in obsolete pytest versions.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jan 4 11:55:03 2021 UTC (3 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.31: +3 -0 lines
Diff to previous 1.31 (colored)

py-hypothesis: update to 5.46.0.

5.46.0 - 2021-01-04

This release upgrades from_type(), to infer strategies for
type-annotated arguments even if they have defaults when it otherwise
falls back to builds() (issue #2708).

5.45.0 - 2021-01-04

This release adds the hypothesis[codemods] extra, which you can
use to check for and automatically fix issues such as use of
deprecated Hypothesis APIs (issue #2705).

5.44.0 - 2021-01-03

This patch fixes from_type() with the typing_extensions Literal
backport on Python 3.6.

5.43.9 - 2021-01-02

This patch fixes issue #2722, where certain orderings of
register_type_strategy(), ForwardRef, and from_type() could trigger
an internal error.

5.43.8 - 2021-01-02

This patch makes some strategies for collections with a uniqueness
constraint much more efficient, including
dictionaries(keys=sampled_from(...), values=..) and
lists(tuples(sampled_from(...), ...), unique_by=lambda x: x[0]).
(related to issue #2036)

5.43.7 - 2021-01-02

This patch extends our faster special case for sampled_from()
elements in unique lists() to account for chains of .map(...) and
.filter(...) calls (issue #2036).

5.43.6 - 2021-01-02

This patch improves the type annotations on assume() and
@reproduce_failure().

5.43.5 - 2021-01-01

This patch updates our copyright headers to include 2021. Happy
new year!

5.43.4 - 2020-12-24

This change fixes a documentation error in the database setting.

The previous documentation suggested that callers could specify a
database path string, or the special string ":memory:", but this
setting has never actually allowed string arguments.

Permitted values are None, and instances of ExampleDatabase.

5.43.3 - 2020-12-11

This patch fixes issue #2696, an internal error triggered when the
@example decorator was used and the verbosity setting was quiet.

5.43.2 - 2020-12-10

This patch improves the error message from the data_frames() strategy
when both the rows and columns arguments are given, but there is
a missing entry in rows and the corresponding column has no fill
value (issue #2678).

5.43.1 - 2020-12-10

This patch improves the error message if builds() is passed an Enum
which cannot be called without arguments, to suggest using
sampled_from() (issue #2693).

5.43.0 - 2020-12-09

This release adds new timezones() and timezone_keys() strategies
(issue #2630) based on the new zoneinfo module in Python 3.9.

pip install hypothesis[zoneinfo] will ensure that you have the
appropriate backports installed if you need them.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Oct 6 10:52:29 2020 UTC (3 years, 6 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4
Changes since 1.30: +35 -7 lines
Diff to previous 1.30 (colored)

py-hypothesis: update to 5.37.0.

About a year of changes that are only available on a very detailed
level.

Biggest change: stop supporting Python 2.x

Detailed changes here:
https://hypothesis.readthedocs.io/en/latest/changes.html

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 20 07:06:42 2020 UTC (3 years, 9 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2
Changes since 1.29: +4 -1 lines
Diff to previous 1.29 (colored)

py-hypothesis: updated to 4.57.1

4.57.1:
This patch improves the type hints and documentation for the django extra. There is no runtime change.

4.57.0:
This release improves support for the SupportsOp protocols from the typing module when using on from_type() as outlined in issue 2292. The following types now generate much more varied strategies when called with from_type():

typing.SupportsAbs
typing.SupportsBytes
typing.SupportsComplex
typing.SupportsInt
typing.SupportsFloat
typing.SupportsRound
Note that using from_type() with one of the above strategies will not ensure that the the specified function will execute successfully (ie : the strategy returned for from_type(typing.SupportsAbs) may include NaNs or things which cause the abs() function to error. )

4.56.3:
This release fixes a small internal bug in shrinking which could have caused it to perform slightly more tests than were necessary. Fixing this shouldnãàÑÕ have much effect but it will make shrinking slightly faster.

4.56.2:
This release removes an internal heuristic that was no longer providing much benefit. It is unlikely that there will be any user visible effect.

4.56.1:
This release further improves the optimisation algorithm for targeted property-based testing.

4.56.0:
This release enables deprecation warnings even when the verbosity setting is quiet, in preparation for Hypothesis 5.0.

Warnings can still be filtered by the standard mechanisms provided in the standard-library warnings module.

4.55.4:
This release improves HypothesisãàÑÔ management of the set of test cases it tracks between runs. It will only do anything if you have Phase.target enabled and an example database set. In those circumstances it should result in a more thorough and faster set of examples that are tried on each run.

4.55.3:
This release makes Hypothesis better at generating test cases where generated values are duplicated in different parts of the test case. This will be especially noticeable with reasonably complex values, as it was already able to do this for simpler ones such as integers or floats.

4.55.2:
This release expands the set of test cases that Hypothesis saves in its database for future runs to include a representative set of ãà×Ôtructurally differentãàtest cases - e.g. it might try to save test cases where a given list is empty or not.

Currently this is unlikely to have much user visible impact except to produce slightly more consistent behaviour between consecutive runs of a test suite. It is mostly groundwork for future improvements which will exploit this functionality more effectively.

4.55.1:
This patch fixes issue 2257, where from_type() could incorrectly generate bytestrings when passed a generic typing.Sequence such as Sequence[set].

4.55.0:
This release adds database support for targeted property-based testing, so the best examples based on the targeting will be saved and reused between runs. This is mostly laying groundwork for future features in this area, but will also make targeted property-based tests more useful during development, where the same tests tend to get run over and over again.

If max_examples is large, this may increase memory usage significantly under some circumstances, but these should be relatively rare.

This release also adds a dependency on the sortedcontainers package.

4.54.2:
This release improves the optimisation algorithm for targeted property-based testing, so that it will find higher quality results more reliably. Specifically, in cases where it would previously have got near a local optimum, it will now tend to achieve the locally optimal value.

4.54.1:
This release is mostly internal changes in support of better testing of the core engine. You are unlikely to see much effect, although some internal heuristics have changed slightly.

4.54.0:
This release adds a dedicated phase for targeted property-based testing, and (somewhat) improves the targeting algorithm so that it will find higher quality results more reliably. This comes at a cost of making it more likely to get stuck in a local optimum.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Dec 15 11:28:53 2019 UTC (4 years, 4 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4
Changes since 1.28: +58 -55 lines
Diff to previous 1.28 (colored)

py-hypothesis: updated to 4.53.3

4.53.3:
This patch fixes :func:`~hypothesis.strategies.from_type` with :class:`python:typing.Hashable` and :class:`python:typing.Sized`, which previously failed with an internal error on Python 3.7 or later.

4.53.2:
This release reorganises a number of the Hypothesis internal modules into a package structure. If you are only depending on the public API it should have no effect. If you are depending on the internal API (which you shouldn't be, and which we don't guarantee compatibility on) you may have to rename some imports.

4.53.1:
This release changes the size distribution of the number of steps run in stateful testing: It will now almost always run the maximum number of steps permitted.

4.53.0:
:ref:`statistics` now include the best score seen for each label, which can help avoid the threshold problem when the minimal example shrinks right down to the threshold of failure (:issue:`2180`).

4.52.0:
This release changes the stateful_step_count setting to raise an error if set to 0. This is a backwards compatible change because a value of 0 would never have worked and attempting to run it would have resulted in an internal assertion error.

4.51.1:
This release makes a small internal change to the distribution of test cases. It is unlikely to have much user visible impact.

4.51.0:
This release deprecates use of :func:`@example <hypothesis.example>`, :func:`@seed <hypothesis.seed>`, or :func:`@reproduce_failure <hypothesis.reproduce_failure>` without :func:`@given <hypothesis.given>`.

4.50.8:
This patch makes certain uses of Bundles more efficient in stateful testing (:issue:`2078`).

4.50.7:
This release refactors some of Hypothesis's internal interfaces for representing data generation. It should have no user visible effect.

4.50.6:
This patch removes some old debugging helpers in our Numpy extra which have not been needed since :issue:`1963` and :issue:`2245`.

4.50.5:
This patch fixes :issue:`2229`, where Numpy arrays of unsized strings would only ever have strings of size one due to an interaction between our generation logic and Numpy's allocation strategy.

4.50.4:
This patch fixes a rare internal error in strategies for a list of unique items sampled from a short non-unique sequence (:issue:`2247`). The bug was discovered via :pypi:`hypothesis-jsonschema`.

4.50.3:
This release improves the error message when :func:`@settings <hypothesis.settings>` tries to inherit settings from a parent argument that isn't a settings instance.

4.50.2:
This release improves Hypothesis's "Falsifying example" output, by breaking output across multiple lines where necessary, and by removing irrelevant information from the stateful testing output.

4.50.1:
This patch adds :pypi:`flake8-comprehensions` to our linter suite. There is no user-visible change - expect perhaps via some strange microbenchmarks - but certain parts of the code now have a clear and more consistent style.

4.50.0:
This release fixes some cases where we might previously have failed to run the validation logic for some strategies. As a result tests which would previously have been silently testing significantly less than they should may now start to raise InvalidArgument now that these errors are caught.

4.49.0:
This release significantly improves the data distribution in :doc:`rule based stateful testing <stateful>`, by using a technique called Swarm Testing (Groce, Alex, et al. "Swarm testing." Proceedings of the 2012 International Symposium on Software Testing and Analysis. ACM, 2012.) to select which rules are run in any given test case. This should allow it to find many issues that it would previously have missed.

This change is likely to be especially beneficial for stateful tests with large numbers of rules.

4.48.1:
This release adds some heuristics to test case generation that try to ensure that test cases generated early on will be relatively small.

This fixes a bug introduced in :ref:`Hypothesis 4.42.0 <v4.42.0>` which would cause occasional :obj:`~hypothesis.HealthCheck.too_slow` failures on some tests.

4.48.0:
This release revokes the deprecation of find, as we've now rebuilt it on top of @given, which means it has minimal maintenance burden and we're happy to support it.

4.47.5:
This release rebuilds find() on top of @given in order to have more code in common. It should have minimal user visible effect.

4.47.4:
This patch removes an internal compatibility shim that we no longer need.

4.47.3:
This patch fixes several typos in our docstrings and comments, with no change in behaviour.

4.47.2:
This release fixes an internal issue where Hypothesis would sometimes generate test cases that were above its intended maximum size. This would only have happened rarely and probably would not have caused major problems when it did.

Users of the new :ref:`targeted property-based testing <targeted-search>` might see minor impact (possibly slightly faster tests and slightly worse target scores), but only in the unlikely event that they were hitting this problem. Other users should not see any effect at all.

4.47.1:
This release removes some unused code from the core engine. There is no user-visible change.

4.47.0:
This release commonizes some code between running explicit examples and normal test execution. The main user visible impact of this is that deadlines are now enforced when running explicit examples.

4.46.1:
This patch ensures that a KeyboardInterrupt received during example generation is not treated as a mystery test failure but instead propagates to the top level, not recording the interrupted generation in the conjecture data tree.

4.46.0:
This release changes the behaviour of :func:`~hypothesis.strategies.floats` when excluding signed zeros - floats(max_value=0.0, exclude_max=True) can no longer generate -0.0 nor the much rarer floats(min_value=-0.0, exclude_min=True) generate +0.0.

The correct interaction between signed zeros and exclusive endpoints was unclear; we now enforce the invariant that :func:`~hypothesis.strategies.floats` will never generate a value equal to an excluded endpoint (:issue:`2201`).

If you prefer the old behaviour, you can pass floats(max_value=-0.0) or floats(min_value=0.0) which is exactly equivalent and has not changed. If you had two endpoints equal to zero, we recommend clarifying your tests by using :func:`~hypothesis.strategies.just` or :func:`~hypothesis.strategies.sampled_from` instead of :func:`~hypothesis.strategies.floats`.

4.45.1:
This patch improves the error message when invalid arguments are passed to :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.invariant` (:issue:`2149`).

4.45.0:
This release supports :obj:`python:typing.Final` and :obj:`python:typing.TypedDict` in :func:`~hypothesis.strategies.from_type`.

4.44.5:
This patch disables our :pypi:`pytest` plugin when running on versions of :pypi:`pytest` before 4.3, the oldest our plugin supports. Note that at time of writing the Pytest developers only support 4.6 and later!

Hypothesis tests using :func:`@given() <hypothesis.given>` work on any test runner, but our integrations to e.g. avoid example database collisions when combined with @pytest.mark.parametrize eventually drop support for obsolete versions.

4.44.4:
This patch adds some internal comments and clarifications to the Hypothesis implementation. There is no user-visible change.

4.44.3:
This patch avoids importing test runners such as :pypi:`pytest`, :pypi:`unittest2`, or :pypi:`nose` solely to access their special "skip test" exception types - if the module is not in :obj:`sys.modules`, the exception can't be raised anyway.

This fixes a problem where importing an otherwise unused module could cause spurious errors due to import-time side effects (and possibly -Werror).

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 13 21:08:30 2019 UTC (4 years, 5 months ago) by adam
Branch: MAIN
Changes since 1.27: +4 -1 lines
Diff to previous 1.27 (colored)

py-hypothesis: updated to 4.44.2

4.44.2:
This release fixes :func:`@given <hypothesis.given>` to only complain about missing keyword-only arguments if the associated test function is actually called.

This matches the behaviour of other InvalidArgument errors produced by @given.

4.44.1:
This patch allows Hypothesis to run in environments that do not specify a __file__, such as a :mod:`python:zipapp` (:issue:`2196`).

4.44.0:
This release adds a gufunc argument to :func:`~hypothesis.extra.numpy.mutually_broadcastable_shapes` (:issue:`2174`), which allows us to generate shapes which are valid for functions like :obj:`numpy:numpy.matmul` that require shapes which are not simply broadcastable.

4.43.9:
This patch fixes :issue:`2108`, where the first test using :func:`~hypothesis.strategies.data` to draw from :func:`~hypothesis.strategies.characters` or :func:`~hypothesis.strategies.text` would be flaky due to unreliable test timings.

Time taken by lazy instantiation of strategies is now counted towards drawing from the strategy, rather than towards the deadline for the test function.

4.43.8:
This release ensures that the strategies passed to :func:`@given <hypothesis.given>` are properly validated when applied to a test method inside a test class.

This should result in clearer error messages when some of those strategies are invalid.

4.43.7:
This release changes how Hypothesis manages its search space in cases where it generates redundant data. This should cause it to generate significantly fewer duplicated examples (especially with short integer ranges), and may cause it to produce more useful examples in some cases (especially ones where there is a significant amount of filtering).

4.43.6:
This patch refactors width handling in :func:`~hypothesis.strategies.floats`; you may notice small performance improvements but the main purpose is to enable work on :issue:`1704` (improving shrinking of bounded floats).

4.43.5:
This patch removes an unused internal flag. There is no user-visible change.

4.43.4:
This patch corrects the exception type and error message you get if you attempt to use :func:`~hypothesis.strategies.data` to draw from something which is not a strategy. This never worked, but the error is more helpful now.

4.43.3:
We've adopted :pypi:`flake8-bugbear` to check for a few more style issues, and this patch implements the minor internal cleanups it suggested. There is no user-visible change.

4.43.2:
This patch fixes the formatting of some documentation, but there is no change to any executed code.

4.43.1:
Python 3.8's new :obj:`python:typing.Literal` type - see PEP 586 for details - is now supported in :func:`~hypothesis.strategies.from_type`.

4.43.0:
This release adds the strategy :func:`~hypothesis.extra.numpy.mutually_broadcastable_shapes`, which generates multiple array shapes that are mutually broadcast-compatible with an optional user-specified base-shape.

This is a generalisation of :func:`~hypothesis.extra.numpy.broadcastable_shapes`. It relies heavily on non-public internals for performance when generating and shrinking examples. We intend to support generating shapes matching a ufunc signature in a future version (:issue:`2174`).

4.42.10:
This release fixes :func:`~hypothesis.strategies.from_type` when used with bounded or constrained :obj:`python:typing.TypeVar` objects (:issue:`2094`).
Previously, distinct typevars with the same constraints would be treated as all single typevar, and in cases where a typevar bound was resolved to a union of subclasses this could result in mixed types being generated for that typevar.

4.42.9:
This patch ensures that the default value :func:`~hypothesis.extra.numpy.broadcastable_shapes` chooses for max_dims is always valid (at most 32), even if you pass min_dims=32.

4.42.8:
This patch ensures that we only add profile information to the pytest header if running either pytest or Hypothesis in verbose mode, matching the builtin cache plugin (:issue:`2155`).

4.42.7:
This patch makes stateful step printing expand the result of a step into multiple variables when you return :func:`~hypothesis.stateful.multiple` (:issue:`2139`).

4.42.6:
This release fixes a bug (:issue:`2166`) where a Unicode character info cache file was generated but never used on subsequent test runs, causing tests to run more slowly than they should have.

4.42.5:
This patch corrects some internal documentation. There is no user-visible change.

4.42.4:
This release fixes a bug (:issue:`2160`) where decorators applied after :func:`@settings <hypothesis.settings>` and before :func:`@given <hypothesis.given>` were ignored.

4.42.3:
This release updates Hypothesis's formatting to the new version of :pypi:`black`, and has absolutely no user visible effect.

4.42.2:
This release fixes a bug in :func:`~hypothesis.strategies.recursive` which would have meant that in practice max_leaves was treated as if it was lower than it actually is - specifically it would be capped at the largest power of two smaller than it. It is now handled correctly.

4.42.1:
Python 3.8's new :class:`python:typing.SupportsIndex` type - see PEP 357 for details - is now supported in :func:`~hypothesis.strategies.from_type`.

4.42.0:
This release significantly simplifies Hypothesis's internal logic for data generation, by removing a number of heuristics of questionable or unproven value.

The results of this change will vary significantly from test to test. Most test suites will see significantly faster data generation and lower memory usage. The "quality" of the generated data may go up or down depending on your particular test suites.

If you see any significant regressions in Hypothesis's ability to find bugs in your code as a result of this release, please file an issue to let us know.

Users of the new :ref:`targeted property-based testing <targeted-search>` functionality are reasonably likely to see improvements in data generation, as this release changes the search algorithm for targeted property based testing to one that is more likely to be productive than the existing approach.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Aug 22 11:05:27 2019 UTC (4 years, 7 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3
Changes since 1.26: +5 -1 lines
Diff to previous 1.26 (colored)

py-hypothesis: updated to 4.33.1

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.

4.33.0:
This release improves the :func:~hypothesis.provisional.domains
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.

4.32.3:
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.

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

4.32.1:
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.

4.32.0:
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).

4.31.1:
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.

4.31.0:
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.

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

4.28.1:
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.

4.28.0:
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.

4.27.0:
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.

4.26.4:
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.

4.26.3:
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.

4.26.2:
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 slower.
They will now stop after a more reasonable number of runs without hitting this problem.

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.

4.26.1:
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 <http://www.pythonlikeyoumeanit.com/Module3_IntroducingNumpy/AdvancedIndexing.html#Integer-Array-Indexing>_
to select an array of a specified shape.

4.26.0:
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.

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

4.25.0:
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.

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

4.24.5:
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!

4.24.4:
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 <https://python3statement.org>__
and already has several features that are only available on Python 3.

4.24.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.

Revision 1.26 / (download) - annotate - [select for diffs], Thu May 9 11:53:58 2019 UTC (4 years, 11 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

py-hypothesis: updated to 4.23.4

4.23.4:
Fixes a minor formatting issue the docstring of from_type()

4.23.3:
Adds a recipe to the docstring of from_type() that describes a means for drawing values for ãà×Æverything exceptãàa specified type. This recipe is especially useful for writing tests that perform input-type validation.

4.23.2:
This patch uses autoflake to remove some pointless pass statements, which improves our workflow but has no user-visible impact.

4.23.1:
This patch fixes an OverflowError in from_type(xrange) on Python 2.

It turns out that not only do the start and stop values have to fit in a C long, but so does stop - start. We now handle this even on 32bit platforms, but remind users that Python2 will not be supported after 2019 without specific funding.

4.23.0:
This release implements the slices() strategy, to generate slices of a length-size sequence.

4.22.3:
This patch exposes DataObject, solely to support more precise type hints. Objects of this type are provided by data(), and can be used to draw examples from strategies intermixed with your test code.

4.22.2:
This patch fixes the very rare issue 1798 in array_dtypes(), which caused an internal error in our tests.

4.22.1:
This patch fixes a rare bug in from_type(range).

4.22.0:
The unique_by argument to lists now accepts a tuple of callables such that every element of the generated list will be unique with respect to each callable in the tuple.

4.21.1:
This patch cleans up the internals of one_of(). You may see a slight change to the distribution of examples from this strategy but there is no change to the public API.

4.21.0:
The from_type() strategy now supports slice objects.

4.20.0:
This release improves the array_shapes() strategy, to choose an appropriate default for max_side based on the min_side, and max_dims based on the min_dims. An explicit error is raised for dimensions greater than 32, which are not supported by Numpy, as for other invalid combinations of arguments.

4.19.0:
The from_type() strategy now supports range objects (or xrange on Python 2).

4.18.3:
This release fixes a very rare edge case in the test-case mutator, which could cause an internal error with certain unusual tests.

4.18.2:
This patch makes Hypothesis compatible with the Python 3.8 alpha, which changed the representation of code objects to support positional-only arguments. Note however that Hypothesis does not (yet) support such functions as e.g. arguments to builds() or inputs to @given.

4.18.1:
This patch improves the performance of unique collections such as sets() when the elements are drawn from a sampled_from() strategy.

4.18.0:
This release adds the functions() strategy, which can be used to imitate your ãàÏÓealãàfunction for callbacks.

4.17.2:
This release refactors stateful rule selection to share the new machinery with sampled_from() instead of using the original independent implementation.

4.17.1:
This patch allows Hypothesis to try a few more examples after finding the first bug, in hopes of reporting multiple distinct bugs. The heuristics described in issue 847 ensure that we avoid wasting time on fruitless searches, while still surfacing each bug as soon as possible.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 2 14:22:10 2019 UTC (5 years, 1 month ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Changes since 1.24: +4 -1 lines
Diff to previous 1.24 (colored)

py-hypothesis: updated to 4.7.17

4.7.17:
This release makes some micro-optimisations within Hypothesis's internal representation of test cases. This should cause heavily nested test cases to allocate less during generation and shrinking, which should speed things up slightly.

4.7.16:
This changes the order in which Hypothesis runs certain operations during shrinking. This should significantly decrease memory usage and speed up shrinking of large examples.

4.7.15:
This release allows Hypothesis to calculate a number of attributes of generated test cases lazily. This should significantly reduce memory usage and modestly improve performance, especially for large test cases.

4.7.14:
This release reduces the number of operations the shrinker will try when reordering parts of a test case. This should in some circumstances significantly speed up shrinking. It may result in different final test cases, and if so usually slightly worse ones, but it should not generally have much impact on the end result as the operations removed were typically useless.

4.7.13:
This release changes how Hypothesis reorders examples within a test case during shrinking. This should make shrinking considerably faster.

4.7.12:
This release slightly improves the shrinker's ability to replace parts of a test case with their minimal version, by allowing it to do so in bulk rather than one at a time. Where this is effective, shrinker performance should be modestly improved.

4.7.11:
This release makes some micro-optimisations to common operations performed during shrinking. Shrinking should now be slightly faster, especially for large examples with relatively fast test functions.

4.7.10:
This release is a purely internal refactoring of Hypothesis's API for representing test cases. There should be no user visible effect.

4.7.9:
This release changes certain shrink passes to make them more efficient when they aren't making progress.

4.7.8:
This patch removes some unused code, which makes the internals a bit easier to understand. There is no user-visible impact.

4.7.7:
This release reduces the number of operations the shrinker will try when reordering parts of a test case. This should in some circumstances significantly speed up shrinking. It may result in different final test cases, and if so usually slightly worse ones, but it should not generally have much impact on the end result as the operations removed were typically useless.

4.7.6:
This patch removes some unused code from the shrinker. There is no user-visible change.

4.7.5:
This release changes certain shrink passes to make them adaptive - that is, in cases where they are successfully making progress they may now do so significantly faster.

4.7.4:
This is a docs-only patch, noting that because the :pypi:lark-parser is under active development at version 0.x, hypothesis[lark] APIs may break in minor releases if necessary to keep up with the upstream package.

4.7.3:
This changes Hypothesis to no longer import various test frameworks by default (if they are installed). which will speed up the initial import hypothesis call.

4.7.2:
This release changes Hypothesis's internal representation of a test case to calculate some expensive structural information on demand rather than eagerly. This should reduce memory usage a fair bit, and may make generation somewhat faster.

4.7.1:
This release refactors the internal representation of previously run test cases. The main thing you should see as a result is that Hypothesis becomes somewhat less memory hungry.

4.7.0:
This patch allows :func:~hypothesis.extra.numpy.array_shapes to generate shapes with side-length or even dimension zero, though the minimum still defaults to one. These shapes are rare and have some odd behavior, but are particularly important to test for just that reason!

In a related bigfix, :func:~hypothesis.extra.numpy.arrays now supports generating zero-dimensional arrays with dtype=object and a strategy for iterable elements. Previously, the array element would incorrectly be set to the first item in the generated iterable.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Feb 16 23:36:02 2019 UTC (5 years, 1 month ago) by adam
Branch: MAIN
Changes since 1.23: +1 -4 lines
Diff to previous 1.23 (colored)

py-hypothesis: updated to 4.5.11

4.5.11:
This release fixes :issue:1813, a bug introduced in :ref:3.59.1 <v3.59.1>, which caused :py:meth:~hypothesis.strategies.random_module to no longer affect the body of the test: Although Hypothesis would claim to be seeding the random module in fact tests would always run with a seed of zero.

4.5.10:
This patch fixes an off-by-one error in the maximum length of :func:~hypothesis.strategies.emails. Thanks to Krzysztof Jurewicz for :pull:1812.

4.5.9:
This patch removes some unused code from the shrinker. There is no user-visible change.

4.5.8:
This release fixes an internal IndexError in Hypothesis that could sometimes be triggered during shrinking.

4.5.7:
This release modifies the shrinker to interleave different types of reduction operations, e.g. switching between deleting data and lowering scalar values rather than trying entirely deletions then entirely lowering.

This may slow things down somewhat in the typical case, but has the major advantage that many previously difficult to shrink examples should become much faster, because the shrinker will no longer tend to stall when trying some ineffective changes to the shrink target but will instead interleave it with other more effective operations.

4.5.6:
This release makes a number of internal changes to the implementation of :func:hypothesis.extra.lark.from_lark. These are primarily intended as a refactoring, but you may see some minor improvements to performance when generating large strings, and possibly to shrink quality.

4.5.5:
This patch prints an explanatory note when :issue:1798 is triggered, because the error message from Numpy is too terse to locate the problem.

4.5.4:
In Python 2, long integers are not allowed in the shape argument to :func:~hypothesis.extra.numpy.arrays. Thanks to Ryan Turner for fixing this.

4.5.3:
This release makes a small internal refactoring to clarify how Hypothesis instructs tests to stop running when appropriate. There is no user-visible change.

4.5.2:
This release standardises all of the shrinker's internal operations on running in a random order.

The main effect you will see from this that it should now be much less common for the shrinker to stall for a long time before making further progress. In some cases this will correspond to shrinking more slowly, but on average it should result in faster shrinking.

4.5.1:
This patch updates some docstrings, but has no runtime changes.

4.5.0:
This release adds exclude_min and exclude_max arguments to :func:~hypothesis.strategies.floats, so that you can easily generate values from open or half-open intervals

Revision 1.23 / (download) - annotate - [select for diffs], Fri Feb 1 11:50:30 2019 UTC (5 years, 2 months ago) by adam
Branch: MAIN
Changes since 1.22: +16 -13 lines
Diff to previous 1.22 (colored)

py-hypothesis: updated to 4.4.3

4.4.3:
This release fixes an open file leak that used to cause ResourceWarnings.

4.4.2:
This release changes Hypothesis's internal approach to caching the results of executing test cases. The result should be that it is now significantly less memory hungry, especially when shrinking large test cases.

Some tests may get slower or faster depending on whether the new or old caching strategy was well suited to them, but any change in speed in either direction should be minor.

4.4.1:
This patch tightens up some of our internal heuristics to deal with shrinking floating point numbers, which will now run in fewer circumstances.

You are fairly unlikely to see much difference from this, but if you do you are likely to see shrinking become slightly faster and/or producing slightly worse results.

4.4.0:
This release adds the :func:~hypothesis.extra.django.from_form function, which allows automatic testing against Django forms. (:issue:35)

4.3.0:
This release deprecates HealthCheck.hung_test and disables the associated runtime check for tests that ran for more than five minutes. Such a check is redundant now that we enforce the deadline and max_examples setting, which can be adjusted independently.

4.2.0:
This release adds a new module, hypothesis.extra.lark, which you can use to generate strings matching a context-free grammar.

In this initial version, only :pypi:lark-parser EBNF grammars are supported, by the new :func:hypothesis.extra.lark.from_lark function.

4.1.2:
This patch fixes a very rare overflow bug (:issue:1748) which could raise an InvalidArgument error in :func:~hypothesis.strategies.complex_numbers even though the arguments were valid.

4.1.1:
This release makes some improvements to internal code organisation and documentation and has no impact on behaviour.

4.1.0:
This release adds :func:~hypothesis.register_random, which registers random.Random instances or compatible objects to be seeded and reset by Hypothesis to ensure that test cases are deterministic.

We still recommend explicitly passing a random.Random instance from :func:~hypothesis.strategies.randoms if possible, but registering a framework-global state for Hypothesis to manage is better than flaky tests!

4.0.2:
This patch fixes :issue:1387, where bounded :func:~hypothesis.strategies.integers with a very large range would almost always generate very large numbers. Now, we usually use the same tuned distribution as unbounded :func:~hypothesis.strategies.integers.

4.0.1:
This release randomizes the order in which the shrinker tries some of its initial normalization operations. You are unlikely to see much difference as a result unless your generated examples are very large. In this case you may see some performance improvements in shrinking.

4.0.0:
Welcome to the next major version of Hypothesis!

There are no new features here, as we release those in minor versions. Instead, 4.0 is a chance for us to remove deprecated features (many already converted into no-ops), and turn a variety of warnings into errors.

If you were running on the last version of Hypothesis 3.x without any Hypothesis deprecation warnings (or using private APIs), this will be a very boring upgrade. In fact, nothing will change for you at all. Per :ref:our deprecation policy <deprecation-policy>, warnings added in the last six months (after 2018-07-05) have not been converted to errors.

Removals
hypothesis.extra.datetime has been removed, replaced by the core date and time strategies.
hypothesis.extra.fakefactory has been removed, replaced by general expansion of Hypothesis' strategies and the third-party ecosystem.
The SQLite example database backend has been removed.

Settings
The :obj:~hypothesis.settings.deadline is now enforced by default, rather than just emitting a warning when the default (200 milliseconds per test case) deadline is exceeded.
The database_file setting has been removed; use :obj:~hypothesis.settings.database.
The perform_health_check setting has been removed; use :obj:~hypothesis.settings.suppress_health_check.
The max_shrinks setting has been removed; use :obj:~hypothesis.settings.phases to disable shrinking.
The min_satisfying_examples, max_iterations, strict, timeout, and use_coverage settings have been removed without user-configurable replacements.

Strategies
The elements argument is now required for collection strategies.
The average_size argument was a no-op and has been removed.
Date and time strategies now only accept min_value and max_value for bounds.
:func:~hypothesis.strategies.builds now requires that the thing to build is passed as the first positional argument.
Alphabet validation for :func:~hypothesis.strategies.text raises errors, not warnings, as does category validation for :func:~hypothesis.strategies.characters.
The choices() strategy has been removed. Instead, you can use :func:~hypothesis.strategies.data with :func:~hypothesis.strategies.sampled_from, so choice(elements) becomes data.draw(sampled_from(elements)).
The streaming() strategy has been removed. Instead, you can use :func:~hypothesis.strategies.data and replace iterating over the stream with data.draw() calls.
:func:~hypothesis.strategies.sampled_from and :func:~hypothesis.strategies.permutations raise errors instead of warnings if passed a collection that is not a sequence.

Miscellaneous
Applying :func:@given <hypothesis.given> to a test function multiple times was really inefficient, and now it's also an error.
Using the .example() method of a strategy (intended for interactive exploration) within another strategy or a test function always weakened data generation and broke shrinking, and now it's an error too.
The HYPOTHESIS_DATABASE_FILE environment variable is no longer supported, as the database_file setting has been removed.
The HYPOTHESIS_VERBOSITY_LEVEL environment variable is no longer supported. You can use the --hypothesis-verbosity pytest argument instead, or write your own setup code using the settings profile system to replace it.
Using :func:@seed <hypothesis.seed> or :obj:derandomize=True <hypothesis.settings.derandomize> now forces :obj:database=None <hypothesis.settings.database> to ensure results are in fact reproducible. If :obj:~hypothesis.settings.database is not None, doing so also emits a HypothesisWarning.
Unused exception types have been removed from hypothesis.errors; namely AbnormalExit, BadData, BadTemplateDraw, DefinitelyNoSuchExample, Timeout, and WrongFormat.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jan 7 08:31:28 2019 UTC (5 years, 3 months ago) by adam
Branch: MAIN
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

py-hypothesis: updated to 3.86.5

3.86.5:
This is a docs-only patch, which fixes some typos and removes a few hyperlinks for deprecated features.

3.86.4:
This release changes the order in which the shrinker tries to delete data. For large and slow tests this may significantly improve the performance of shrinking.

3.86.3:
This release fixes a bug where certain places Hypothesis internal errors could be raised during shrinking when a user exception occurred that suppressed an exception Hypothesis uses internally in its generation.

The two known ways to trigger this problem were:

Errors raised in stateful testsãàteardown function.
Errors raised in finally blocks that wrapped a call to data.draw.
These cases will now be handled correctly.

3.86.2:
This patch is a docs-only change to fix a broken hyperlink.

3.86.1:
This patch fixes issue 1732, where integers() would always return long values on Python 2.

3.86.0:
This release ensures that infinite numbers are never generated by floats() with allow_infinity=False, which could previously happen in some cases where one bound was also provided.

The trivially inconsistent min_value=inf, allow_infinity=False now raises an InvalidArgumentError, as does the inverse with max_value. You can still use just(inf) to generate inf without violating other constraints.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Oct 3 09:56:52 2018 UTC (5 years, 6 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.20: +4 -1 lines
Diff to previous 1.20 (colored)

py-hypothesis: updated to 3.74.0

3.74.0:
This release checks that the value of the :attr:~hypothesis.settings.print_blob setting is a :class:~hypothesis.PrintSettings instance.

Being able to specify a boolean value was not intended, and is now deprecated. In addition, specifying True will now cause the blob to always be printed, instead of causing it to be suppressed.

Specifying any value that is not a :class:~hypothesis.PrintSettings or a boolean is now an error.

3.73.5:
Changes the documentation for hypothesis.strategies.datetimes, hypothesis.strategies.dates, hypothesis.strategies.times to use the new parameter names min_value and max_value instead of the deprecated names

3.73.4:
This patch ensures that Hypothesis deprecation warnings display the code that emitted them when you're not running in -Werror mode (:issue:652).

3.73.3:
Tracebacks involving :func:@composite <hypothesis.strategies.composite> are now slightly shorter due to some internal refactoring.

3.73.2:
This patch fixes errors in the internal comments for one of the shrinker passes. There is no user-visible change.

3.73.1:
This patch substantially improves the distribution of data generated with :func:~hypothesis.strategies.recursive, and fixes a rare internal error (:issue:1502).

3.73.0:
This release adds the :func:~hypothesis.extra.dpcontracts.fulfill function, which is designed for testing code that uses :pypi:dpcontracts 0.4 or later for input validation. This provides some syntactic sugar around use of :func:~hypothesis.assume, to automatically filter out and retry calls that cause a precondition check to fail (:issue:1474).

3.72.0:
This release makes setting attributes of the :class:hypothesis.settings class an explicit error. This has never had any effect, but could mislead users who confused it with the current settings instance hypothesis.settings.default (which is also immutable). You can change the global settings with :ref:settings profiles <settings_profiles>.

3.71.11:
This patch factors out some common code in the shrinker for iterating over pairs of data blocks. There should be no user-visible change.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Aug 17 07:15:22 2018 UTC (5 years, 8 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3
Changes since 1.19: +22 -4 lines
Diff to previous 1.19 (colored)

py-hypothesis: updated to 3.68.0

3.68.0:
:func:~hypothesis.extra.numpy.arrays now checks that integer and float values drawn from elements and fill strategies can be safely cast to the dtype of the array, and emits a warning otherwise.

Elements in the resulting array could previously violate constraints on the elements strategy due to floating-point overflow or truncation of integers to fit smaller types.

3.67.1:
This release contains a tiny refactoring of the internals. There is no user-visible change.

3.67.0:
This release adds a width argument to :func:~hypothesis.strategies.floats, to generate lower-precision floating point numbers for e.g. Numpy arrays.

The generated examples are always instances of Python's native float type, which is 64bit, but passing width=32 will ensure that all values can be exactly represented as 32bit floats. This can be useful to avoid overflow (to +/- infinity), and for efficiency of generation and shrinking.

Half-precision floats (width=16) are also supported, but require Numpy if you are running Python 3.5 or earlier.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jul 3 07:47:45 2018 UTC (5 years, 9 months ago) by adam
Branch: MAIN
Changes since 1.18: +8 -1 lines
Diff to previous 1.18 (colored)

py-hypothesis: updated to 3.65.0

3.65.0:
This release deprecates the :obj:~hypothesis.settings.max_shrinks setting in favor of an internal heuristic. If you need to avoid shrinking examples, use the :obj:~hypothesis.settings.phases setting instead. (:issue:1235)

3.64.2:
This release fixes a bug where an internal assertion error could sometimes be triggered while shrinking a failing test.

3.64.1:
This patch fixes type-checking errors in our vendored pretty-printer, which were ignored by our mypy config but visible for anyone else (whoops). Thanks to Pi Delport for reporting :issue:1359 so promptly.

3.64.0:
This release adds :ref:an interface <custom-function-execution> which can be used to insert a wrapper between the original test function and :func:@given <hypothesis.given> (:issue:1257). This will be particularly useful for test runner extensions such as :pypi:pytest-trio, but is not recommended for direct use by other users of Hypothesis.

3.63.0:
This release adds a new mechanism to infer strategies for classes defined using :pypi:attrs, based on the the type, converter, or validator of each attribute. This inference is now built in to :func:~hypothesis.strategies.builds and :func:~hypothesis.strategies.from_type.

On Python 2, :func:~hypothesis.strategies.from_type no longer generates instances of int when passed long, or vice-versa.

3.62.0:
This release adds PEP 484 type hints to Hypothesis on a provisional basis, using the comment-based syntax for Python 2 compatibility. You can :ref:read more about our type hints here <our-type-hints>.

It also adds the py.typed marker specified in PEP 561. After you pip install hypothesis, :pypi:mypy 0.590 or later will therefore type-check your use of our public interface!

3.61.0:
This release deprecates the use of :class:~hypothesis.settings as a context manager, the use of which is somewhat ambiguous.
Users should define settings with global state or with the :func:@settings(...) <hypothesis.settings> decorator.

3.60.1:
Fixed a bug in generating an instance of a Django model from a strategy where the primary key is generated as part of the strategy. See :ref:details here <django-generating-primary-key>.

3.60.0:
This release add initialize decorator for stateful testing (originally discussed in :issue:1216). initialize act as a special rule that is only called once, and all initialize rules are guaranteed to be called before any normal rule is called.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jun 16 12:09:13 2018 UTC (5 years, 10 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

py-hypothesis: updated to 3.59.0

3.59.0:
This release adds the :func:~hypothesis.strategies.emails strategy, which generates unicode strings representing an email address.

3.58.1:
This improves the shrinker. It can now reorder examples: 3 1 2 becomes 1 2 3.

3.58.0:
This adds a new extra :py:func:~hypothesis.extra.dateutil.timezones strategy that generates dateutil timezones.
Depends on :pypi:python-dateutil.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Apr 5 12:43:27 2018 UTC (6 years ago) by adam
Branch: MAIN
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (colored)

py-hypothesis: updated to 3.55.0

3.55.0:
This release includes several improvements to the handling of the :obj:~hypothesis.settings.database setting.

The :obj:~hypothesis.settings.database_file setting was a historical artefact, and you should just use :obj:~hypothesis.settings.database directly.
The :envvar:HYPOTHESIS_DATABASE_FILE environment variable is deprecated, in favor of :meth:~hypothesis.settings.load_profile and the :obj:~hypothesis.settings.database setting.
If you have not configured the example database at all and the default location is not usable (due to e.g. permissions issues), Hypothesis will fall back to an in-memory database. This is not persisted between sessions, but means that the defaults work on read-only filesystems.

3.54.0:
This release improves the :func:~hypotheses.strategies.complex_numbers strategy, which now supports min_magnitude and max_magnitude arguments, along with allow_nan and allow_infinity like for :func:~hypotheses.strategies.floats.

3.53.0:
This release removes support for Django 1.8, which reached end of life on 2018-04-01.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 13 08:17:10 2017 UTC (6 years, 4 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored)

py-hypothesis: updated to 3.42.2

3.42.2:
This patch fixes :issue:1017, where instances of a list or tuple subtype used as an argument to a strategy would be coerced to tuple.

3.42.1:
This release has some internal cleanup, which makes reading the code more pleasant and may shrink large examples slightly faster.

3.42.0:
This release deprecates :ref:faker-extra, which was designed as a transition strategy but does not support example shrinking or coverage-guided discovery.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Nov 16 07:59:55 2017 UTC (6 years, 5 months ago) by adam
Branch: MAIN
Changes since 1.14: +4 -1 lines
Diff to previous 1.14 (colored)

py-hypothesis: updated to 3.37.0

3.37.0:
This is a deprecation release for some health check related features.

The following are now deprecated:

* Passing exception_in_generation to suppress_health_check. This no longer does anything even when passed - All errors that occur during data generation will now be immediately reraised rather than going through the health check mechanism.

* Passing random_module to suppress_health_check. This hasnãàÑÕ done anything for a long time, but was never explicitly deprecated. Hypothesis always seeds the random module when running @given tests, so this is no longer an error and suppressing it doesnãàÑÕ do anything.

* Passing non-HealthCheck values in suppress_health_check. This was previously allowed but never did anything useful.

In addition, passing a non-iterable value as suppress_health_check will now raise an error immediately (it would never have worked correctly, but it would previously have failed later). Some validation error messages have also been updated.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 9 07:41:44 2017 UTC (6 years, 5 months ago) by adam
Branch: MAIN
Changes since 1.13: +1 -4 lines
Diff to previous 1.13 (colored)

py-hypothesis: updated to 3.36.0

3.36.0:
This release adds a setting to the public API, and does some internal cleanup:
The :attr:`~hypothesis.settings.derandomize` setting is now documented
Removed - and disallowed - all 'bare excepts' in Hypothesis
Documented the :attr:`~hypothesis.settings.strict` setting as deprecated, and updated the build so our docs always match deprecations in the code.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Oct 16 18:35:19 2017 UTC (6 years, 6 months ago) by adam
Branch: MAIN
Changes since 1.12: +4 -7 lines
Diff to previous 1.12 (colored)

py-hypothesis: update to 3.33.0

3.33.0:
This release supports strategy inference for more field types in Django models() - you can now omit an argument for Date, Time, Duration, Slug, IP Address, and UUID fields.

Strategy generation for fields with grouped choices now selects choices from each group, instead of selecting from the group names.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 30 13:12:04 2017 UTC (6 years, 6 months ago) by adam
Branch: MAIN
Changes since 1.11: +13 -4 lines
Diff to previous 1.11 (colored)

py-hypothesis: update to 3.31.1

3.31.1:

This release improves the handling of deadlines so that they act better with the shrinking process. This fixes :issue:`892`.

This involves two changes:

1. The deadline is raised during the initial generation and shrinking, and then lowered to the set value for final replay. This restricts our attention to examples which exceed the deadline by a more significant margin, which increases their reliability.

2. When despite the above a test still becomes flaky because it is significantly faster on rerun than it was on its first run, the error message is now more explicit about the nature of this problem, and includes both the initial test run time and the new test run time.

In addition, this release also clarifies the documentation of the deadline setting slightly to be more explicit about where it applies.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Sep 13 06:26:55 2017 UTC (6 years, 7 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2017Q3-base, pkgsrc-2017Q3
Changes since 1.10: +1 -4 lines
Diff to previous 1.10 (colored)

py-hypothesis: update to 3.26.0

3.26.0:
Hypothesis now emits deprecation warnings if you are using the legacy SQLite example database format, or the tool for merging them. These were already documented as deprecated, so this doesn't change their deprecation status, only that we warn about it.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Sep 8 11:03:28 2017 UTC (6 years, 7 months ago) by adam
Branch: MAIN
Changes since 1.9: +4 -1 lines
Diff to previous 1.9 (colored)

3.24.1:
This release improves the reduction of examples involving floating point numbers to produce more human readable examples.
It also has some general purpose changes to the way the minimizer works internally, which may see some improvement in quality and slow down of test case reduction in cases that have nothing to do with floating point numbers.

3.24.0:
Hypothesis now emits deprecation warnings if you use example() inside a test function or strategy definition (this was never intended to be supported, but is sufficiently widespread that it warrants a deprecation path).

Revision 1.9 / (download) - annotate - [select for diffs], Sun Aug 27 12:16:07 2017 UTC (6 years, 7 months ago) by adam
Branch: MAIN
Changes since 1.8: +10 -7 lines
Diff to previous 1.8 (colored)

3.22.0:
This release provides what should be a substantial performance improvement to numpy arrays generated using provided numpy support, and adds a new fill_value argument to arrays() to control this behaviour.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 24 10:23:57 2017 UTC (6 years, 8 months ago) by adam
Branch: MAIN
Changes since 1.7: +4 -1 lines
Diff to previous 1.7 (colored)

3.14.0:
Hypothesis now understands inline type annotations

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 17 07:05:34 2017 UTC (6 years, 9 months ago) by adam
Branch: MAIN
Changes since 1.6: +7 -4 lines
Diff to previous 1.6 (colored)

3.13.0:

This release has two major aspects to it: The first is the introduction of :func:`~hypothesis.strategies.deferred`, which allows more natural definition of recursive (including mutually recursive) strategies.

The second is a number of engine changes designed to support this sort of strategy better. These should have a knock-on effect of also improving the performance of any existing strategies that currently generate a lot of data or involve heavy nesting by reducing their typical example size.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 7 15:41:18 2017 UTC (6 years, 9 months ago) by adam
Branch: MAIN
Changes since 1.5: +1 -4 lines
Diff to previous 1.5 (colored)

3.12.0:

This release makes some major internal changes to how Hypothesis represents data internally, as a prelude to some major engine changes that should improve data quality. There are no API changes, but it's a significant enough internal change that a minor version bump seemed warranted.

User facing impact should be fairly mild, but includes:
* All existing examples in the database will probably be invalidated. Hypothesis handles this automatically, so you don't need to do anything, but if you see all your examples disappear that's why.
* Almost all data distributions have changed significantly. Possibly for the better, possibly for the worse. This may result in new bugs being found, but it may also result in Hypothesis being unable to find bugs it previously did.
* Data generation may be somewhat faster if your existing bottleneck was in draw_bytes (which is often the case for large examples).
* Shrinking will probably be slower, possibly significantly.

If you notice any effects you consider to be a significant regression, please open an issue about them.

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 24 11:28:37 2017 UTC (6 years, 10 months ago) by adam
Branch: MAIN
CVS Tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.4: +7 -1 lines
Diff to previous 1.4 (colored)

Changes 3.11.0:

This is a feature release, adding datetime-related strategies to the core strategies.

extra.pytz.timezones allows you to sample pytz timezones from the Olsen database. Use directly in a recipe for tz-aware datetimes, or compose with st.none() to allow a mix of aware and naive output.

The new dates, times, datetimes, and timedeltas strategies in hypothesis.strategies are all constrained by objects of their type. This means that you can generate dates bounded by a single day (i.e. a single date), or datetimes constrained to the microsecond.

times and datetimes take an optional timezones= argument, which defaults to none() for naive times. You can use our extra strategy based on pytz, or roll your own timezones strategy with dateutil or even the standard library.

The old dates, times, and datetimes strategies in hypothesis.extra.datetimes are deprecated in favor of the new core strategies, which are more flexible and have no dependencies.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 27 12:55:54 2017 UTC (6 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Updated py-hypothesis to 3.8.2.

3.8.2 - 2017-04-26

This is a code reorganisation release that moves some internal test helpers out of the main source tree so as to not have changes to them trigger releases in future.

3.8.1 - 2017-04-26

This is a documentation release. Almost all code examples are now doctests checked in CI, eliminating stale examples.

3.8.0 - 2017-04-23

This is a feature release, adding the iterables strategy, equivalent to lists(...).map(iter) but with a much more useful repr. You can use this strategy to check that code doesnãàÑÕ accidentally depend on sequence properties such as indexing support or repeated iteration.

3.7.4 - 2017-04-22

This is a bug fix release for a single bug:

    In 3.7.3, using @example and a pytest fixture in the same test could cause the test to fail to fill the arguments, and throw a TypeError.


3.7.3 - 2017-04-21

This release should include no user visible changes and is purely a refactoring release. This modularises the behaviour of the core ãà×Èivenãàfunction, breaking it up into smaller and more accessible parts, but its actual behaviour should remain unchanged.

3.7.2 - 2017-04-21

This reverts an undocumented change in 3.7.1 which broke installation on debian stable: The specifier for the hypothesis[django] extra_requires had introduced a wild card, which was not supported on the default version of pip.

3.7.1 - 2017-04-21

This is a bug fix and internal improvements release.

    In particular Hypothesis now tracks a tree of where it has already explored. This allows it to avoid some classes of duplicate examples, and significantly improves the performance of shrinking failing examples by allowing it to skip some shrinks that it can determine canãàÑÕ possibly work.
    Hypothesis will no longer seed the global random arbitrarily unless you have asked it to using random_module()
    Shrinking would previously have not worked correctly in some special cases on Python 2, and would have resulted in suboptimal examples.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 19 12:42:56 2016 UTC (7 years, 5 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4
Changes since 1.2: +9 -0 lines
Diff to previous 1.2 (colored)

Updated py-hypothesis to 3.5.3.

3.5.3 - 2016-10-05

This is a bug fix release.

Bugs fixed:

    If the same test was running concurrently in two processes and there were examples already in the test database which no longer failed, Hypothesis would sometimes fail with a FileNotFoundError (IOError on Python 2) because an example it was trying to read was deleted before it was read. (Issue #372).
    Drawing from an integers() strategy with both a min_value and a max_value would reject too many examples needlessly. Now it repeatedly redraws until satisfied. (Pull request #366. Thanks to Calen Pennington for the contribution).

3.5.2 - 2016-09-24

This is a bug fix release.

    The Hypothesis pytest plugin broke pytest support for doctests. Now it doesnãàÑÕ.

3.5.1 - 2016-09-23

This is a bug fix release.

    Hypothesis now runs cleanly in -B and -BB modes, avoiding mixing bytes and unicode.
    unittest.TestCase tests would now have shown up in the new statistics mode. Now they do.
    Similarly, stateful tests would not have shown up in statistics and now they do.
    Statistics now print with pytest node IDs (the names youãàÑÅ get in pytest verbose mode).

3.5.0 - 2016-09-22

This is a feature release.

    fractions() and decimals() strategies now support min_value and max_value parameters. Thanks go to Anne Mulhern for the development of this feature.
    The Hypothesis pytest plugin now supports a ãàÅÉypothesis-show-statistics parameter that gives detailed statistics about the tests that were run. Huge thanks to Jean-Louis Fuchs and Adfinis-SyGroup for funding the development of this feature.
    There is a new event() function that can be used to add custom statistics.

Additionally there have been some minor bug fixes:

    In some cases Hypothesis should produce fewer duplicate examples (this will mostly only affect cases with a single parameter).
    py.test command line parameters are now under an option group for Hypothesis (thanks to David Keijser for fixing this)
    Hypothesis would previously error if you used function annotations on your tests under Python 3.4.
    The repr of many strategies using lambdas has been improved to include the lambda body (this was previously supported in many but not all cases).

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 24 10:20:35 2016 UTC (7 years, 7 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2016Q3-base, pkgsrc-2016Q3
Changes since 1.1: +0 -3 lines
Diff to previous 1.1 (colored)

Updated py-hypothesis to 3.4.2.

3.4.2 - 2016-07-13

This is a bug fix release, fixing a number of problems with the settings system:

    Test functions defined using @given can now be called from other threads (Issue #337)
    Attempting to delete a settings property would previously have silently done the wrong thing. Now it raises an AttributeError.
    Creating a settings object with a custom database_file parameter was silently getting ignored and the default was being used instead. Now itãàÑÔ not.

3.4.1 - 2016-07-07

This is a bug fix release for a single bug:

    On Windows when running two Hypothesis processes in parallel (e.g. using pytest-xdist) they could race with each other and one would raise an exception due to the non-atomic nature of file renaming on Windows and the fact that you canãàÑÕ rename over an existing file. This is now fixed.

3.4.0 - 2016-05-27

This release is entirely provided by Lucas Wiman:

models() strategies from hypothesis.extra.django will now respect much more of DjangoãàÑÔ validations out of the box. Wherever possible full_clean() should succeed.

In particular:

    The max_length, blank and choices kwargs are now respected.
    Add support for DecimalField.
    If a field includes validators, the list of validators are used to filter the field strategy.

3.3.0 - 2016-05-27

This release went wrong and is functionally equivalent to 3.2.0. Ignore it.
3.2.0 - 2016-05-19

This is a small single-feature release:

    All tests using @given now fix the global random seed. This removes the health check for that. If a non-zero seed is required for the final falsifying example, it will be reported. Otherwise Hypothesis will assume randomization was not a significant factor for the test and be silent on the subject. If you use the random_module() strategy this will continue to work and will always display the seed.

3.1.3 - 2016-05-01

Single bug fix release

    Another charmap problem. In 3.1.2 text/characters would break on systems which had /tmp/ mounted on a different partition than the Hypothesis storage directory (usually in home). This fixes that.

3.1.2 - 2016-04-30

Single bug fix release:

    Anything which used a text() or characters() strategy was broken on Windows and I hadnãàÑÕ updated appveyor to use the new repository location so I didnãàÑÕ notice. This is now fixed and windows support should work correctly.

3.1.1 - 2016-04-29

Minor bug fix release.

    Fix concurrency issue when running tests that use text() from multiple processes at once (Bug #302, thanks to Alex Chan).
    Improve performance of code using lists with max_size (thanks to Cristi Cobzarenco).
    Fix install on Python 2 with ancient versions of pip so that it installs the enum34 backport (thanks to Donald Stufft for telling me how to do this).
    Remove duplicated __all__ exports from hypothesis.strategies (thanks to Piët Delport).
    Update headers to point to new repository location.
    Allow use of strategies that canÑÕ be used in find() (e.g. choices) in stateful testing.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 24 09:44:35 2016 UTC (7 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2

Import py-hypothesis-3.1.0 as devel/py-hypothesis.

Hypothesis is a library for testing your Python code against a much
larger range of examples than you would ever want to write by hand.
It's based on the Haskell library, Quickcheck, and is designed to
integrate seamlessly into your existing Python unit testing work
flow.

Hypothesis is both extremely practical and also advances the state
of the art of unit testing by some way. It's easy to use, stable,
and extremely powerful. If you're not using Hypothesis to test your
project then you're missing out.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>