diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-10-14 19:58:29 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-10-15 02:29:04 -0300 |
commit | fcb552785cb6e31dad985ad31beb470a21bee012 (patch) | |
tree | bab7158618c324b25b394972c607eb0941759274 /community/py3-hypothesis | |
parent | 735fd8391f1eb076d007481289cfddeec83e7bf5 (diff) | |
download | aports-fcb552785cb6e31dad985ad31beb470a21bee012.tar.bz2 aports-fcb552785cb6e31dad985ad31beb470a21bee012.tar.xz |
community/py3-hypothesis: upgrade to 4.40.1
Diffstat (limited to 'community/py3-hypothesis')
-rw-r--r-- | community/py3-hypothesis/APKBUILD | 9 | ||||
-rw-r--r-- | community/py3-hypothesis/attrs.patch | 45 |
2 files changed, 51 insertions, 3 deletions
diff --git a/community/py3-hypothesis/APKBUILD b/community/py3-hypothesis/APKBUILD index e043d59f8d..5a7b6f5c60 100644 --- a/community/py3-hypothesis/APKBUILD +++ b/community/py3-hypothesis/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Drew DeVault <sir@cmpwn.com> # Maintainer: Leo <thinkabit.ukim@gmail.com> pkgname=py3-hypothesis -pkgver=4.37.0 +pkgver=4.40.1 pkgrel=0 pkgdesc="Advanced property-based (QuickCheck-like) testing for Python" url="https://hypothesis.works/" @@ -10,7 +10,9 @@ license="MPL-2.0" depends="py3-attrs" makedepends="py3-setuptools" checkdepends="py3-pytest py3-coverage py3-tz py3-numpy py3-dateutil py3-pexpect" -source="py-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/hypothesis-python-$pkgver.tar.gz" +source="py-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/hypothesis-python-$pkgver.tar.gz + attrs.patch + " builddir="$srcdir/hypothesis-hypothesis-python-$pkgver/hypothesis-python" replaces="py-hypothesis" # Backwards compatibility @@ -39,4 +41,5 @@ package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="256cd26f4d05fb0d871631c36f4e93ef701bf42c6c80f735b741fd59e3427be73b1fc22ffdaafdfb4e1ad017b7340cfa0f6400d852f407b53567adf333163278 py-hypothesis-4.37.0.tar.gz" +sha512sums="40a062b81c25644a134fabaa9f90ef6c1237a4875bbcff1ed0bdd9fae5b7cd449451c140d516a140a668f3b84b2d4717906192a920ab6a1ca366c837a547fc47 py-hypothesis-4.40.1.tar.gz +9ef9fd9f7076586221f79b677c05139188c6d7c37fbbddfdf28dd4a6ca18b36457d3481ee716fb11a2a84f2db0d53105be880b92ec09d8bfbb63f8b5323dab27 attrs.patch" diff --git a/community/py3-hypothesis/attrs.patch b/community/py3-hypothesis/attrs.patch new file mode 100644 index 0000000000..a10708fb3c --- /dev/null +++ b/community/py3-hypothesis/attrs.patch @@ -0,0 +1,45 @@ +diff --git a/setup.py b/setup.py +index 62eeabb..b7edb53 100644 +--- a/setup.py ++++ b/setup.py +@@ -68,7 +68,7 @@ extras = { + extras["all"] = sorted(sum(extras.values(), [])) + + +-install_requires = ["attrs>=19.2.0"] ++install_requires = ["attrs>=16.0.0"] + # Using an environment marker on enum34 makes the dependency condition + # independent of the build environemnt, which is important for wheels. + # https://www.python.org/dev/peps/pep-0345/#environment-markers +diff --git a/src/hypothesis/internal/conjecture/shrinker.py b/src/hypothesis/internal/conjecture/shrinker.py +index 95c6de1..c0d485c 100644 +--- a/src/hypothesis/internal/conjecture/shrinker.py ++++ b/src/hypothesis/internal/conjecture/shrinker.py +@@ -1442,7 +1442,7 @@ def block_program(description): + return name + + +-@attr.s(slots=True, eq=False) ++@attr.s(slots=True, cmp=False) + class ShrinkPass(object): + run_with_chooser = attr.ib() + index = attr.ib() +diff --git a/src/hypothesis/searchstrategy/attrs.py b/src/hypothesis/searchstrategy/attrs.py +index a3c287a..1e08bc3 100644 +--- a/src/hypothesis/searchstrategy/attrs.py ++++ b/src/hypothesis/searchstrategy/attrs.py +@@ -45,12 +45,12 @@ def from_attrs(target, args, kwargs, to_infer): + + def from_attrs_attribute(attrib, target): + """Infer a strategy from the metadata on an attr.Attribute object.""" +- # Try inferring from the default argument. Note that this will only help if ++ # Try inferring from the default argument. Note that this will only help + # the user passed `infer` to builds() for this attribute, but in that case + # we use it as the minimal example. + default = st.nothing() + if isinstance(attrib.default, attr.Factory): +- if not attrib.default.takes_self: ++ if not getattr(attrib.default, "takes_self", False): # new in 17.1 + default = st.builds(attrib.default.factory) + elif attrib.default is not attr.NOTHING: + default = st.just(attrib.default) |