- 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.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
- Update to 6.31.4
* This patch makes the .example() method more representative of
test-time data generation, albeit often at a substantial cost
to readability (issue #3182).
- Release 6.31.3
* This patch improves annotations on some of Hypothesis’ internal
functions, in order to deobfuscate the signatures of some
strategies. In particular, strategies shared between
hypothesis.extra.numpy and the hypothesis.extra.array_api extra
will benefit from this patch.
- Release 6.31.2
* This patch fix invariants display in stateful falsifying
examples (issue #3185).
- Release 6.31.1
* This patch updates xps.indices() so no flat indices are
generated, i.e. generated indices will now always explicitly
cover each axes of an array if no ellipsis is present. This is
to be consistent with a specification change that dropped
support for flat indexing (#272).
- Release 6.31.0
* This release makes us compatible with Django 4.0, in particular
by adding support for use of zoneinfo timezones (though we
respect the new USE_DEPRECATED_PYTZ setting if you need it).
- Revert last mandatory requires update. Optional dependencies need
to be declared by consuming packages (see hypothesis packaging
doc)
OBS-URL: https://build.opensuse.org/request/show/940071
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=146
- Update to 6.8.1
* Full changelog since 5.41.2:
https://hypothesis.readthedocs.io/en/latest/changes.html
- Changes in major version 6:
* Many functions now use PEP 3102 keyword-only arguments where
passing positional arguments was deprecated since 5.5.
* hypothesis.extra.django.from_model() no longer accepts model
as a keyword argument, where it could conflict with fields
named “model”.
* randoms() now defaults to use_true_random=False.
* complex_numbers() no longer accepts min_magnitude=None; either
use min_magnitude=0 or just omit the argument.
* hypothesis.provisional.ip4_addr_strings and ip6_addr_strings
are removed in favor of ip_addresses(v=...).map(str).
* register_type_strategy() no longer accepts generic types with
type arguments, which were always pretty badly broken.
* Using function-scoped pytest fixtures is now a health-check
error, instead of a warning.
- Don't test numpy and pandas for python36 (NEP29)
* add distro specific importorskip-numpy-pandas.patch
OBS-URL: https://build.opensuse.org/request/show/880417
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=140
- Update to version 5.24.2
- add comment about source archive
- use only github source repository (python subdir) in obscpio
- Reenable django and pandas tests
- With ringdisabled, do not run test flavor at all
- Require and use pytest-xdist in tests
* Reenables the one skipped test
* Trims total build time by a large factor despite now running
pandas and django tests too!
- Drop failing-test_array_values_are_unique_high_collision.patch
* Fix the test instead gh#HypothesisWorks/hypothesis#2447
- Sync requirements versions to setup.py
* newer versions probably came from wrong interpretation of
upstream's version pinning
OBS-URL: https://build.opensuse.org/request/show/826112
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=134
- 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
- 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/818385
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=131
- specfile:
* updated Django version number in requirements
- update to version 5.10.4:
* This patch improves the internals of builds() type inference, to
handle recursive forward references in certain dataclasses. This
is useful for e.g. hypothesmith’s forthcoming LibCST mode.
- changes from version 5.10.3:
* This release reverses the order in which some operations are tried
during shrinking. This should generally be a slight performance
improvement, but most tests are unlikely to notice much
difference.
- changes from version 5.10.2:
* This patch fixes issue #2406, where use of pandas.Timestamp
objects as bounds for the datetimes() strategy caused an internal
error. This bug was introduced in version 5.8.1.
- changes from version 5.10.1:
* This release is a small internal refactoring to how shrinking
interacts with targeted property-based testing that should have no
user user visible impact.
- changes from version 5.10.0:
* This release improves our support for datetimes and times around
DST transitions.
* times() and datetimes() are now sometimes generated with fold=1,
indicating that they represent the second occurrence of a given
wall-time when clocks are set backwards. This may be set even when
there is no transition, in which case the fold value should be
ignored.
For consistency, timezones provided by the pytz package can now
generate imaginary times (such as the hour skipped over when
clocks ‘spring forward’ to daylight saving time, or during some
historical timezone transitions). All other timezones have always
supported generation of imaginary times.
If you prefer the previous behaviour, datetimes() now takes an
argument allow_imaginary which defaults to True but can be set to
False for any timezones strategy.
- changes from version 5.9.1 :
* This patch fixes the rendering of binary() docstring by using the
proper backticks syntax.
- changes from version 5.9.0 :
* Failing tests which use target() now report the highest score
observed for each target alongside the failing example(s), even
without explicitly showing test statistics.
* This improves the debugging workflow for tests of accuracy, which
assert that the total imprecision is within some error budget -
for example, abs(a - b) < 0.5. Previously, shrinking to a minimal
failing example could often make errors seem smaller or more
subtle than they really are (see the threshold problem, and issue
#2180).
- changes from version 5.8.6 :
* This patch improves the docstring of binary(), the repr() of
sampled_from() on an enum.Enum subclass, and a warning in our
pytest plugin. There is no change in runtime behaviour.
- changes from version 5.8.5 :
* This release (potentially very significantly) improves the
performance of failing tests in some rare cases, mostly only
relevant when using targeted property-based testing, by stopping
further optimisation of unrelated test cases once a failing
example is found.
- changes from version 5.8.4 :
* This release fixes issue #2395, where under some circumstances
targeted property-based testing could cause Hypothesis to get
caught in an infinite loop.
- changes from version 5.8.3 :
* This patch teaches builds() and from_type() to use the
__signature__ attribute of classes where it has been set,
improving our support for Pydantic models (in pydantic >= 1.5).
- changes from version 5.8.2 :
* This release improves the performance of the part of the core
engine that deliberately generates duplicate values.
- changes from version 5.8.1 :
* This patch improves dates() shrinking, to simplify year, month,
and day like datetimes() rather than minimizing the number of days
since 2000-01-01.
OBS-URL: https://build.opensuse.org/request/show/797684
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=125
* Deprecation messages for functions in hypothesis.extra.django.models
now explicitly name the deprecated function to make it easier to track down usages.
* a spurious bug raised when a @st.composite function was passed a keyword-only argument.
* deprecates GenericStateMachine, in favor of RuleBasedStateMachine.
* This patch clarifies some error messages when the test function signature
is incompatible with the arguments to @given, especially when the @settings()
decorator is also used
* ixes a minor formatting issue the docstring of from_type()
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=106
- 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
* 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/package/show/devel:languages:python/python-hypothesis?expand=0&rev=99
- Update to 3.57.0
* Using an unordered collection with the :func:`~hypothesis.strategies.permutations`
strategy has been deprecated because the order in which e.g. a set shrinks is
arbitrary. This may cause different results between runs.
- Update to 3.56.10 - 2018-05-16
* This release makes :obj:`~hypothesis.settings.define_setting`
aprivate method, which has the effect of hiding it from the
documentation.
- Update to 3.56.9
* This is another release with no functionality changes as part of changes to
Hypothesis's new release tagging scheme.
- Update to 3.56.8
* This is a release with no functionality changes that moves Hypothesis over to
anew release tagging scheme.
- Update to 3.56.7
* This release provides a performance improvement for most tests, but in
particular users of ``sampled_from`` who don't have numpy installed should see
asignificant performance improvement.
- Update to 3.56.6
* This patch contains further internal work to support Mypy.
There are no user-visible changes... yet.
- Update to 3.56.5
* This patch contains some internal refactoring to run :pypi:`mypy` in CI.
There are no user-visible changes.
- Update to 3.56.4
* This release involves some very minor internal clean up and should have no
user visible effect at all.
- Update to 3.56.3
* This release fixes a problem introduced in :ref:`3.56.0 <v3.56.0>` where
setting the hypothesis home directory (through currently undocumented
means) would no longer result in the default database location living
in the new home directory.
- Update to 3.56.2
* This release fixes a problem introduced in :ref:`3.56.0 <v3.56.0>` where
setting :obj:`~hypothesis.settings.max_examples` to ``1`` would result in tests
failing with ``Unsatisfiable``. This problem could also occur in other harder
to trigger circumstances (e.g. by setting it to a low value, having a hard to
satisfy assumption, and disabling health checks).
- Update to 3.56.1
* This release fixes a problem that was introduced in :ref:`3.56.0 <v3.56.0>`:
Use of the :envvar:`HYPOTHESIS_VERBOSITY_LEVEL` environment variable was, rather
than deprecated, actually broken due to being read before various setup
the deprecation path needed was done. It now works correctly (and emits a
deprecation warning).
- Update to 3.56.0
* This release deprecates several redundant or internally oriented
:class:`~hypothesis.settings`, working towards an orthogonal set of
configuration options that are widely useful *without* requiring any
knowledge of our internals (:issue:`535`).
+ Deprecated settings that no longer have any effect are no longer
shown in the ``__repr__`` unless set to a non-default value.
+ :obj:`~hypothesis.settings.perform_health_check` is deprecated, as it
duplicates :obj:`~hypothesis.settings.suppress_health_check`.
+ :obj:`~hypothesis.settings.max_iterations` is deprecated and disabled,
because we can usually get better behaviour from an internal heuristic
than a user-controlled setting.
+ :obj:`~hypothesis.settings.min_satisfying_examples` is deprecated and
disabled, due to overlap with the
:obj:`~hypothesis.settings.HealthCheck.filter_too_much` healthcheck
and poor interaction with :obj:`~hypothesis.settings.max_examples`.
+ :envvar:`HYPOTHESIS_VERBOSITY_LEVEL` is now deprecated. Set
:obj:`~hypothesis.settings.verbosity` through the profile system instead.
+ Examples tried by :func:`~hypothesis.find` are now reported at ``debug``
verbosity level (as well as ``verbose`` level).
- Update to 3.55.6
* This release fixes a somewhat obscure condition (:issue:`1230`) under which you
could occasionally see a failing test trigger an assertion error inside
Hypothesis instead of failing normally.
- Update to 3.55.5
* This patch fixes one possible cause of :issue:`966`. When running
Python 2 with hash randomisation, passing a :obj:`python:bytes` object
to :func:`python:random.seed` would use ``version=1``, which broke
:obj:`~hypothesis.settings.derandomize` (because the seed depended on
arandomised hash). If :obj:`~hypothesis.settings.derandomize` is
*still* nondeterministic for you, please open an issue.
- Update to 3.55.4
* This patch makes a variety of minor improvements to the documentation,
and improves a few validation messages for invalid inputs.
- Update to 3.55.3
* This release updates the URL metadata associated with the PyPI package (again).
It has no other user visible effects.
- Update to 3.55.2
* This release updates the URL metadata associated with the PyPI package.
It has no other user visible effects.
- Update to 3.55.1
* This patch relaxes constraints on the expected values returned
by the standard library function :func:`hypot` and the internal
helper function :func:`~hypotheses.internal.cathetus`, this to
fix near-exact test-failures on some 32-bit systems.
- Update to 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.
- Update to 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`.
Thanks to J.J. Green for this feature.
- Update to 3.53.0
* This release removes support for Django 1.8, which reached end of life on
2018-04-01. You can see Django's release and support schedule
`on the Django Project website <https://www.djangoproject.com/download/#supported-versions>`_.
- Update to 3.52.3
* This patch fixes the :obj:`~hypothesis.settings.min_satisfying_examples` settings
documentation, by explaining that example shrinking is tracked at the level
of the underlying bytestream rather than the output value.
* The output from :func:`~hypothesis.find` in verbose mode has also been
adjusted - see :ref:`the example session <verbose-output>` - to avoid
duplicating lines when the example repr is constant, even if the underlying
representation has been shrunken.
- Update to 3.52.2
* This release improves the output of failures with
:ref:`rule based stateful testing <rulebasedstateful>` in two ways:
The output from it is now usually valid Python code.
When the same value has two different names because it belongs to two different
bundles, it will now display with the name associated with the correct bundle
for a rule argument where it is used.
- Update to 3.52.1
* This release improves the behaviour of :doc:`stateful testing <stateful>`
in two ways:
Previously some runs would run no steps (:issue:`376`). This should no longer
happen.
RuleBasedStateMachine tests which used bundles extensively would often shrink
terribly. This should now be significantly improved, though there is likely
a lot more room for improvement.
* This release also involves a low level change to how ranges of integers are
handles which may result in other improvements to shrink quality in some cases.
- Update to 3.52.0
* This release deprecates use of :func:`@settings(...) <hypothesis.settings>`
as a decorator, on functions or methods that are not also decorated with
:func:`@given <hypothesis.given>`. You can still apply these decorators
in any order, though you should only do so once each.
* Applying :func:`@given <hypothesis.given>` twice was already deprecated, and
applying :func:`@settings(...) <hypothesis.settings>` twice is deprecated in
this release and will become an error in a future version. Neither could ever
be used twice to good effect.
* Using :func:`@settings(...) <hypothesis.settings>` as the sole decorator on
atest is completely pointless, so this common usage error will become an
error in a future version of Hypothesis.
- Update to 3.51.0
* This release deprecates the ``average_size`` argument to
:func:`~hypothesis.strategies.lists` and other collection strategies.
You should simply delete it wherever it was used in your tests, as it
no longer has any effect.
In early versions of Hypothesis, the ``average_size`` argument was treated
as a hint about the distribution of examples from a strategy. Subsequent
improvements to the conceptual model and the engine for generating and
shrinking examples mean it is more effective to simply describe what
constitutes a valid example, and let our internals handle the distribution.
- Update to 3.50.3
* This patch contains some internal refactoring so that we can run
with warnings as errors in CI.
- Update to 3.50.2
* This has no user-visible changes except one slight formatting change to one docstring, to avoid a deprecation warning.
- Update to 3.50.1
* This patch fixes an internal error introduced in :ref:`3.48.0 <v3.48.0>`, where a check
for the Django test runner would expose import-time errors in Django
configuration (:issue:`1167`).
- Update to 3.50.0
* This release improves validation of numeric bounds for some strategies.
+ :func:`~hypothesis.strategies.integers` and :func:`~hypothesis.strategies.floats`
now raise ``InvalidArgument`` if passed a ``min_value`` or ``max_value``
which is not an instance of :class:`~python:numbers.Real`, instead of
various internal errors.
+ :func:`~hypothesis.strategies.floats` now converts its bounding values to
the nearest float above or below the min or max bound respectively, instead
of just casting to float. The old behaviour was incorrect in that you could
generate ``float(min_value)``, even when this was less than ``min_value``
itself (possible with eg. fractions).
+ When both bounds are provided to :func:`~hypothesis.strategies.floats` but
there are no floats in the interval, such as ``[(2**54)+1 .. (2**55)-1]``,
InvalidArgument is raised.
+ :func:`~hypothesis.strategies.decimals` gives a more useful error message
if passed a string that cannot be converted to :class:`~python:decimal.Decimal`
in a context where this error is not trapped.
Code that previously **seemed** to work may be explicitly broken if there
were no floats between ``min_value`` and ``max_value`` (only possible with
non-float bounds), or if a bound was not a :class:`~python:numbers.Real`
number but still allowed in :obj:`python:math.isnan` (some custom classes
with a ``__float__`` method).
- Update to 3.49.1
* This patch fixes our tests for Numpy dtype strategies on big-endian platforms,
where the strategy behaved correctly but the test assumed that the native byte
order was little-endian.
There is no user impact unless you are running our test suite on big-endian
platforms. Thanks to Graham Inggs for reporting :issue:`1164`.
- Update to 3.49.0
* This release deprecates passing ``elements=None`` to collection strategies,
such as :func:`~hypothesis.strategies.lists`.
Requiring ``lists(nothing())`` or ``builds(list)`` instead of ``lists()``
means slightly more typing, but also improves the consistency and
discoverability of our API - as well as showing how to compose or
construct strategies in ways that still work in more complex situations.
Passing a nonzero max_size to a collection strategy where the elements
strategy contains no values is now deprecated, and will be an error in a
future version. The equivalent with ``elements=None`` is already an error.
- Update to 3.48.1
* This patch will minimize examples that would come out non-minimal in previous versions. Thanks to Kyle Reeve for this patch.
- Update to 3.48.0
* This release improves some "unhappy paths" when using Hypothesis
with the standard library :mod:`python:unittest` module:
+ Applying :func:`@given <hypothesis.given>` to a non-test method which is
overridden from :class:`python:unittest.TestCase`, such as ``setUp``,
raises :attr:`a new health check <hypothesis.settings.not_a_test_method>`.
(:issue:`991`)
+ Using :meth:`~python:unittest.TestCase.subTest` within a test decorated
with :func:`@given <hypothesis.given>` would leak intermediate results
when tests were run under the :mod:`python:unittest` test runner.
Individual reporting of failing subtests is now disabled during a test
using :func:`@given <hypothesis.given>`. (:issue:`1071`)
+ :func:`@given <hypothesis.given>` is still not a class decorator, but the
error message if you try using it on a class has been improved.
As a related improvement, using :class:`django:django.test.TestCase` with
:func:`@given <hypothesis.given>` instead of
:class:`hypothesis.extra.django.TestCase` raises an explicit error instead
of running all examples in a single database transaction.
- Update to 3.47.0
* :obj:`~hypothesis.settings.register_profile` now accepts keyword arguments
for specific settings, and the parent settings object is now optional.
Using a ``name`` for a registered profile which is not a string was never
suggested, but it is now also deprecated and will eventually be an error.
- Update to 3.46.2
* This release removes an unnecessary branch from the code, and has no user-visible impact.
- Update to 3.46.1
* This changes only the formatting of our docstrings and should have no user-visible effects.
- Update to 3.46.0
* :func:`~hypothesis.strategies.characters` has improved docs about
what arguments are valid, and additional validation logic to raise a
clear error early (instead of e.g. silently ignoring a bad argument).
Categories may be specified as the Unicode 'general category'
(eg ``u'Nd'``), or as the 'major category' (eg ``[u'N', u'Lu']``
is equivalent to ``[u'Nd', u'Nl', u'No', u'Lu']``).
* In previous versions, general categories were supported and all other
input was silently ignored. Now, major categories are supported in
addition to general categories (which may change the behaviour of some
existing code), and all other input is deprecated.
- Update to 3.45.5
* This patch improves strategy inference in :mod:`hypothesis.extra.django`
to account for some validators in addition to field type - see
:issue:`1116` for ongoing work in this space.
Specifically, if a :class:`~django:django.db.models.CharField` or
:class:`~django:django.db.models.TextField` has an attached
:class:`~django:django.core.validators.RegexValidator`, we now use
:func:`~hypothesis.strategies.from_regex` instead of
:func:`~hypothesis.strategies.text` as the underlying strategy.
This allows us to generate examples of the default
:class:`~django:django.contrib.auth.models.User` model, closing :issue:`1112`.
- Update to 3.45.4
* This patch improves some internal debugging information, fixes
atypo in a validation error message, and expands the documentation
for new contributors.
- Add license file
OBS-URL: https://build.opensuse.org/request/show/613144
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=59
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
* 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/package/show/devel:languages:python/python-hypothesis?expand=0&rev=52
* Functions from hypothesis.strategies will no longer raise InvalidArgument on bad arguments
* Errors caused by accidentally invoking the legacy API are now much less confusing
* hypothesis.extra.django is 1.9 compatible.
* When tests are run with max_shrinks=0 this will now still rerun the test on failure
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=4
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.