aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-hypothesis/attrs.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-10-14 19:58:29 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-10-15 02:29:04 -0300
commitfcb552785cb6e31dad985ad31beb470a21bee012 (patch)
treebab7158618c324b25b394972c607eb0941759274 /community/py3-hypothesis/attrs.patch
parent735fd8391f1eb076d007481289cfddeec83e7bf5 (diff)
downloadaports-fcb552785cb6e31dad985ad31beb470a21bee012.tar.bz2
aports-fcb552785cb6e31dad985ad31beb470a21bee012.tar.xz
community/py3-hypothesis: upgrade to 4.40.1
Diffstat (limited to 'community/py3-hypothesis/attrs.patch')
-rw-r--r--community/py3-hypothesis/attrs.patch45
1 files changed, 45 insertions, 0 deletions
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)