summaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-02-07 12:42:26 +0300
committerrobot-piglet <[email protected]>2026-02-07 13:00:33 +0300
commitfd4b948a009972919d011c150d84c7c435fe7498 (patch)
tree6032d1d79bfe666bfe1deacb730081dfb5c29835 /contrib/python/hypothesis
parent2d0e882ac842bee21342d074c495256884c5f2f6 (diff)
Intermediate changes
commit_hash:327c6343302ba4d7b00807c7cc877d4b3686c26b
Diffstat (limited to 'contrib/python/hypothesis')
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/core.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py30
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
6 files changed, 32 insertions, 8 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index e53518c5500..b0b617d56b8 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.150.2
+Version: 6.150.3
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/core.py b/contrib/python/hypothesis/py3/hypothesis/core.py
index d7d1b39e598..7c13af0a4eb 100644
--- a/contrib/python/hypothesis/py3/hypothesis/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/core.py
@@ -151,7 +151,7 @@ TestFunc = TypeVar("TestFunc", bound=Callable)
running_under_pytest = False
pytest_shows_exceptiongroups = True
global_force_seed = None
-# `threadlocal` stores "engine-global" constants, which are global relative to a
+# this variable stores "engine-global" constants, which are global relative to a
# ConjectureRunner instance (roughly speaking). Since only one conjecture runner
# instance can be active per thread, making engine constants thread-local prevents
# the ConjectureRunner instances of concurrent threads from treading on each other.
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
index f1feae0f5f3..14064ed985e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
@@ -126,6 +126,30 @@ CacheKeyT: TypeAlias = tuple[ChoiceTypeT, tuple[Any, ...]]
CacheValueT: TypeAlias = tuple[tuple["ConstantT", ...], tuple["ConstantT", ...]]
CONSTANTS_CACHE: LRUCache[CacheKeyT, CacheValueT] = LRUCache(1024)
+
+_constants_integers = (
+ # powers of 2
+ [2**n for n in range(16, 66)]
+ # powers of 10
+ + [10**n for n in range(5, 20)]
+ # factorials
+ + [math.factorial(n) for n in range(9, 21)]
+ # a few primorial numbers https://en.wikipedia.org/wiki/Primorial
+ + [
+ 510510,
+ 6469693230,
+ 304250263527210,
+ 32589158477190044730,
+ ]
+)
+_constants_integers.extend(
+ [n - 1 for n in _constants_integers] + [n + 1 for n in _constants_integers]
+)
+_constants_integers.extend([-x for x in _constants_integers])
+
+# arbitrary cutoffs to keep our list bounded
+assert all(50_000 <= abs(n) <= 2**66 for n in _constants_integers)
+
_constant_floats = (
[
0.5,
@@ -193,14 +217,14 @@ _constant_strings = {
"Ⱥ",
"Ⱦ",
# ligatures
- "æœÆŒffʤʨß"
+ "æœÆŒffʤʨß",
# emoticons
"(╯°□°)╯︵ ┻━┻)",
# emojis
"😍",
"🇺🇸",
# emoji modifiers
- "🏻" # U+1F3FB Light Skin Tone,
+ "🏻", # U+1F3FB Light Skin Tone,
"👍🏻", # 👍 followed by U+1F3FB
# RTL text
"الكل في المجمو عة",
@@ -234,7 +258,7 @@ _constant_strings = {
# we don't actually care what order the constants are sorted in, just that the
# ordering is deterministic.
GLOBAL_CONSTANTS = Constants(
- integers=SortedSet(),
+ integers=SortedSet(_constants_integers),
floats=SortedSet(_constant_floats, key=float_to_int),
bytes=SortedSet(),
strings=SortedSet(_constant_strings),
diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py b/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py
index 41315694d1e..5ca1fba3130 100644
--- a/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py
+++ b/contrib/python/hypothesis/py3/hypothesis/vendor/pretty.py
@@ -424,7 +424,7 @@ class RepresentationPrinter:
return self.text("<...>")
# Look up comments from slice_comments if we have arg_labels
comments = {}
- if arg_labels:
+ if arg_labels is not None:
for key, sr in arg_labels.items():
if sr in self.slice_comments:
comments[key] = self.slice_comments[sr]
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index f704b19fbd6..91bad19fb86 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, 150, 2)
+__version_info__ = (6, 150, 3)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index e3b2832f6ba..8e403e25d33 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.150.2)
+VERSION(6.150.3)
LICENSE(MPL-2.0)