1
0
python-hypothesis/python-hypothesis.spec
Tomáš Chvátal 508f1f5a93 Accepting request 797684 from home:apersaud:branches:devel:languages:python
- 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
2020-04-25 17:00:42 +00:00

114 lines
3.9 KiB
RPMSpec

#
# spec file for package python-hypothesis
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%define skip_python2 1
Name: python-hypothesis%{psuffix}
Version: 5.10.4
Release: 0
Summary: A library for property based testing
License: MPL-2.0
URL: https://github.com/HypothesisWorks/hypothesis-python
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-%{version}.tar.gz
BuildRequires: %{python_module setuptools >= 36}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-attrs >= 19.2.0
Requires: python-sortedcontainers >= 2.1.0
Recommends: python-Django >= 2.2
Recommends: python-dpcontracts >= 0.4
Recommends: python-lark-parser >= 0.6.5
Recommends: python-numpy >= 1.9.0
Recommends: python-pandas >= 0.19
Recommends: python-pytest >= 4.3.0
Recommends: python-python-dateutil >= 1.4
Recommends: python-pytz >= 2014.1
BuildArch: noarch
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module Django >= 2.2}
BuildRequires: %{python_module attrs >= 19.2.0}
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module hypothesis >= %{version}}
BuildRequires: %{python_module lark-parser >= 0.6.5}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module numpy >= 1.9.0}
BuildRequires: %{python_module pexpect >= 4.7.0}
BuildRequires: %{python_module pytest >= 4.3.0}
BuildRequires: %{python_module python-dateutil >= 1.4}
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
BuildRequires: python3-dpcontracts
%endif
# /SECTION
%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
# the django fails to initialize
rm -r tests/django
# do not pull in pandas as a dep in ring1; it slows down things too much
rm -r tests/pandas
%build
%python_build
%install
%if !%{with test}
%python_install
%{python_expand \
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
%fdupes %{buildroot}%{$python_sitelib}
}
%endif
%check
%if %{with test}
# test_prints_statistics_given_option_under_xdist - wrong xdist opts
%pytest tests -k "not test_prints_statistics_given_option_under_xdist"
%endif
%if !%{with test}
%files %{python_files}
%license ../LICENSE.txt
%doc ../CITATION README.rst docs/changes.rst
%{python_sitelib}/hypothesis*
%endif
%changelog