- Update to 6.138.13
* text() now occasionally generates from a preselected list of strings
which are likely to find bugs.
* Improves input validation for several strategies in our pandas extra,
so that they raise a helpful InvalidArgument rather than OverflowError.
* New "hypothesis-urandom" backend, which draws randomness from
/dev/urandom instead of Python’s PRNG.
* randoms() no longer produces 1.0, matching the exclusive upper bound
of random.Random.random
* Nesting @given inside of @given is now a HealthCheck failure.
* Add is_hypothesis_test(), for third-party libraries which want to
determine whether a test has been defined with Hypothesis.
* Add on_observation() to the internal alternative backends interface.
* New hypothesis.extra.django.SimpleTestCase
* New run_conformance_test(), for use in testing implementations of
alternative backends.
* Fixes a substantial performance regression in stateful tests from
computing string representations, present since version 6.131.20.
* Improves the thread safety of many functions and decorators.
* Before this release, Hypothesis did not require that super().__init__()
be called in SearchStrategy subclasses. Subclassing SearchStrategy is
not supported or part of the public API, but if you are subclassing it
anyway, you will need to make sure to call super().__init__().
* When a failure found by an alternative backend does not reproduce under
the Hypothesis backend, we now raise FlakyBackendFailure.
* When a test is executed concurrently from multiple threads, DeadlineExceeded
is now disabled.
* Add specified callback methods to the observability interface. The previous
TESTCASE_CALLBACKS is deprecated.
* Add support for Python 3.14.
OBS-URL: https://build.opensuse.org/request/show/1302460
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=87
* text() now occasionally generates from a preselected list of strings
which are likely to find bugs.
* Improves input validation for several strategies in our pandas extra,
so that they raise a helpful InvalidArgument rather than OverflowError.
* New "hypothesis-urandom" backend, which draws randomness from
/dev/urandom instead of Python’s PRNG.
* randoms() no longer produces 1.0, matching the exclusive upper bound
of random.Random.random
* Nesting @given inside of @given is now a HealthCheck failure.
* Add is_hypothesis_test(), for third-party libraries which want to
determine whether a test has been defined with Hypothesis.
* Add on_observation() to the internal alternative backends interface.
* New hypothesis.extra.django.SimpleTestCase
* New run_conformance_test(), for use in testing implementations of
alternative backends.
* Fixes a substantial performance regression in stateful tests from
computing string representations, present since version 6.131.20.
* Improves the thread safety of many functions and decorators.
* Before this release, Hypothesis did not require that super().__init__()
be called in SearchStrategy subclasses. Subclassing SearchStrategy is
not supported or part of the public API, but if you are subclassing it
anyway, you will need to make sure to call super().__init__().
* When a failure found by an alternative backend does not reproduce under
the Hypothesis backend, we now raise FlakyBackendFailure.
* When a test is executed concurrently from multiple threads, DeadlineExceeded
is now disabled.
* Add specified callback methods to the observability interface. The previous
TESTCASE_CALLBACKS is deprecated.
* Add support for Python 3.14.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=216
- Adjust type hints for the pub-sub database implementation in
version 6.126.0, and remove a remnant debug print in its
implementation.
- 6.127.1:
- Improve the clarity of printing counterexamples in stateful
testing, by avoiding confusing Bundle references with equivalent
values drawn from a regular strategy.
- 6.127.0:
- This releases adds support for type aliases created with the type
statement (new in python 3.12) to from_type() and
register_type_strategy().
- 6.126.0:
- The Hypothesis database now supports a pub-sub interface to
efficiently listen for changes in the database, via .add_listener
and .remove_listener. While all databases that ship with
Hypothesis support this interface, implementing it is not required
for custom database subclasses. Hypothesis will warn when trying
to listen on a database without support.
- This feature is currently only used downstream in hypofuzz.
- 6.125.3:
- Improves sharing of some internal cache behavior.
- 6.125.2:
- Optimize performance (improves speed by ~5%) and clarify the
wording in an error message.
- 6.125.1:
- Fixes a bug since around version 6.124.4 where we might have
generated -0.0 for st.floats(min_value=0.0), which is unsound.
- 6.125.0:
- Add 2024.12 to the list of recognized Array API versions in
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=204
- Update to 6.119.1
- This patch migrates some more internals (around generating
novel inputs) to the IR layer (issue #3921).
- Update to 6.119.0
- This release improves Hypothesis’ handling of ExceptionGroup
- it’s now able to detect marker detections if they’re inside
a group and attempts to resolve them. Note that this handling
is still a work in progress and might not handle edge cases
optimally. Please open issues if you encounter any problems
or unexpected behavior with it.
- Update to 6.118.9
- Internal refactorings in preparation for upcoming changes.
- Update to 6.118.8
- Internal renamings.
- Update to 6.118.7
- This patch removes some # type: ignore comments following a
mypy update.
- Update to 6.118.6
- When Hypothesis replays examples from its test database that
it knows were previously fully shrunk it will no longer try
to shrink them again.
- This should significantly speed up development workflows for
slow tests, as the shrinking could contribute a significant
delay when rerunning the tests.
- In some rare cases this may cause minor reductions in example
quality. This was considered an acceptable tradeoff for the
improved test runtime.
- Update to 6.118.5
- This patch avoids computing some string representations we
won’t need, giving a small speedup (part of issue #4139).
- Update to 6.118.4
- This patch migrates the optimisation algorithm for
targeted property-based testing to our IR layer (issue
#3921). This should result in moderately different (and
hopefully improved) exploration behavior in tests which use
hypothesis.target().
- Update to 6.118.3
- This patch adds more type hints to internal Hypothesis code.
- Update to 6.118.2
- This patch migrates the explain phase to our IR layer (issue
#3921). This should improve both its speed and precision.
- Update to 6.118.1
- This patch updates some internals around how we determine an
input is too large to finish generating.
- Update to 6.118.0
- The urls() strategy no longer generates URLs where the port
number is 0.
- This change is motivated by the idea that the generated URLs
should, at least in theory, be possible to fetch. The port
number 0 is special; if a server binds to port 0, the kernel
will allocate an unused, and non-zero, port instead. That
means that it’s not possible for a server to actually be
listening on port 0. This motivation is briefly described in
the documentation for urls().
- Fixes issue #4157.
- Thanks to @gmacon for this contribution!
- Update to 6.117.0
- This changes the behaviour of settings profiles so that
if you reregister the currently loaded profile it will
automatically reload it. Previously you would have had to
load it again.
- In particular this means that if you register a “ci” profile,
it will automatically be used when Hypothesis detects you are
running on CI.
- Update to 6.116.0
- Hypothesis now detects if it is running on a CI server and
provides better default settings for running on CI in this
case.
- Update to 6.115.6
- This patch changes the priority order of pretty printing
logic so that a user provided pretty printing method will
always be used in preference to e.g. printing it like a
dataclass.
- Update to 6.115.5
- This patch restores diversity to the outputs of
from_type(type) (issue #4144).
- Update to 6.115.4
- This release improves pretty printing of nested classes to
include the outer class name in their printed representation.
- Update to 6.115.3
- This patch fixes a regression from version 6.115.2 where
generating values from integers() with certain values for
min_value and max_value would error.
- Require numpy >= 2.
OBS-URL: https://build.opensuse.org/request/show/1224614
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=79
- This patch migrates some more internals (around generating
novel inputs) to the IR layer (issue #3921).
- Update to 6.119.0
- This release improves Hypothesis’ handling of ExceptionGroup
- it’s now able to detect marker detections if they’re inside
a group and attempts to resolve them. Note that this handling
is still a work in progress and might not handle edge cases
optimally. Please open issues if you encounter any problems
or unexpected behavior with it.
- Update to 6.118.9
- Internal refactorings in preparation for upcoming changes.
- Update to 6.118.8
- Internal renamings.
- Update to 6.118.7
- This patch removes some # type: ignore comments following a
mypy update.
- Update to 6.118.6
- When Hypothesis replays examples from its test database that
it knows were previously fully shrunk it will no longer try
to shrink them again.
- This should significantly speed up development workflows for
slow tests, as the shrinking could contribute a significant
delay when rerunning the tests.
- In some rare cases this may cause minor reductions in example
quality. This was considered an acceptable tradeoff for the
improved test runtime.
- Update to 6.118.5
- This patch avoids computing some string representations we
won’t need, giving a small speedup (part of issue #4139).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=199
Forwarded request #1217328 from glaubitz
- Update to 6.115.3
* This patch fixes a regression from :ref:`version 6.115.2 <v6.115.2>` where
generating values from :func:`~hypothesis.strategies.integers` with certain
values for ``min_value`` and ``max_value`` would error.
- from version 6.115.2
* This release improves integer shrinking by folding the endpoint upweighting
for :func:`~hypothesis.strategies.integers` into the ``weights`` parameter
of our IR.
If you maintain an alternative backend as part of our (for now explicitly
unstable) :ref:`alternative-backends`, this release changes the type of the
``weights`` parameter to ``draw_integer`` and may be a breaking change for you.
- from version 6.115.1
* This patch improves the performance of :func:`~hypothesis.strategies.from_type`
with `pydantic.types.condate
- from version 6.115.0
* This improves the formatting of dataclasses and attrs classes when printing
falsifying examples.
- from version 6.114.1
* This patch upgrades remaining type annotations to Python 3.9 syntax.
- from version 6.114.0
* This release drops support for Python 3.8, which reached end of life on
2024-10-07.
- from version 6.113.0
* This release adds ``hypothesis.errors.BackendCannotProceed``, an unstable API
for use by :ref:`alternative-backends`.
- from version 6.112.5
* This release fixes a regression where :class:`hypothesis.stateful.Bundle` did
not work properly with :ref:`flatmap <flatmap>` functionality.
- from version 6.112.4
* This patch tweaks the paths in ``@example(...)`` patches, so that
OBS-URL: https://build.opensuse.org/request/show/1217398
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=78
* This patch fixes a regression from :ref:`version 6.115.2 <v6.115.2>` where
generating values from :func:`~hypothesis.strategies.integers` with certain
values for ``min_value`` and ``max_value`` would error.
- from version 6.115.2
* This release improves integer shrinking by folding the endpoint upweighting
for :func:`~hypothesis.strategies.integers` into the ``weights`` parameter
of our IR.
If you maintain an alternative backend as part of our (for now explicitly
unstable) :ref:`alternative-backends`, this release changes the type of the
``weights`` parameter to ``draw_integer`` and may be a breaking change for you.
- from version 6.115.1
* This patch improves the performance of :func:`~hypothesis.strategies.from_type`
with `pydantic.types.condate
- from version 6.115.0
* This improves the formatting of dataclasses and attrs classes when printing
falsifying examples.
- from version 6.114.1
* This patch upgrades remaining type annotations to Python 3.9 syntax.
- from version 6.114.0
* This release drops support for Python 3.8, which reached end of life on
2024-10-07.
- from version 6.113.0
* This release adds ``hypothesis.errors.BackendCannotProceed``, an unstable API
for use by :ref:`alternative-backends`.
- from version 6.112.5
* This release fixes a regression where :class:`hypothesis.stateful.Bundle` did
not work properly with :ref:`flatmap <flatmap>` functionality.
- from version 6.112.4
* This patch tweaks the paths in ``@example(...)`` patches, so that
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=197
* This release adds support for variable-width bytes in our IR
layer (issue #3921), which should mean improved performance
anywhere you use binary(). If you maintain an alternative
backend as part of our (for now explicitly unstable)
Alternative backends for Hypothesis, this release changes the
draw_* interface and may be a breaking change for you.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=193
- Update to 6.108.5
* The alphabet= argument to from_regex() now accepts unions of characters()
and sampled_from() strategies, in addition to accepting each individually.
* Improves support for unions of numpy dtypes such as np.float64 | np.complex128
in from_type() and arrays()
* Support for Django 5.0, drop support for end-of-life Django versions (< 4.2).
* Migrate the shrinker to our new internal representation, called the IR layer.
This improves the shrinker’s performance in the majority of cases. For example,
on the Hypothesis test suite, shrinking is a median of 1.38x faster.
* The from_dtype() function no longer generates NaT (“not-a-time”) values for the
datetime64 or timedelta64 dtypes if passed allow_nan=False
* Add the experimental and unstable backend setting. See documentation for details.
* Many more minor changes, see the upstream changelog.
- Add 0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch to fix tests
* https://github.com/HypothesisWorks/hypothesis/issues/4062
OBS-URL: https://build.opensuse.org/request/show/1191165
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=191
- update to 6.92.1:
* This release adds an experimental :wikipedia:`observability
* This patch fixes an issue where
:func:`~hypothesis.strategies.builds` could not be used with
:pypi:`attrs` objects that defined private attributes (i.e.
attributes with a leading underscore). See also
* This release adds an optional ``payload`` argument to
:func:`hypothesis.event`, so that you can clearly express
the difference between the label and the value of an
observation.
* This patch supports assigning ``settings = settings(...)`` as
a class attribute on a subclass of a ``.TestCase`` attribute
of a :class:`~hypothesis.stateful.RuleBasedStateMachine`.
* This release makes it an error to assign ``settings =
settings(...)`` as a class attribute on a
:class:`~hypothesis.stateful.RuleBasedStateMachine`.
* This patch refactors some internals. There is no user-
visible change, but we hope to improve performance and unlock
support for alternative backends such as :pypi:`symbolic
execution with crosshair in future (:issue:`3086`).
* This release teaches :func:`~hypothesis.strategies.from_type`
to handle constraints implied by the :pypi:`annotated-types`
package - as used by e.g. :pypi:`Pydantic`.
* This patch adds a warning when :func:`@st.composite
wraps a function annotated as returning a
:class:`~hypothesis.strategies.SearchStrategy`,
since this is usually an error (:issue:`3786`).
* This patch refactors ``from_type(typing.Tuple)``, allowing
:func:`~hypothesis.strategies.register_type_strategy` to take
effect for tuples instead of being silently ignored
OBS-URL: https://build.opensuse.org/request/show/1135262
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=70
- update to 6.75.3:
* This patch fixes ~hypothesis.strategies.complex_numbers accidentally
invalidating itself when passed magnitude arguments for 32
and 64-bit widths, i.e. 16- and 32-bit floats, due to not
internally down-casting numbers
- Update to 6.75.2:
* Improved the documentation regarding how to use
GitHubArtifactDatabase and fixed a bug that occurred in
repositories with no existing artifacts.
- 6.75.1
* hypothesis.errors will now raise AttributeError when attempting to
access an undefined attribute, rather than returning None.
- 6.75.0
* 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’ll need LibCST (via hypothesis[codemods]), and that
@example().via() requires PEP 614 (Python 3.9 or later).
- 6.74.1
* This patch provides better error messages for datetime- and
timedelta-related invalid dtypes in our Pandas extra (issue
#3518).
- 6.74.0
* This release adds support for nullable pandas dtypes in pandas()
(issue #3604).
- 6.73.1
* This patch updates our minimum Numpy version to 1.16, and restores
compatibility with versions before 1.20, which were broken by a
mistake in Hypothesis 6.72.4 (issue #3625).
OBS-URL: https://build.opensuse.org/request/show/1087109
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=65
- Update to 6.61.0
- This release improves our treatment of database keys, which based on (among
other things) the source code of your test function. We now post-process
this source to ignore decorators, comments, trailing whitespace, and blank
lines - so that you can add :obj:`@example() <hypothesis.example>`\ s or
make some small no-op edits to your code without preventing replay of any
known failing or covering examples.
- 6.60.1 - 2022-12-11
- This patch updates our vendored `list of top-level domains
<https://www.iana.org/domains/root/db>`__,
which is used by the provisional :func:`~hypothesis.provisional.domains`
strategy.
- 6.60.0 - 2022-12-04
- This release improves Hypothesis' ability to resolve forward references in
type annotations. It fixes a bug that prevented
:func:`~hypothesis.strategies.builds` from being used with `pydantic models
that possess updated forward references
<https://pydantic-docs.helpmanual.io/usage/postponed_annotations/>`__. See
:issue:`3519`.
- 6.59.0 - 2022-12-02
- The :obj:`@example(...) <hypothesis.example>` decorator now has a ``.via()``
method, which future tools will use to track automatically-added covering
examples (:issue:`3506`).
- 6.58.2 - 2022-11-30
- This patch updates our vendored `list of top-level domains
<https://www.iana.org/domains/root/db>`__, which is used by the provisional
:func:`~hypothesis.provisional.domains` strategy.
- 6.58.1 - 2022-11-26
- This patch shifts ``hypothesis[lark]`` from depending on the old
:pypi:`lark-parser` package to the new :pypi:`lark` package. There are no
code changes in Hypothesis, it's just that Lark got a new name on PyPI for
version 1.0 onwards.
- 6.58.0 - 2022-11-19
- :func:`~hypothesis.register_random` has used :mod:`weakref` since
:ref:`v6.27.1`, allowing the :class:`~random.Random`-compatible objects to
be garbage-collected when there are no other references remaining in order
to avoid memory leaks. We now raise an error or emit a warning when this
seems likely to happen immediately.
- The type annotation of :func:`~hypothesis.register_random` was also widened
so that structural subtypes of :class:`~random.Random` are accepted by
static typecheckers.
- 6.57.1 - 2022-11-14
- This patch updates some internal type annotations and fixes a formatting
bug in the :obj:`~hypothesis.Phase.explain` phase reporting.
- 6.57.0 - 2022-11-14
- Hypothesis now raises an error if you passed a strategy as the
``alphabet=`` argument to :func:`~hypothesis.strategies.text`, and it
generated something which was not a length-one string. This has never been
supported, we're just adding explicit validation to catch cases like `this
StackOverflow question <https://stackoverflow.com/a/74336909/9297601>`__.
- 6.56.4 - 2022-10-28
- This patch updates some docs, and depends on :pypi:`exceptiongroup` 1.0.0
final to avoid a bug in the previous version.
- 6.56.3 - 2022-10-17
- This patch teaches :func:`~hypothesis.strategies.text` to rewrite a few
more filter predicates (:issue:`3134`). You're unlikely to notice any
change.
OBS-URL: https://build.opensuse.org/request/show/1043052
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=61
- Update to version 5.19.0:
* This release improves the randoms() strategy by adding support
for Random instances where Hypothesis generates the random
values rather than having them be “truly” random.
- Update to version 5.18.3:
* This patch adds some internal functions to support a new feature
we’re working on. There is no user-visible change… yet.
- Update to version 5.18.2:
* This patch improves our docs for the derandomize setting.
- Update to version 5.18.1:
* This release consists of some internal refactoring to the shrinker
in preparation for future work. It has no user visible impact.
- Update to version 5.18.0:
* This release teaches Hypothesis to shorten tracebacks for explicit
examples, as we already do for generated examples, so that you can
focus on your code rather than ours.
* If you have multiple failing explicit examples, they will now all
be reported. To report only the first failure, you can use the
report_multiple_bugs=False setting as for generated examples.
- Update to version 5.17.0:
* This patch adds strategy inference for the Literal, NewType, Type,
DefaultDict, and TypedDict types from the typing_extensions
backport on PyPI.
- Update to version 5.16.3:
* This patch precomputes some of the setup logic for our
experimental external fuzzer integration and sets deadline=None
in fuzzing mode, saving around 150us on each iteration.
* This is around two-thirds the runtime to fuzz an empty test with
@given(st.none()), and nice to have even as a much smaller
fraction of the runtime for non-trivial tests.
OBS-URL: https://build.opensuse.org/request/show/818623
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=48
- Remove pandas dependency to make ring1 more happy
- Update to 4.22.0:
* Various small tweaks only
- More love for the tests to make sure we execute and run them
+ skip/remove the obvious failures that are irelevant
- Update to 4.18.2:
* This patch makes Hypothesis compatible with the Python 3.8 alpha
* This release adds the functions() strategy
* This release refactors stateful rule selection
* This patch allows Hypothesis to try a few more examples after finding the first bug
* This release adds the strategy broadcastable_shapes()
- Make sure the tests are executed (and fail at the moment, needs
bit more love)
OBS-URL: https://build.opensuse.org/request/show/701259
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=35
update to version 3.45.3
* Bump version to 3.44.26 and update changelog
* That doesn't need to be conditional in the shrinker
* Add release notes
* Wrong backticks
* Response to review
* Switch over to an adaptive greedy algorithm
* Clarify dependencies on enum34, Django
* don't try to assign to *args
* Don't split expression over multiple lines needlessly
* define labels in top-level constants since they're expensive-ish to compute
* Change how we track whether a block is shrinking
* Add tests for zig zagging behaviour
* Update isort from 4.2.15 to 4.3.2
* Add a section about deferring errors
* specify target and args for build() together as *target_and_args
* Fix typo
* Bump version to 3.44.17 and update changelog
* Add flaky annotation to test_can_generate_interval_endpoints
* Add notion of labels to strategies
* Bump version to 3.44.25 and update changelog
* Update pytest from 3.3.2 to 3.4.0
* address more code review comments
* Bump version to 3.44.19 and update changelog
* Remove just and of course
* Bump version to 3.45.2 and update changelog
* don't refer to hypothesis_internal_target from bad implementation
* Add a release note for the source changes
* Add quality tests on Python 2
* Update safety from 1.6.1 to 1.7.0
OBS-URL: https://build.opensuse.org/request/show/579946
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hypothesis?expand=0&rev=16