Date: Saturday, February 9, 2019 @ 18:50:25 Author: felixonmars Revision: 430937
upgpkg: python-pyrsistent 0.14.10-1 Added: python-pyrsistent/trunk/hypothesis-4.patch Modified: python-pyrsistent/trunk/PKGBUILD --------------------+ PKGBUILD | 12 ++-- hypothesis-4.patch | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-02-09 18:43:44 UTC (rev 430936) +++ PKGBUILD 2019-02-09 18:50:25 UTC (rev 430937) @@ -2,7 +2,7 @@ pkgbase=python-pyrsistent pkgname=('python-pyrsistent' 'python2-pyrsistent') -pkgver=0.14.9 +pkgver=0.14.10 pkgrel=1 pkgdesc="Persistent/Functional/Immutable data structures" arch=('x86_64') @@ -11,11 +11,15 @@ makedepends=('python-setuptools' 'python2-setuptools') checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-hypothesis' 'python2-hypothesis') source=("https://pypi.io/packages/source/p/pyrsistent/pyrsistent-$pkgver.tar.gz" - LICENCE.mit) -sha512sums=('bdf36228f80ce1d018d5baadae5cfb5aa3d9fddcd5144dc644cd6e9fd8d315ecb9ec8c48a8fb9ef73b4af6fceb28f1b83020cc3b4138abb5728ba24cdbf03d8f' - '036bd5cc2a62b004576ecc50a84dc7d187d8108f52cb886f7e32bed324327af2dc132100e1c8f1dd2ce35b774f74898020f04a315e5137319deda18a449e791a') + LICENCE.mit + hypothesis-4.patch) +sha512sums=('7a02c01321b6b0e4b2397a1322588539e54f189c574f05450794961c5078f04a70c7975f67885fedf2254a5e7da8f9aaaf55493667d5ec2a4af1147db48e8e34' + '036bd5cc2a62b004576ecc50a84dc7d187d8108f52cb886f7e32bed324327af2dc132100e1c8f1dd2ce35b774f74898020f04a315e5137319deda18a449e791a' + '0c06dc8bee3fda86b6e733f7782d3337dc35bc6cfe4603e8ecd2958aad6127461fe8e821693e80c044df08683a29b7ab1a1ee412b4903fdd5f296f83a95685ce') prepare() { + patch -d pyrsistent-$pkgver -p1 -i ../hypothesis-4.patch + sed -i 's/< *4/<6/' pyrsistent-$pkgver/setup.py cp -a pyrsistent-$pkgver{,-py2} } Added: hypothesis-4.patch =================================================================== --- hypothesis-4.patch (rev 0) +++ hypothesis-4.patch 2019-02-09 18:50:25 UTC (rev 430937) @@ -0,0 +1,144 @@ +diff --git a/tests/hypothesis_vector_test.py b/tests/hypothesis_vector_test.py +index 93ff0b8..e634204 100644 +--- a/tests/hypothesis_vector_test.py ++++ b/tests/hypothesis_vector_test.py +@@ -45,7 +45,7 @@ def test_setup(gc_when_done): + + + # Pairs of a list and corresponding pvector: +-PVectorAndLists = st.lists(st.builds(TestObject), average_size=5).map( ++PVectorAndLists = st.lists(st.builds(TestObject)).map( + lambda l: (l, pvector(l))) + + +@@ -123,70 +123,70 @@ class PVectorBuilder(RuleBasedStateMachine): + l3.extend(l2) + return l3, pv.extend(pv2) + +- @rule(target=sequences, former=sequences, choice=st.choices()) ++ @rule(target=sequences, former=sequences, data=st.data()) + @verify_inputs_unmodified +- def remove(self, former, choice): ++ def remove(self, former, data): + """ + Remove an item from the sequences. + """ + l, pv = former + assume(l) + l2 = l[:] +- i = choice(range(len(l))) ++ i = data.draw(st.sampled_from(range(len(l)))) + del l2[i] + return l2, pv.delete(i) + +- @rule(target=sequences, former=sequences, choice=st.choices()) ++ @rule(target=sequences, former=sequences, data=st.data()) + @verify_inputs_unmodified +- def set(self, former, choice): ++ def set(self, former, data): + """ + Overwrite an item in the sequence. + """ + l, pv = former + assume(l) + l2 = l[:] +- i = choice(range(len(l))) ++ i = data.draw(st.sampled_from(range(len(l)))) + obj = TestObject() + l2[i] = obj + return l2, pv.set(i, obj) + +- @rule(target=sequences, former=sequences, choice=st.choices()) ++ @rule(target=sequences, former=sequences, data=st.data()) + @verify_inputs_unmodified +- def transform_set(self, former, choice): ++ def transform_set(self, former, data): + """ + Transform the sequence by setting value. + """ + l, pv = former + assume(l) + l2 = l[:] +- i = choice(range(len(l))) ++ i = data.draw(st.sampled_from(range(len(l)))) + obj = TestObject() + l2[i] = obj + return l2, pv.transform([i], obj) + +- @rule(target=sequences, former=sequences, choice=st.choices()) ++ @rule(target=sequences, former=sequences, data=st.data()) + @verify_inputs_unmodified +- def transform_discard(self, former, choice): ++ def transform_discard(self, former, data): + """ + Transform the sequence by discarding a value. + """ + l, pv = former + assume(l) + l2 = l[:] +- i = choice(range(len(l))) ++ i = data.draw(st.sampled_from(range(len(l)))) + del l2[i] + return l2, pv.transform([i], discard) + +- @rule(target=sequences, former=sequences, choice=st.choices()) ++ @rule(target=sequences, former=sequences, data=st.data()) + @verify_inputs_unmodified +- def subset(self, former, choice): ++ def subset(self, former, data): + """ + A subset of the previous sequence. + """ + l, pv = former + assume(l) +- i = choice(range(len(l))) +- j = choice(range(len(l))) ++ i = data.draw(st.sampled_from(range(len(l)))) ++ j = data.draw(st.sampled_from(range(len(l)))) + return l[i:j], pv[i:j] + + @rule(pair=sequences) +@@ -250,34 +250,34 @@ class PVectorEvolverBuilder(RuleBasedStateMachine): + start.current_evolver.extend(end.current_list) + start.current_list.extend(end.current_list) + +- @rule(item=sequences, choice=st.choices()) +- def delete(self, item, choice): ++ @rule(item=sequences, data=st.data()) ++ def delete(self, item, data): + """ + Remove an item from the sequences. + """ + assume(item.current_list) +- i = choice(range(len(item.current_list))) ++ i = data.draw(st.sampled_from(range(len(item.current_list)))) + del item.current_list[i] + del item.current_evolver[i] + +- @rule(item=sequences, choice=st.choices()) +- def setitem(self, item, choice): ++ @rule(item=sequences, data=st.data()) ++ def setitem(self, item, data): + """ + Overwrite an item in the sequence using ``__setitem__``. + """ + assume(item.current_list) +- i = choice(range(len(item.current_list))) ++ i = data.draw(st.sampled_from(range(len(item.current_list)))) + obj = TestObject() + item.current_list[i] = obj + item.current_evolver[i] = obj + +- @rule(item=sequences, choice=st.choices()) +- def set(self, item, choice): ++ @rule(item=sequences, data=st.data()) ++ def set(self, item, data): + """ + Overwrite an item in the sequence using ``set``. + """ + assume(item.current_list) +- i = choice(range(len(item.current_list))) ++ i = data.draw(st.sampled_from(range(len(item.current_list)))) + obj = TestObject() + item.current_list[i] = obj + item.current_evolver.set(i, obj)