Accepting request 826112 from home:bnavigator:branches:devel:languages:python
- 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
This commit is contained in:
parent
57405b4e11
commit
55a827aaae
13
_service
Normal file
13
_service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<services>
|
||||||
|
<!-- python portion of github sources -->
|
||||||
|
<service name="obs_scm" mode="disabled">
|
||||||
|
<param name="url">https://github.com/HypothesisWorks/hypothesis.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="revision">hypothesis-python-5.24.2</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="versionrewrite-pattern">hypothesispython(.*)</param>
|
||||||
|
<param name="subdir">hypothesis-python</param>
|
||||||
|
<param name="filename">hypothesis-python</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled" />
|
||||||
|
</services>
|
@ -1,26 +0,0 @@
|
|||||||
--- a/tests/numpy/test_gen_data.py
|
|
||||||
+++ b/tests/numpy/test_gen_data.py
|
|
||||||
@@ -13,6 +13,7 @@
|
|
||||||
#
|
|
||||||
# END HEADER
|
|
||||||
|
|
||||||
+import struct
|
|
||||||
import sys
|
|
||||||
from functools import reduce
|
|
||||||
from itertools import zip_longest
|
|
||||||
@@ -28,6 +29,7 @@ from hypothesis.strategies._internal imp
|
|
||||||
from tests.common.debug import find_any, minimal
|
|
||||||
from tests.common.utils import fails_with, flaky
|
|
||||||
|
|
||||||
+_IS_32BIT = 8 * struct.calcsize("P") == 32
|
|
||||||
ANY_SHAPE = nps.array_shapes(min_dims=0, max_dims=32, min_side=0, max_side=32)
|
|
||||||
ANY_NONZERO_SHAPE = nps.array_shapes(min_dims=0, max_dims=32, min_side=1, max_side=32)
|
|
||||||
STANDARD_TYPES = list(
|
|
||||||
@@ -361,6 +363,7 @@ def test_cannot_generate_unique_array_of
|
|
||||||
strat.example()
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.skipif(_IS_32BIT, reason="Test fails on 32bit architecture.")
|
|
||||||
@given(
|
|
||||||
nps.arrays(
|
|
||||||
elements=st.just(0.0),
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5a6108726c1146873841bb761f1d85bff82565a4ec3b04d7fff1dea55f3118ec
|
|
||||||
size 9022213
|
|
3
hypothesis-python-5.24.2.obscpio
Normal file
3
hypothesis-python-5.24.2.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6b5de4dd128f7d901deea855fc7e8fd9062d1cf47e8a371d57a289a18c9e9df9
|
||||||
|
size 2410508
|
5
hypothesis-python.obsinfo
Normal file
5
hypothesis-python.obsinfo
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: hypothesis-python
|
||||||
|
version: 5.24.2
|
||||||
|
mtime: 1597261342
|
||||||
|
commit: 06c4e050af7a5460682afabd2f580f45c93b56ef
|
||||||
|
|
@ -1,3 +1,165 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 12 20:51:26 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 5.24.2
|
||||||
|
* This release improves shrink quality by allowing Hypothesis to
|
||||||
|
automatically learn new shrink passes for difficult to shrink
|
||||||
|
tests.
|
||||||
|
* The automatic learning is not currently accessible in user code
|
||||||
|
(it still needs significant work on robustness and performance
|
||||||
|
before it is ready for that), but this release includes learned
|
||||||
|
passes that should improve shrinking quality for tests which
|
||||||
|
use any of the text(), hypothesis.strategies.floats,
|
||||||
|
hypothesis.strategies.datetimes, hypothesis.strategies.emails,
|
||||||
|
and complex_numbers() strategies.
|
||||||
|
- Update to version 5.24.1
|
||||||
|
* This patch updates some docstrings, without changing runtime
|
||||||
|
behaviour.
|
||||||
|
- add comment about source archive
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 11 12:28:11 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 5.24.0
|
||||||
|
* The functions() strategy has a new argument pure=True,
|
||||||
|
which ensures that the same return value is generated
|
||||||
|
for identical calls to the generated function (issue
|
||||||
|
#2538).
|
||||||
|
* Thanks to Zac Hatfield-Dodds and Nikita Sobolev for this
|
||||||
|
feature!
|
||||||
|
- Update to version 5.23.12
|
||||||
|
* This release removes a number of Hypothesis's internal
|
||||||
|
"shrink passes" - transformations it makes to a
|
||||||
|
generated test case during shrinking - which appeared to
|
||||||
|
be redundant with other transformations.
|
||||||
|
* It is unlikely that you will see much impact from this.
|
||||||
|
If you do, it will likely show up as a change in
|
||||||
|
shrinking performance (probably slower, maybe faster),
|
||||||
|
or possibly in worse shrunk results. If you encounter
|
||||||
|
the latter, please let us know.
|
||||||
|
- remove rpmlintrc again
|
||||||
|
- use only github source repository (python subdir) in obscpio
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 8 08:41:01 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Use PyPI source for package and test it with tests from the
|
||||||
|
Github repository -- source hypothesis-python-tests-5.23.11
|
||||||
|
as direct CPIO archive hypothesis-python-tests-5.23.11.obscpio
|
||||||
|
created by (locally run) obs_scm service
|
||||||
|
- 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
|
||||||
|
- python-hypothesis-rpmlintrc -- filter empty types file
|
||||||
|
- Sync requirements versions to setup.py
|
||||||
|
* newer versions probably came from wrong interpretation of
|
||||||
|
upstream's version pinning
|
||||||
|
- Update to version 5.23.11
|
||||||
|
* This release fixes a bug in some internal Hypothesis support
|
||||||
|
code. It has no user visible impact.
|
||||||
|
- Update to version 5.23.10
|
||||||
|
* This release improves the quality of shrunk test cases in some
|
||||||
|
special cases. Specifically, it should get shrinking unstuck in
|
||||||
|
some scenarios which require simultaneously changing two parts
|
||||||
|
of the generated test case.
|
||||||
|
- Update to version 5.23.9
|
||||||
|
* This release improves the performance of some internal support
|
||||||
|
code. It has no user visible impact, as that code is not
|
||||||
|
currently run during normal Hypothesis operation.
|
||||||
|
- Update to version 5.23.8
|
||||||
|
* This release adds a heuristic to detect when shrinking has
|
||||||
|
finished despite the fact that there are many more possible
|
||||||
|
transformations to try. This will be particularly useful for
|
||||||
|
tests where the minimum failing test case is very large despite
|
||||||
|
there being many smaller test cases possible, where it is
|
||||||
|
likely to speed up shrinking dramatically.
|
||||||
|
* In some cases it is likely that this will result in worse
|
||||||
|
shrunk test cases. In those cases rerunning the test will
|
||||||
|
result in further shrinking.
|
||||||
|
- Update to version 5.23.7
|
||||||
|
* This release makes some performance improvements to shrinking.
|
||||||
|
They should only be noticeable for tests that are currently
|
||||||
|
particularly slow to shrink.
|
||||||
|
- Update to version 5.23.6
|
||||||
|
* This patch adds some more internal functions to support a new
|
||||||
|
feature we're working on, like version 5.18.3. There is still
|
||||||
|
no user-visible changes yet.
|
||||||
|
- Update to version 5.23.5
|
||||||
|
* This release makes some changes to internal support code that
|
||||||
|
is not currently used in production Hypothesis. It has no user
|
||||||
|
visible effect at present.
|
||||||
|
- Update to version 5.23.4
|
||||||
|
* This release improves shrinking quality in some special cases.
|
||||||
|
- Update to version 5.23.3
|
||||||
|
* This release fixes issue #2507, where lazy evaluation meant
|
||||||
|
that the values drawn from a sampled_from() strategy could
|
||||||
|
depend on mutations of the sampled sequence that happened after
|
||||||
|
the strategy was constructed.
|
||||||
|
- Update to version 5.23.2
|
||||||
|
* This patch fixes issue #2462, a bug in our handling of
|
||||||
|
unittest.TestCase.subTest(). Thanks to Israel Fruchter for
|
||||||
|
fixing this at the EuroPython sprints!
|
||||||
|
- Update to version 5.23.1
|
||||||
|
* This release improves the behaviour of the characters()
|
||||||
|
strategy when shrinking, by changing which characters are
|
||||||
|
considered smallest to prefer more "normal" ascii
|
||||||
|
characters where available.
|
||||||
|
- Update to version 5.23.0
|
||||||
|
* The default print_blob setting is now smarter. It defaults to
|
||||||
|
True in CI and False for local development.
|
||||||
|
* Thanks to Hugo van Kemenade for implementing this feature at
|
||||||
|
the EuroPython sprints!
|
||||||
|
- Update to version 5.22.0
|
||||||
|
* The slices() strategy can now generate slices for empty
|
||||||
|
sequences, slices with negative start and stop indices (from
|
||||||
|
the end of the sequence), and step=None in place of step=1.
|
||||||
|
* Thanks to Sangarshanan for implementing this feature at the
|
||||||
|
EuroPython sprints!
|
||||||
|
- Update to version 5.21.0
|
||||||
|
* This release ensures that tests which raise RecursionError are
|
||||||
|
not reported as flaky simply because we run them from different
|
||||||
|
initial stack depths (issue #2494).
|
||||||
|
- Update to version 5.20.4
|
||||||
|
* This release improves the performance of the sample method on
|
||||||
|
objects obtained from randoms() when use_true_random=False.
|
||||||
|
This should mostly only be noticeable when the sample size is a
|
||||||
|
large fraction of the population size, but may also help avoid
|
||||||
|
health check failures in some other cases.
|
||||||
|
- Update to version 5.20.3
|
||||||
|
* This release makes some internal changes for testing purposes
|
||||||
|
and should have no user visible effect.
|
||||||
|
- Update to version 5.20.2
|
||||||
|
* This release fixes a small caching bug in Hypothesis internals
|
||||||
|
that may under some circumstances have resulted in a less
|
||||||
|
diverse set of test cases being generated than was intended.
|
||||||
|
* Fixing this problem revealed some performance problems that
|
||||||
|
could occur during targeted property based testing, so this
|
||||||
|
release also fixes those. Targeted property-based testing
|
||||||
|
should now be significantly faster in some cases, but this may
|
||||||
|
be at the cost of reduced effectiveness.
|
||||||
|
- Update to version 5.20.1
|
||||||
|
* This patch updates our formatting to use isort 5. There is no
|
||||||
|
user-visible change.
|
||||||
|
- Update to version 5.20.0
|
||||||
|
* The basic_indices() strategy can now generate bare indexers in
|
||||||
|
place of length-one tuples. Thanks to Andrea for this patch!
|
||||||
|
- Update to version 5.19.3
|
||||||
|
* This patch removes an internal use of distutils in order to
|
||||||
|
avoid this setuptools warning for some users.
|
||||||
|
- Update to version 5.19.2
|
||||||
|
* This patch contains a small internal refactoring with no
|
||||||
|
user-visible impact.
|
||||||
|
Thanks to Andrea for writing this at the SciPy 2020 Sprints!
|
||||||
|
- Update to version 5.19.1
|
||||||
|
* This release slightly improves shrinking behaviour. This should
|
||||||
|
mainly only impact stateful tests, but may have some minor
|
||||||
|
positive impact on shrinking collections (lists, sets, etc).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 2 16:44:48 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
|
Thu Jul 2 16:44:48 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -17,54 +17,65 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define skip_python2 1
|
||||||
|
%bcond_with ringdisabled
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
%define psuffix -test
|
%define psuffix -test
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
# Magic for OBS Staging. Only build the flavors required by
|
||||||
|
# other packages in the ring.
|
||||||
|
%if %{with ringdisabled}
|
||||||
|
ExclusiveArch: do_not_build
|
||||||
|
%endif
|
||||||
%else
|
%else
|
||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%define skip_python2 1
|
|
||||||
Name: python-hypothesis%{psuffix}
|
Name: python-hypothesis%{psuffix}
|
||||||
Version: 5.19.0
|
Version: 5.24.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A library for property based testing
|
Summary: A library for property based testing
|
||||||
License: MPL-2.0
|
License: MPL-2.0
|
||||||
URL: https://github.com/HypothesisWorks/hypothesis-python
|
URL: https://github.com/HypothesisWorks/hypothesis
|
||||||
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-%{version}.tar.gz
|
# Source is the `hypothesis-python` subdir of the Github repository.
|
||||||
# PATCH-FIX-UPSTREAM failing-test_array_values_are_unique_high_collision.patch gh#HypothesisWorks/hypothesis#2447 mcepl@suse.com
|
# Edit the `_service` file and run `osc service runall` for updates.
|
||||||
# Skip failing test on i586.
|
Source: hypothesis-python-%{version}
|
||||||
Patch0: failing-test_array_values_are_unique_high_collision.patch
|
%if 0%{?suse_version} >= 1500
|
||||||
BuildRequires: %{python_module setuptools >= 36}
|
BuildRequires: %{pythons >= 3.5.2}
|
||||||
|
%else
|
||||||
|
BuildRequires: %{python_module base >= 3.5.2}
|
||||||
|
%endif
|
||||||
|
BuildRequires: %{python_module setuptools >= 36.2}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-attrs >= 19.3.0
|
Requires: python-attrs >= 19.2.0
|
||||||
Requires: python-sortedcontainers >= 2.2.2
|
Requires: python-sortedcontainers >= 2.1.0
|
||||||
Recommends: python-Django >= 3.0.7
|
Recommends: python-Django >= 2.2
|
||||||
Recommends: python-dpcontracts >= 0.6.0
|
Recommends: python-dpcontracts >= 0.4
|
||||||
Recommends: python-lark-parser >= 0.8.9
|
Recommends: python-lark-parser >= 0.6.5
|
||||||
Recommends: python-numpy >= 1.9.0
|
Recommends: python-numpy >= 1.9.0
|
||||||
Recommends: python-pandas >= 0.19
|
Recommends: python-pandas >= 0.19
|
||||||
Recommends: python-pytest >= 5.4.3
|
Recommends: python-pytest >= 4.3
|
||||||
Recommends: python-python-dateutil >= 2.8.1
|
Recommends: python-python-dateutil >= 1.4
|
||||||
Recommends: python-pytz >= 2014.1
|
Recommends: python-pytz >= 2014.1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module Django >= 3.0.7}
|
BuildRequires: %{python_module Django >= 2.2}
|
||||||
BuildRequires: %{python_module attrs >= 19.3.0}
|
BuildRequires: %{python_module attrs >= 19.2.0}
|
||||||
|
BuildRequires: %{python_module black}
|
||||||
BuildRequires: %{python_module dpcontracts >= 0.6.0}
|
BuildRequires: %{python_module dpcontracts >= 0.6.0}
|
||||||
BuildRequires: %{python_module flaky}
|
BuildRequires: %{python_module flaky}
|
||||||
BuildRequires: %{python_module hypothesis >= %{version}}
|
BuildRequires: %{python_module hypothesis = %{version}}
|
||||||
BuildRequires: %{python_module lark-parser >= 0.8.9}
|
BuildRequires: %{python_module lark-parser >= 0.6.5}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module numpy >= 1.9.0}
|
BuildRequires: %{python_module numpy >= 1.9.0}
|
||||||
BuildRequires: %{python_module pexpect >= 4.8.0}
|
BuildRequires: %{python_module pandas >= 0.19}
|
||||||
BuildRequires: %{python_module pytest >= 5.4.3}
|
BuildRequires: %{python_module pexpect}
|
||||||
BuildRequires: %{python_module python-dateutil >= 2.8.1}
|
BuildRequires: %{python_module pytest >= 4.3}
|
||||||
BuildRequires: %{python_module sortedcontainers >= 2.2.2}
|
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 typing_extensions}
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
@ -82,38 +93,36 @@ PyPy3 until they support a 3.3 compatible version of the language). It does *not
|
|||||||
work on Jython or on Python 3.0 through 3.2.
|
work on Jython or on Python 3.0 through 3.2.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python
|
%setup -q -n %{_sourcedir}/hypothesis-python-%{version} -T -D
|
||||||
%autopatch -p1
|
# gh#HypothesisWorks/hypothesis#2447: make sure arr==0.0 is an array on 32-bit
|
||||||
|
sed -i 's/assert (arr == 0.0)/assert np.asarray(arr == 0.0)/' tests/numpy/test_gen_data.py
|
||||||
# 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
|
%build
|
||||||
|
%if !%{with test}
|
||||||
%python_build
|
%python_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%{python_expand \
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
$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
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
# test_prints_statistics_given_option_under_xdist - wrong xdist opts
|
# theses tests try to write into global python_sitelib
|
||||||
%pytest tests -k "not test_prints_statistics_given_option_under_xdist"
|
# https://github.com/HypothesisWorks/hypothesis/issues/2546
|
||||||
|
skiptests="test_updating_the_file_include_new_shrinkers"
|
||||||
|
skiptests+=" or test_can_learn_to_normalize_the_unnormalized"
|
||||||
|
%pytest tests -n auto -p pytester --runpytest=subprocess -k "not ($skiptests)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license ../LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc ../CITATION README.rst docs/changes.rst
|
%doc README.rst
|
||||||
%{python_sitelib}/hypothesis*
|
%{python_sitelib}/hypothesis
|
||||||
|
%{python_sitelib}/hypothesis-%{version}-py*.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user