Accepting request 963086 from home:bnavigator:branches:devel:languages:python
- 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 commit is contained in:
parent
483959e724
commit
3ff13d41cd
2
_service
2
_service
@ -2,7 +2,7 @@
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="url">https://github.com/HypothesisWorks/hypothesis.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">hypothesis-python-6.35.0</param>
|
||||
<param name="revision">hypothesis-python-6.39.4</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">hypothesis-python-(.*)</param>
|
||||
<param name="subdir">hypothesis-python</param>
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad77f4cba4ed3470d757cecbaf858a4a13ad6042d2a8a93416629110d489f5b5
|
||||
size 735198
|
3
hypothesis-python-6.39.4.tar.gz
Normal file
3
hypothesis-python-6.39.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b1e48188054ef70c737e3e43cf20f6bf0a24cfa0c32f2a6e76c46d890652e88
|
||||
size 739371
|
@ -1,46 +0,0 @@
|
||||
---
|
||||
tests/conjecture/test_utils.py | 3 ++-
|
||||
tests/ghostwriter/test_expected_output.py | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/tests/conjecture/test_utils.py
|
||||
+++ b/tests/conjecture/test_utils.py
|
||||
@@ -11,7 +11,6 @@
|
||||
from collections import Counter
|
||||
from fractions import Fraction
|
||||
|
||||
-import numpy as np
|
||||
import pytest
|
||||
|
||||
from hypothesis import (
|
||||
@@ -213,11 +212,13 @@ def test_combine_labels_is_distinct():
|
||||
|
||||
|
||||
def test_invalid_numpy_sample():
|
||||
+ np = pytest.importorskip("numpy")
|
||||
with pytest.raises(InvalidArgument):
|
||||
cu.check_sample(np.array([[1, 1], [1, 1]]), "array")
|
||||
|
||||
|
||||
def test_valid_numpy_sample():
|
||||
+ np = pytest.importorskip("numpy")
|
||||
cu.check_sample(np.array([1, 2, 3]), "array")
|
||||
|
||||
|
||||
--- a/tests/ghostwriter/test_expected_output.py
|
||||
+++ b/tests/ghostwriter/test_expected_output.py
|
||||
@@ -23,13 +23,13 @@ import re
|
||||
import sys
|
||||
from typing import Sequence
|
||||
|
||||
-import numpy
|
||||
import pytest
|
||||
|
||||
import hypothesis
|
||||
from hypothesis.extra import ghostwriter
|
||||
from hypothesis.utils.conventions import not_set
|
||||
|
||||
+numpy = pytest.importorskip("numpy")
|
||||
|
||||
@pytest.fixture
|
||||
def update_recorded_outputs(request):
|
@ -1,3 +1,68 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 19 16:19:54 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 20 16:04:34 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -16,9 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%define skip_python36 1
|
||||
%bcond_with ringdisabled
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
@ -34,7 +33,7 @@ ExclusiveArch: do_not_build
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-hypothesis%{psuffix}
|
||||
Version: 6.35.0
|
||||
Version: 6.39.4
|
||||
Release: 0
|
||||
Summary: A library for property based testing
|
||||
License: MPL-2.0
|
||||
@ -43,14 +42,8 @@ URL: https://github.com/HypothesisWorks/hypothesis
|
||||
# Edit the `_service` file and run `osc service runall` for updates.
|
||||
# See also https://hypothesis.readthedocs.io/en/latest/packaging.html
|
||||
Source: hypothesis-python-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE dont import numpy and pandas and skip tests if these optional packages are not available.
|
||||
Patch0: importorskip-numpy-pandas.patch
|
||||
%if 0%{?suse_version} >= 1500
|
||||
BuildRequires: %{pythons >= 3.5.2}
|
||||
%else
|
||||
BuildRequires: %{python_module base >= 3.5.2}
|
||||
%endif
|
||||
BuildRequires: %{python_module setuptools >= 36.2}
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-attrs >= 19.2.0
|
||||
@ -76,9 +69,11 @@ Recommends: (python-importlib_metadata >= 3.6 if python-base < 3.8)
|
||||
# /SECTION
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module attrs >= 19.2.0}
|
||||
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module Django >= 2.2}
|
||||
BuildRequires: %{python_module attrs >= 19.2.0}
|
||||
BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9}
|
||||
BuildRequires: %{python_module black >= 19.10}
|
||||
BuildRequires: %{python_module dpcontracts >= 0.4}
|
||||
BuildRequires: %{python_module fakeredis}
|
||||
@ -87,28 +82,29 @@ BuildRequires: %{python_module hypothesis = %{version}}
|
||||
BuildRequires: %{python_module importlib_resources >= 3.3.0 if %python-base < 3.7}
|
||||
BuildRequires: %{python_module lark-parser >= 0.6.5}
|
||||
BuildRequires: %{python_module libcst >= 0.3.16}
|
||||
BuildRequires: %{python_module numpy >= 1.9.0}
|
||||
BuildRequires: %{python_module pandas >= 0.25}
|
||||
BuildRequires: %{python_module pexpect}
|
||||
BuildRequires: %{python_module pytest >= 4.6}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module python-dateutil >= 1.4}
|
||||
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: %{python_module numpy >= 1.9.0 if (%python-base without python36-base)}
|
||||
BuildRequires: %{python_module pandas >= 0.25 if (%python-base without python36-base)}
|
||||
# /SECTION
|
||||
%endif
|
||||
%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 is a family of testing libraries which let you write tests parametrized
|
||||
by a source of examples. A Hypothesis implementation then generates simple and
|
||||
comprehensible examples that make your tests fail. This simplifies writing your
|
||||
tests and makes them more powerful at the same time, by letting software automate
|
||||
the boring bits and do them to a higher standard than a human would, freeing you
|
||||
to focus on the higher level test logic.
|
||||
|
||||
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.
|
||||
This sort of testing is often called "property-based testing", and the most widely
|
||||
known implementation of the concept is the Haskell library QuickCheck, but
|
||||
Hypothesis differs significantly from QuickCheck and is designed to fit idiomatically
|
||||
and easily into existing styles of testing that you are used to, with absolutely no
|
||||
familiarity with Haskell or functional programming needed.
|
||||
|
||||
%prep
|
||||
%setup -q -n hypothesis-python-%{version}
|
||||
@ -138,35 +134,10 @@ sed -i 's/assert (arr == 0.0)/assert np.asarray(arr == 0.0)/' tests/numpy/test_g
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
# python3 means Python 3.6 on SLE-15 not a generic exclusion for all Python 3.*
|
||||
#
|
||||
# theses tests try to write into global python_sitelib
|
||||
# https://github.com/HypothesisWorks/hypothesis/issues/2546
|
||||
donttest="test_updating_the_file_include_new_shrinkers"
|
||||
donttest+=" or test_can_learn_to_normalize_the_unnormalized"
|
||||
# extraneous encoding
|
||||
python36_donttest+=" or (test_cli_python_equivalence and json)"
|
||||
# typing_extension problem on python36 and Leap 15's python3
|
||||
python36_donttest+=" or test_mutually_recursive_types_with_typevar"
|
||||
python3_donttest+=" or test_mutually_recursive_types_with_typevar"
|
||||
# gh#HypothesisWorks/hypothesis#3035
|
||||
python310_donttest+=" or test_recursion_error_is_not_flaky"
|
||||
# requires backports.zoneinfo for python < 3.9
|
||||
python36_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
|
||||
python38_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
|
||||
python3_ignoretests=" --ignore tests/datetime/test_zoneinfo_timezones.py"
|
||||
# added for 6.24.x
|
||||
# generic exclusion of array_api* in not possible :-(
|
||||
# python3_ignoretests+=" --ignore tests/array_api/test_partial_adoptors.py"
|
||||
# python3_ignoretests+=" --ignore tests/array_api/test_pretty.py"
|
||||
# python3_ignoretests+=" --ignore tests/array_api/test_scalar_dtypes.py"
|
||||
# python3_ignoretests+=" --ignore tests/array_api/test_arrays.py"
|
||||
# python3_ignoretests+=" --tests/array_api/test_from_dtype.py"
|
||||
# python3_ignoretests+=" --tests/array_api/test_argument_validation.py"
|
||||
# python3_ignoretests+=" --tests/array_api/test_indices.py"
|
||||
python3_ignoretests+=" --ignore tests/array_api*"
|
||||
# not available for python36
|
||||
python36_ignoretests+=" --ignore tests/numpy --ignore tests/pandas"
|
||||
# adapted from pytest.ini in github repo toplevel dir (above hypothesis-python)
|
||||
echo '[pytest]
|
||||
addopts=
|
||||
@ -179,7 +150,7 @@ addopts=
|
||||
filterwarnings =
|
||||
ignore::hypothesis.errors.NonInteractiveExampleWarning
|
||||
' > pytest.ini
|
||||
%pytest -c pytest.ini -k "not ($donttest ${$python_donttest})" ${$python_ignoretests} tests
|
||||
%pytest -c pytest.ini -k "not ($donttest)" tests
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
|
Loading…
Reference in New Issue
Block a user