- 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
* 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
* 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