python-hypothesis/python-hypothesis.spec

100 lines
3.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-hypothesis
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# Note: tests require some very specific tooling, context-specific environment
# variables (such as checking for travis), and very specific versions of all
# dependencies. It does not appear feasible to get it to work in a consistent
# manner.
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%if 0%{?suse_version} > 1320
%define oldpython python2
%else
%define oldpython python
%endif
%bcond_without python2
Name: python-hypothesis
Accepting request 613144 from home:TheBlackCat:branches:devel:languages:python - 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
2018-05-31 12:40:51 +02:00
Version: 3.57.0
Release: 0
Summary: A library for property based testing
License: MPL-2.0
Group: Development/Languages/Python
URL: https://github.com/HypothesisWorks/hypothesis-python
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-3.57.0.tar.gz
BuildRequires: %{python_module setuptools >= 36}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module attrs >= 16.0.0}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest >= 2.8.0}
BuildRequires: %{python_module pytest-xdist >= 1.22.2}
BuildRequires: %{pythons}
# /SECTION
Requires: python-attrs >= 16.0.0
Requires: python-coverage
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Recommends: python-Django >= 1.11
Recommends: python-Faker >= 0.7.0
Recommends: python-numpy >= 1.9.0
Recommends: python-pandas
Recommends: python-pytest >= 2.8.0
Recommends: python-pytz
%endif
%if %{with python2}
BuildRequires: python-enum34
BuildRequires: python-ipaddress
BuildRequires: python-mock
%endif
%ifpython2
Requires: %{oldpython}-enum34
%endif
BuildArch: noarch
%python_subpackages
%description
Hypothesis is a library for testing your Python code against a much larger range
of examples than you would ever want to write by hand. It's based on the Haskell
library, Quickcheck, and is designed to integrate seamlessly into your existing
Python unit testing work flow.
Hypothesis works with most widely used versions of Python. It supports implementations
compatible with 2.6, 2.7 and 3.3+, and is known to work on CPython and PyPy (but not
PyPy3 until they support a 3.3 compatible version of the language). It does *not* currently
work on Jython or on Python 3.0 through 3.2.
%prep
%setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc ../CITATION README.rst
%license ../LICENSE.txt
%{python_sitelib}/*
%changelog