* 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.98.9
* Avoid creating a .hypothesis directory when using register_type_strategy().
* Add ability to pass any object to note().
* Warn when constructing a repr that is overly long.
* Change the distribution of sampled_from() when sampling from a Flag.
* Deprecate use of the global random number generator while drawing from a strategy.
* Improve our distribution of generated values for all strategies.
* Improve the Ghostwriter for binary operators.
OBS-URL: https://build.opensuse.org/request/show/1152084
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=185
- 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
* 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/package/show/devel:languages:python/python-hypothesis?expand=0&rev=179
- Update to 6.88.0
- disable flaky test
* This release allows strategy-generating functions registered
with register_type_strategy() to conditionally not return
a strategy, by returning NotImplemented
* When randoms( was called with use_true_randoms=False,
calling sample on it with an empty sequence and 0 elements
would result in an error, when it should have returned
an empty sequence to agree with the normal behaviour of
random.Random. This fixes that discrepancy.)
OBS-URL: https://build.opensuse.org/request/show/1118040
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=175
- Update to 6.87.3
* This patch ensures that the :ref:`hypothesis codemod <codemods>`
CLI will print a warning instead of stopping with an internal error
if one of your files contains invalid syntax (:issue:`3759`).
* This patch makes some small changes to our NumPy integration
to ensure forward compatibility.
* Fixes :issue:`3755`, where an internal condition turns out to be
reachable after all.
* This release deprecates use of :func:`~hypothesis.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 (:issue:`3753`).
* Hotfix for :issue:`3747`, a bug in explain mode which is so rare
that we missed it in six months of dogfooding. Thanks to :pypi:`mygrad`
for discovering and promptly reporting this!
* This patch improves the documentation of
:obj:`@example(...).xfail() <hypothesis.example.xfail>` by adding a note
about PEP 614, similar to :obj:`@example(...).via() <hypothesis.example.via>`,
and adds a warning when a strategy generates a test case which
seems identical to one provided by an xfailed example.
* This release enables the :obj:`~hypothesis.Phase.explain`
:ref:`phase <phases>` by default. We hope it helps you to understand
why your failing tests have failed!
* This patch switches some of our type annotations to use
:obj:`typing.Literal` when only a few specific values are allowed,
such as UUID or IP address versions.
* This release deprecates the old whitelist/blacklist arguments to
:func:`~hypothesis.strategies.characters`, in favor of include/exclude
arguments which more clearly describe their effects on the set
of characters which can be generated.
OBS-URL: https://build.opensuse.org/request/show/1116915
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=174
- update to 6.82.4:
* This patch ensures that we always close the download
connection in :class:`~hypothesis.database.GitHubArtifactDatabase`.
* We can now pretty-print combinations of *zero*
:class:`enum.Flag` values, like ``SomeFlag(0)``,
which has never worked before.
* This patch fixes pretty-printing of combinations of
:class:`enum.Flag` values, which was previously an error
(:issue:`3709`).
* Improve shrinking of floats in narrow regions that don't
cross an integer boundary. Closes :issue:`3357`.
* :func:`~hypothesis.strategies.from_regex` now supports the
atomic grouping (``(?>...)``) and possessive quantifier
(``*+``, ``++``, ``?+``, ``{m,n}+``) syntax `added in Python 3.11
* If the :envvar:`HYPOTHESIS_NO_PLUGINS` environment variable
is set, we'll avoid :ref:`loading plugins <entry-points>`
such as `the old Pydantic integration
* Fixes some lingering issues with inference of recursive types
* in `~hypothesis.strategies.from_type`. Closes :issue:`3525`.
* This release drops support for Python 3.7, `which reached end
of life on 2023-06-27
* Fixes occasional recursion-limit-exceeded errors when
validating deeply nested strategies. Closes: :issue:`3671`
* Improve the type rendered in
:func:`~hypothesis.strategies.from_type`, which improves the
coverage of Ghostwriter.
* This patch improves Ghostwriter's use of qualified names for
re-exported functions and classes, and avoids importing useless
:obj:`~typing.TypeVar`\ s.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=170
- 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
* 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).
- 6.73.0
* This release upgrades the explain phase (issue #3411).
- 6.72.4
* This patch fixes type annotations for the arrays() strategy.
- 6.72.3
* This patch fixes a bug with from_type() with dict[tuple[int, int], str] (issue #3527).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=166
- Update to 6.61.2
* This patch improves our pretty-printing of failing examples,
including some refactoring to prepare for exciting future
features.
- Release 6.61.1
* This patch brings our domains() and emails() strategies into
compliance with RFC 5890 §2.3.1: we no longer generate
parts-of-domains where the third and fourth characters are --
(“R-LDH labels”), though future versions may deliberately
generate xn-- punycode labels. Thanks to python-email-validator
for the report!
- Update dependencies
- Move to PEP517 build
OBS-URL: https://build.opensuse.org/request/show/1056822
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=160
- 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
- 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
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=158
- Update to 6.47.1
* Our pretty-printer no longer sorts dictionary keys, since
iteration order is stable in Python 3.7+ and this can affect
reproducing examples (issue #3370). This PR was kindly
supported by Ordina Pythoneers.
- Release 6.47.0
* The Ghostwritter can now write tests for @classmethod or
@staticmethod methods, in addition to the existing support for
functions and other callables (issue #3318). Thanks to Cheuk
Ting Ho for the patch.
- Release 6.46.11
* Mention hypothesis.strategies.timezones() in the documentation
of hypothesis.strategies.datetimes() for completeness.
* Thanks to George Macon for this addition.
- Release 6.46.10
* This release contains some small improvements to our
documentation. Thanks to Felix Divo for his contribution!
- Release 6.46.9
* This patch by Adrian Garcia Badaracco adds type annotations to
some private internals (issue #3074).
- Release 6.46.8
* This patch by Phillip Schanely makes changes to the floats()
strategy when min_value or max_value is present. Hypothesis
will now be capable of generating every representable value in
the bounds. You may notice that hypothesis is more likely to
test values near boundaries, and values that are very close to
zero.
* These changes also support future integrations with symbolic
execution tools and fuzzers (issue #3086).
- Release 6.46.7
OBS-URL: https://build.opensuse.org/request/show/982468
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=152
- Update to 6.39.4
* This patch tweaks some internal formatting. There is no
user-visible change.
- Release 6.39.3
* If the shrink phase is disabled, we now stop the generate phase
as soon as an error is found regardless of the value of the
report_multiple_examples setting, since that’s probably what
you wanted (issue #3244).
- Release 6.39.2
* This patch clarifies rare error messages in builds() (issue
#3225) and floats() (issue #3207).
- Release 6.39.1
* This patch fixes a regression where the bound inner function
(your_test.hypothesis.inner_test) would be invoked with
positional arguments rather than passing them by name, which
broke pytest-asyncio (issue #3245).
- 6.39.0
* This release improves Hypothesis’ handling of positional-only
arguments, which are now allowed @st.composite strategies.
* On Python 3.8 and later, the first arguments to builds() and
from_model() are now natively positional-only. In cases which
were already errors, the TypeError from incorrect usage will
therefore be raises immediately when the function is called,
rather than when the strategy object is used.
- Release 6.38.0
* This release makes floats() error consistently when your
floating-point hardware has been configured to violate IEEE-754
for subnormal numbers, instead of only when an internal
assertion was tripped (issue #3092).
* If this happens to you, passing allow_subnormal=False will
suppress the explicit error. However, we strongly recommend
fixing the root cause by disabling global-effect unsafe-math
compiler options instead, or at least consulting e.g. Simon
Byrne’s Beware of fast-math explainer first.
- Release 6.37.2
* This patch fixes a bug in stateful testing, where returning a
single value wrapped in multiple() would be printed such that
the assigned variable was a tuple rather than the single
element (issue #3236).
- Release 6.37.1
* This patch fixes a warning under pytest 7 relating to our rich
traceback display logic (issue #3223).
- Release 6.37.0
* When distinguishing multiple errors, Hypothesis now looks at
the inner exceptions of PEP 654 ExceptionGroups.
- Release 6.36.2
* This patch updates our vendored list of top-level domains,
which is used by the provisional domains() strategy.
- Release 6.36.1
* This patch fixes some deprecation warnings from pytest 7.0,
along with some code formatting and docs updates.
- Release 6.36.0
* This release disallows using typing.Final with from_type() and
register_type_strategy().
* Why? Because Final can only be used during class definition. We
don’t generate class attributes.
* It also does not make sense as a runtime type on its own.
- Release 6.35.1
* This patch fixes hypothesis write output highlighting with rich
version 12.0 and later.
- Drop importorskip-numpy-pandas.patch
OBS-URL: https://build.opensuse.org/request/show/963086
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=150
- This release disallows using "typing.ClassVar" with
"from_type()" and "register_type_strategy()". Why? Because
"ClassVar" can only be used during "class" definition. We
don't generate class attributes. It also does not make sense
as a runtime type on its own.
- Updates our vendored list of top-level domains, which is used
by the provisional "domains()" strategy.
- Fixes issue #3169, an extremely rare bug which would trigger
if an internal least-recently-reused cache dropped a newly
added entry immediately after it was added.
- Fixes issue #3133 and issue #3144, where attempting to
generate Pandas series of lists or sets would fail with
confusing errors if you did not specify "dtype=object".
- Disallows using "typing.TypeAlias" with "from_type()" and
"register_type_strategy()". Why? Because "TypeAlias" is not
really a type, it is a tag for type checkers that some
expression is a type alias, not something else. It does not
make sense for Hypothesis to resolve it as a strategy.
- Updates our autoformatting tools, improving our code style
without any API changes.
- Drops support for Python 3.6, which reached end of life
upstream on 2021-12-23.
- Adds a temporary hook for a downstream tool, which is not
part of the public API.
- Updates our copyright headers to use a general authorship
statement and omit the year.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=147