summaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-03-03 13:00:38 +0300
committerrobot-piglet <[email protected]>2026-03-03 14:14:01 +0300
commit647ffd55bcd034ae03bc1a79ca161cb15726a5f6 (patch)
tree72dac290083c8e0daf8584c0385f344dddbd3fa7 /contrib/python/hypothesis
parent200fe48de75f260e5782b72768630c45b073c5bb (diff)
Intermediate changes
commit_hash:a49b8ace5a9e22d3cd94306ccdd59852480ee189
Diffstat (limited to 'contrib/python/hypothesis')
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py25
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt4
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
5 files changed, 21 insertions, 14 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index e56c788cefc..33587591b67 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.151.6
+Version: 6.151.8
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/internal/conjecture/providers.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
index f8e51a5d5d4..f2083381f0c 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/providers.py
@@ -18,7 +18,6 @@ from contextlib import AbstractContextManager, contextmanager
from functools import cached_property
from random import Random
from sys import float_info
-from types import ModuleType
from typing import (
TYPE_CHECKING,
Any,
@@ -274,7 +273,9 @@ _local_constants = Constants(
# are all modules, not necessarily local ones. This lets us quickly see which
# modules are new without an expensive path.resolve() or is_local_module_file
# cache lookup.
-_seen_modules: set[ModuleType] = set()
+# We track by module object when hashable, falling back to the module name
+# (str key in sys.modules) for unhashable entries like SimpleNamespace.
+_seen_modules: set = set()
_sys_modules_len: int | None = None
@@ -310,20 +311,28 @@ def _get_local_constants() -> Constants:
# careful: store sys.modules length when we first check to avoid race conditions
# with other threads loading a module before we set _sys_modules_len.
if (sys_modules_len := len(sys.modules)) != _sys_modules_len:
- # set(_seen_modules) shouldn't typically be required, but I have run into
- # a "set changed size during iteration" error here when running
- # test_provider_conformance_crosshair.
- new_modules = set(sys.modules.values()) - set(_seen_modules)
+ new_modules = []
+ for name, module in list(sys.modules.items()):
+ try:
+ seen = module in _seen_modules
+ except TypeError:
+ # unhashable module (e.g. SimpleNamespace); fall back to name
+ seen = name in _seen_modules
+ if not seen:
+ new_modules.append((name, module))
# Repeated SortedSet unions are expensive. Do the initial unions on a
# set(), then do a one-time union with _local_constants after.
new_constants = Constants()
- for module in new_modules:
+ for name, module in new_modules:
if (
module_file := getattr(module, "__file__", None)
) is not None and is_local_module_file(module_file):
new_constants |= constants_from_module(module)
+ try:
+ _seen_modules.add(module)
+ except TypeError:
+ _seen_modules.add(name)
_local_constants |= new_constants
- _seen_modules.update(new_modules)
_sys_modules_len = sys_modules_len
# if we add any new constant, invalidate the constant cache for permitted values.
diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
index 68d5ff94fa0..f15ce33c96e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
+++ b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
@@ -1,4 +1,4 @@
-# Version 2025111500, Last Updated Sat Nov 15 07:07:01 2025 UTC
+# Version 2026021400, Last Updated Sat Feb 14 07:07:01 2026 UTC
AAA
AARP
ABB
@@ -486,7 +486,6 @@ GODADDY
GOLD
GOLDPOINT
GOLF
-GOO
GOODYEAR
GOOG
GOOGLE
@@ -1250,7 +1249,6 @@ WINDOWS
WINE
WINNERS
WME
-WOLTERSKLUWER
WOODSIDE
WORK
WORKS
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 1c5134b3bbf..9dccf2fedc7 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, 151, 6)
+__version_info__ = (6, 151, 8)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 70049094848..c523e57783f 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.151.6)
+VERSION(6.151.8)
LICENSE(MPL-2.0)