From 4f3c34af3ca7d904a15dc301131a0f25918869c8 Mon Sep 17 00:00:00 2001 From: CI on behalf of the Hypothesis team Date: Sun, 26 Sep 2021 00:13:59 +0000 Subject: [PATCH] Update pinned dependencies --- hypothesis-python/src/hypothesis/_settings.py | 2 +- hypothesis-python/src/hypothesis/core.py | 2 +- .../src/hypothesis/extra/_array_helpers.py | 2 +- .../internal/conjecture/dfa/lstar.py | 2 +- hypothesis-python/src/hypothesis/stateful.py | 4 ++-- .../strategies/_internal/collections.py | 4 ++-- .../strategies/_internal/deferred.py | 2 +- .../hypothesis/strategies/_internal/lazy.py | 2 +- .../strategies/_internal/numbers.py | 4 ++-- .../hypothesis/strategies/_internal/random.py | 4 ++-- .../strategies/_internal/strategies.py | 6 +++--- .../src/hypothesis/vendor/pretty.py | 4 +--- .../tests/quality/test_poisoned_lists.py | 6 +++--- .../tests/quality/test_poisoned_trees.py | 2 +- requirements/test.txt | 2 +- requirements/tools.txt | 20 +++++++++---------- 16 files changed, 33 insertions(+), 35 deletions(-) diff --git a/hypothesis-python/src/hypothesis/_settings.py b/hypothesis-python/src/hypothesis/_settings.py index 5879625d19..f1437d78e1 100644 --- a/hypothesis-python/src/hypothesis/_settings.py +++ b/hypothesis-python/src/hypothesis/_settings.py @@ -121,7 +121,7 @@ def __setattr__(cls, name, value): "settings with settings.load_profile, or use @settings(...) " "to decorate your test instead." ) - return type.__setattr__(cls, name, value) + return super().__setattr__(name, value) class settings(metaclass=settingsMeta): diff --git a/hypothesis-python/src/hypothesis/core.py b/hypothesis-python/src/hypothesis/core.py index 3b15b9d965..f9e124066d 100644 --- a/hypothesis-python/src/hypothesis/core.py +++ b/hypothesis-python/src/hypothesis/core.py @@ -226,7 +226,7 @@ def decode_failure(blob): class WithRunner(MappedSearchStrategy): def __init__(self, base, runner): assert runner is not None - MappedSearchStrategy.__init__(self, base) + super().__init__(base) self.runner = runner def do_draw(self, data): diff --git a/hypothesis-python/src/hypothesis/extra/_array_helpers.py b/hypothesis-python/src/hypothesis/extra/_array_helpers.py index c55f8dfd88..24f7f67164 100644 --- a/hypothesis-python/src/hypothesis/extra/_array_helpers.py +++ b/hypothesis-python/src/hypothesis/extra/_array_helpers.py @@ -503,7 +503,7 @@ def __init__( min_side=1, max_side=None, ): - st.SearchStrategy.__init__(self) + super().__init__() self.base_shape = base_shape self.side_strat = st.integers(min_side, max_side) self.num_shapes = num_shapes diff --git a/hypothesis-python/src/hypothesis/internal/conjecture/dfa/lstar.py b/hypothesis-python/src/hypothesis/internal/conjecture/dfa/lstar.py index 0bd0fd4ff9..99304d31a2 100644 --- a/hypothesis-python/src/hypothesis/internal/conjecture/dfa/lstar.py +++ b/hypothesis-python/src/hypothesis/internal/conjecture/dfa/lstar.py @@ -389,7 +389,7 @@ class LearnedDFA(DFA): distinguished by a membership test and a set of experiments.""" def __init__(self, lstar): - DFA.__init__(self) + super().__init__() self.__lstar = lstar self.__generation = lstar.generation diff --git a/hypothesis-python/src/hypothesis/stateful.py b/hypothesis-python/src/hypothesis/stateful.py index 558bf13046..69b6a35db5 100644 --- a/hypothesis-python/src/hypothesis/stateful.py +++ b/hypothesis-python/src/hypothesis/stateful.py @@ -233,7 +233,7 @@ def __setattr__(cls, name, value): "on the {cls} class." ).format(cls=cls.__name__, value=value) ) - return type.__setattr__(cls, name, value) + return super().__setattr__(name, value) class RuleBasedStateMachine(metaclass=StateMachineMeta): @@ -883,7 +883,7 @@ def invariant_wrapper(*args, **kwargs): class RuleStrategy(SearchStrategy): def __init__(self, machine): - SearchStrategy.__init__(self) + super().__init__() self.machine = machine self.rules = list(machine.rules()) diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/collections.py b/hypothesis-python/src/hypothesis/strategies/_internal/collections.py index 8d12d76ba4..efd506ce6b 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/collections.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/collections.py @@ -38,7 +38,7 @@ class TupleStrategy(SearchStrategy): strategies for each of their elements.""" def __init__(self, strategies): - SearchStrategy.__init__(self) + super().__init__() self.element_strategies = tuple(strategies) def do_validate(self): @@ -136,7 +136,7 @@ class ListStrategy(SearchStrategy): allowed lengths, and generates lists with the correct size and contents.""" def __init__(self, elements, min_size=0, max_size=float("inf")): - SearchStrategy.__init__(self) + super().__init__() self.min_size = min_size or 0 self.max_size = max_size if max_size is not None else float("inf") assert 0 <= self.min_size <= self.max_size diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/deferred.py b/hypothesis-python/src/hypothesis/strategies/_internal/deferred.py index dd637ee109..ebb84041a6 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/deferred.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/deferred.py @@ -24,7 +24,7 @@ class DeferredStrategy(SearchStrategy): """A strategy which may be used before it is fully defined.""" def __init__(self, definition): - SearchStrategy.__init__(self) + super().__init__() self.__wrapped_strategy = None self.__in_repr = False self.__definition = definition diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/lazy.py b/hypothesis-python/src/hypothesis/strategies/_internal/lazy.py index 0ff0326a49..aff1bce0df 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/lazy.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/lazy.py @@ -76,7 +76,7 @@ class LazyStrategy(SearchStrategy): """ def __init__(self, function, args, kwargs, filters=(), *, force_repr=None): - SearchStrategy.__init__(self) + super().__init__() self.__wrapped_strategy = None self.__representation = force_repr self.function = function diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/numbers.py b/hypothesis-python/src/hypothesis/strategies/_internal/numbers.py index 4ace1cf489..40eb427d99 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/numbers.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/numbers.py @@ -181,7 +181,7 @@ class FloatStrategy(SearchStrategy): """Generic superclass for strategies which produce floats.""" def __init__(self, allow_infinity, allow_nan, width): - SearchStrategy.__init__(self) + super().__init__() assert isinstance(allow_infinity, bool) assert isinstance(allow_nan, bool) assert width in (16, 32, 64) @@ -239,7 +239,7 @@ class FixedBoundedFloatStrategy(SearchStrategy): """ def __init__(self, lower_bound, upper_bound, width): - SearchStrategy.__init__(self) + super().__init__() assert isinstance(lower_bound, float) assert isinstance(upper_bound, float) assert 0 <= lower_bound < upper_bound diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/random.py b/hypothesis-python/src/hypothesis/strategies/_internal/random.py index 36552d0486..18fafd4b19 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/random.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/random.py @@ -190,7 +190,7 @@ class ArtificialRandom(HypothesisRandom): VERSION = 10 ** 6 def __init__(self, note_method_calls, data): - HypothesisRandom.__init__(self, note_method_calls=note_method_calls) + super().__init__(note_method_calls=note_method_calls) self.__data = data self.__state = RandomState() @@ -397,7 +397,7 @@ def convert_kwargs(name, kwargs): class TrueRandom(HypothesisRandom): def __init__(self, seed, note_method_calls): - HypothesisRandom.__init__(self, note_method_calls) + super().__init__(note_method_calls) self.__seed = seed self.__random = Random(seed) diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py b/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py index edfc582023..1fd64a0316 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py @@ -458,7 +458,7 @@ class SampledFromStrategy(SearchStrategy): """ def __init__(self, elements, repr_=None, transformations=()): - SearchStrategy.__init__(self) + super().__init__() self.elements = cu.check_sample(elements, "sampled_from") assert self.elements self.repr_ = repr_ @@ -592,7 +592,7 @@ class OneOfStrategy(SearchStrategy): """ def __init__(self, strategies): - SearchStrategy.__init__(self) + super().__init__() strategies = tuple(strategies) self.original_strategies = list(strategies) self.__element_strategies = None @@ -778,7 +778,7 @@ class MappedSearchStrategy(SearchStrategy): """ def __init__(self, strategy, pack=None): - SearchStrategy.__init__(self) + super().__init__() self.mapped_strategy = strategy if pack is not None: self.pack = pack diff --git a/hypothesis-python/src/hypothesis/vendor/pretty.py b/hypothesis-python/src/hypothesis/vendor/pretty.py index 61303ee20a..de0f9966d7 100644 --- a/hypothesis-python/src/hypothesis/vendor/pretty.py +++ b/hypothesis-python/src/hypothesis/vendor/pretty.py @@ -333,9 +333,7 @@ def __init__( max_seq_length=MAX_SEQ_LENGTH, ): - PrettyPrinter.__init__( - self, output, max_width, newline, max_seq_length=max_seq_length - ) + super().__init__(output, max_width, newline, max_seq_length=max_seq_length) self.verbose = verbose self.stack = [] if singleton_pprinters is None: diff --git a/hypothesis-python/tests/quality/test_poisoned_lists.py b/hypothesis-python/tests/quality/test_poisoned_lists.py index 26eed9b88d..5e2965a3b4 100644 --- a/hypothesis-python/tests/quality/test_poisoned_lists.py +++ b/hypothesis-python/tests/quality/test_poisoned_lists.py @@ -28,7 +28,7 @@ class Poisoned(SearchStrategy): def __init__(self, poison_chance): - SearchStrategy.__init__(self) + super().__init__() self.__poison_chance = poison_chance self.__ints = st.integers(0, 10) @@ -41,7 +41,7 @@ def do_draw(self, data): class LinearLists(SearchStrategy): def __init__(self, elements, size): - SearchStrategy.__init__(self) + super().__init__() self.__length = st.integers(0, size) self.__elements = elements @@ -51,7 +51,7 @@ def do_draw(self, data): class Matrices(SearchStrategy): def __init__(self, elements, size): - SearchStrategy.__init__(self) + super().__init__() self.__length = st.integers(0, ceil(size ** 0.5)) self.__elements = elements diff --git a/hypothesis-python/tests/quality/test_poisoned_trees.py b/hypothesis-python/tests/quality/test_poisoned_trees.py index 1750cd7364..05a9b93619 100644 --- a/hypothesis-python/tests/quality/test_poisoned_trees.py +++ b/hypothesis-python/tests/quality/test_poisoned_trees.py @@ -35,7 +35,7 @@ class PoisonedTree(SearchStrategy): """ def __init__(self, p): - SearchStrategy.__init__(self) + super().__init__() self.__p = p def do_draw(self, data): diff --git a/requirements/test.txt b/requirements/test.txt index 78dc5f7ec2..25f2499b68 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -33,7 +33,7 @@ pytest==6.2.5 # pytest-xdist pytest-forked==1.3.0 # via pytest-xdist -pytest-xdist==2.3.0 +pytest-xdist==2.4.0 # via -r requirements/test.in sortedcontainers==2.4.0 # via hypothesis (hypothesis-python/setup.py) diff --git a/requirements/tools.txt b/requirements/tools.txt index b9c73e5296..6eb47c336d 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -55,7 +55,7 @@ cryptography==3.4.8 # via secretstorage decorator==5.1.0 # via ipython -distlib==0.3.2 +distlib==0.3.3 # via virtualenv django==3.2.7 # via -r requirements/tools.in @@ -109,7 +109,7 @@ importlib-metadata==4.8.1 # twine iniconfig==1.1.1 # via pytest -ipython==7.27.0 +ipython==7.28.0 # via -r requirements/tools.in isort==5.9.3 # via shed @@ -125,7 +125,7 @@ keyring==23.2.1 # via twine lark-parser==0.12.0 # via -r requirements/tools.in -libcst==0.3.20 +libcst==0.3.21 # via # -r requirements/tools.in # pybetter @@ -161,11 +161,11 @@ pexpect==4.8.0 # via ipython pickleshare==0.7.5 # via ipython -pip-tools==6.2.0 +pip-tools==6.3.0 # via -r requirements/tools.in pkginfo==1.7.1 # via twine -platformdirs==2.3.0 +platformdirs==2.4.0 # via # black # virtualenv @@ -213,7 +213,7 @@ pytz==2021.1 # via # babel # django -pyupgrade==2.26.0.post1 +pyupgrade==2.28.0 # via shed pyyaml==5.4.1 # via @@ -221,7 +221,7 @@ pyyaml==5.4.1 # libcst readme-renderer==29.0 # via twine -regex==2021.8.28 +regex==2021.9.24 # via black requests==2.26.0 # via @@ -295,7 +295,7 @@ tomli==1.2.1 # pep517 tox==3.24.4 # via -r requirements/tools.in -tqdm==4.62.2 +tqdm==4.62.3 # via twine traitlets==5.1.0 # via @@ -320,9 +320,9 @@ typing-extensions==3.10.0.2 # typing-inspect typing-inspect==0.7.1 # via libcst -urllib3==1.26.6 +urllib3==1.26.7 # via requests -virtualenv==20.8.0 +virtualenv==20.8.1 # via tox wcwidth==0.2.5 # via prompt-toolkit