Skip to content

Commit

Permalink
Merge pull request #2111 from Zac-HD/bump-attrs
Browse files Browse the repository at this point in the history
Update attrs dependency to >= 19.2
  • Loading branch information
DRMacIver committed Oct 2, 2019
2 parents e7a6894 + 8ba79a0 commit a48d04f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RELEASE_TYPE: patch

This patch bumps our dependency on :pypi:`attrs` to ``>=19.2.0``;
but there are no user-visible changes to Hypothesis.
2 changes: 1 addition & 1 deletion hypothesis-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def local_file(name):
extras["all"] = sorted(sum(extras.values(), []))


install_requires = ["attrs>=16.0.0"]
install_requires = ["attrs>=19.2.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ def offset_left(k):
return name


@attr.s(slots=True, cmp=False)
@attr.s(slots=True, eq=False)
class ShrinkPass(object):
run_with_chooser = attr.ib()
index = attr.ib()
Expand Down
4 changes: 2 additions & 2 deletions hypothesis-python/src/hypothesis/searchstrategy/attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# Try inferring from the default argument. Note that this will only help if
# 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 getattr(attrib.default, "takes_self", False): # new in 17.1
if not attrib.default.takes_self:
default = st.builds(attrib.default.factory)
elif attrib.default is not attr.NOTHING:
default = st.just(attrib.default)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
apipkg==1.5 # via execnet
atomicwrites==1.3.0 # via pytest
attrs==19.1.0
attrs==19.2.0
colorama==0.4.1 # via pytest
execnet==1.6.0 # via pytest-xdist
importlib-metadata==0.18 # via pluggy, pytest
Expand Down

0 comments on commit a48d04f

Please sign in to comment.