summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu-msan/release/libcryptography_rust.abin0 -> 40253102 bytes
-rw-r--r--contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu/release/libcryptography_rust.abin0 -> 22998814 bytes
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py7
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py8
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/shrinking/common.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/provisional.py6
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py7
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py21
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
12 files changed, 38 insertions, 21 deletions
diff --git a/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu-msan/release/libcryptography_rust.a b/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu-msan/release/libcryptography_rust.a
new file mode 100644
index 00000000000..f6633d1fa41
--- /dev/null
+++ b/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu-msan/release/libcryptography_rust.a
Binary files differ
diff --git a/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu/release/libcryptography_rust.a b/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu/release/libcryptography_rust.a
new file mode 100644
index 00000000000..0dce7e79324
--- /dev/null
+++ b/contrib/python/cryptography/next/rust/a/x86_64-unknown-linux-gnu/release/libcryptography_rust.a
Binary files differ
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 2efad59a484..06868944059 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: hypothesis
-Version: 6.155.3
+Version: 6.155.7
Summary: The property-based testing library for Python
Author-email: "David R. MacIver and Zac Hatfield-Dodds" <[email protected]>
License-Expression: MPL-2.0
diff --git a/contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py b/contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py
index 2a5ae3915a4..598611fc1d8 100644
--- a/contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py
+++ b/contrib/python/hypothesis/py3/_hypothesis_ftz_detector.py
@@ -156,4 +156,4 @@ if __name__ == "__main__":
# change the last element of key from `name` to `-len(name)` so that we check
# grequests before gevent.
# KNOWN_EVER_CULPRITS = [c for c in KNOWN_EVER_CULPRITS if c != "gevent"]
- print(identify_ftz_culprits())
+ print(identify_ftz_culprits()) # noqa: T201
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
index f05b8201376..753d3f885f0 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
@@ -717,10 +717,9 @@ class ConjectureData:
self.start_span(TOP_LABEL)
def __repr__(self) -> str:
- return "ConjectureData(%s, %d choices%s)" % (
- self.status.name,
- len(self.nodes),
- ", frozen" if self.frozen else "",
+ return (
+ f"ConjectureData({self.status.name}, {len(self.nodes)} "
+ f"choices{', frozen' if self.frozen else ''})"
)
@property
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
index 0463b9b9b09..cbfbaa74ec0 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/junkdrawer.py
@@ -381,10 +381,10 @@ class ensure_free_stackframes:
# is happening and it's hard to imagine an
# intentionally-deeply-recursive use of this code.
assert cur_depth <= 1000, (
- "Hypothesis would usually add %d to the stack depth of %d here, "
- "but we are already much deeper than expected. Aborting now, to "
- "avoid extending the stack limit in an infinite loop..."
- % (self.new_limit - self.old_limit, self.old_limit)
+ f"Hypothesis would usually add {self.new_limit - self.old_limit} to "
+ f"the stack depth of {self.old_limit} here, but we are already much "
+ "deeper than expected. Aborting now, to avoid extending the stack "
+ "limit in an infinite loop..."
)
try:
_stackframe_limiter.enter_context(
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/shrinking/common.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/shrinking/common.py
index 5bf746d2929..633b99ac5e5 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/shrinking/common.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/shrinking/common.py
@@ -77,7 +77,7 @@ class Shrinker:
def debug(self, *args: object) -> None:
if self.debugging_enabled:
- print("DEBUG", self, *args)
+ print("DEBUG", self, *args) # noqa: T201
@classmethod
def shrink(cls, initial, predicate, **kwargs):
diff --git a/contrib/python/hypothesis/py3/hypothesis/provisional.py b/contrib/python/hypothesis/py3/hypothesis/provisional.py
index d5b5e07910d..6786205a040 100644
--- a/contrib/python/hypothesis/py3/hypothesis/provisional.py
+++ b/contrib/python/hypothesis/py3/hypothesis/provisional.py
@@ -106,8 +106,10 @@ class DomainNameStrategy(st.SearchStrategy[str]):
label_regex = r"[a-zA-Z][a-zA-Z0-9]?"
else:
maximum_center_character_pattern_repetitions = self.max_element_length - 2
- label_regex = r"[a-zA-Z]([a-zA-Z0-9\-]{0,%d}[a-zA-Z0-9])?" % (
- maximum_center_character_pattern_repetitions,
+ label_regex = (
+ r"[a-zA-Z]([a-zA-Z0-9\-]{0,"
+ f"{maximum_center_character_pattern_repetitions}"
+ r"}[a-zA-Z0-9])?"
)
# Construct reusable strategies here to avoid a performance hit by doing
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
index c5e8bfaaf5c..abbe3952e42 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
@@ -320,7 +320,6 @@ class DateStrategy(SearchStrategy):
}[condition.func]
lo = max(lo, self.min_value)
hi = min(hi, self.max_value)
- print(lo, hi)
if hi < lo:
return nothing()
if lo <= self.min_value and self.max_value <= hi:
@@ -342,6 +341,12 @@ def dates(
"""
check_type(dt.date, min_value, "min_value")
check_type(dt.date, max_value, "max_value")
+ # datetime is a subclass of date, so check_type() accepts it - but a datetime
+ # bound is almost certainly a mistake, and breaks our drawing logic downstream.
+ if isinstance(min_value, dt.datetime):
+ raise InvalidArgument(f"{min_value=} is a datetime, but expected a date")
+ if isinstance(max_value, dt.datetime):
+ raise InvalidArgument(f"{max_value=} is a datetime, but expected a date")
check_valid_interval(min_value, max_value, "min_value", "max_value")
if min_value == max_value:
return just(min_value)
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
index f2ff62bfd66..8ca1efdad7a 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
@@ -111,14 +111,14 @@ def recursive_property(strategy: "SearchStrategy", name: str, default: object) -
calculation = "calc_" + name
force_key = "force_" + name
- def forced_value(target: SearchStrategy) -> Any:
+ def forced_or_cached_value(target: SearchStrategy) -> Any:
try:
return getattr(target, force_key)
except AttributeError:
return getattr(target, cache_key)
try:
- return forced_value(strategy)
+ return forced_or_cached_value(strategy)
except AttributeError:
pass
@@ -133,7 +133,7 @@ def recursive_property(strategy: "SearchStrategy", name: str, default: object) -
def recur(strat: SearchStrategy) -> Any:
nonlocal hit_recursion
try:
- return forced_value(strat)
+ return forced_or_cached_value(strat)
except AttributeError:
pass
result = mapping.get(strat, sentinel)
@@ -169,7 +169,7 @@ def recursive_property(strategy: "SearchStrategy", name: str, default: object) -
def recur2(strat: SearchStrategy) -> Any:
def recur_inner(other: SearchStrategy) -> Any:
try:
- return forced_value(other)
+ return forced_or_cached_value(other)
except AttributeError:
pass
listeners[other].add(strat)
@@ -216,7 +216,18 @@ def recursive_property(strategy: "SearchStrategy", name: str, default: object) -
# them (not just the strategy we started out with).
for k, v in mapping.items():
setattr(k, cache_key, v)
- return getattr(strategy, cache_key)
+ # This used to simply be `getattr(strategy, cache_key)`. That relied on the invariant
+ # that our loop above has set `strategy.cached_* = v` on `strategy` if we've reached
+ # here. However, under threading, this is not necessarily true. If a concurrent thread
+ # sets `strategy.force_* = v` in between the two places we check for `force_*`, we
+ # will not set `strategy.cached_*`.
+ #
+ # There are several places where we might do this. unwrap_strategies sets
+ # force_has_reusable_values = True. our numpy.py's `arrays` strategy also does.
+ #
+ # We guard against this in general by checking the forced and cached values here,
+ # rather than just the cached value.
+ return forced_or_cached_value(strategy)
class SearchStrategy(Generic[Ex]):
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 175cbc5c08a..d3958495d7e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
-__version_info__ = (6, 155, 3)
+__version_info__ = (6, 155, 7)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 8ab046f972a..9ab28f47105 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.155.3)
+VERSION(6.155.7)
LICENSE(MPL-2.0)