aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis/py3
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-05-21 09:25:47 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-05-21 09:33:37 +0300
commit7e5f63a2ba51e97fdac0d7bda613ceeb97ff2a0c (patch)
tree0db17fe5d9519e6246f2a93374d028a78c671861 /contrib/python/hypothesis/py3
parentbc402660605527c438c819e4c94e49285f88f676 (diff)
downloadydb-7e5f63a2ba51e97fdac0d7bda613ceeb97ff2a0c.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/hypothesis/py3')
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/compat.py3
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/entropy.py11
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
5 files changed, 14 insertions, 6 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 784ab51a97..f405fc380f 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesis
-Version: 6.100.4
+Version: 6.100.5
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/compat.py b/contrib/python/hypothesis/py3/hypothesis/internal/compat.py
index f979a075c2..105ff8eb13 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/compat.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/compat.py
@@ -14,6 +14,7 @@ import dataclasses
import inspect
import platform
import sys
+import sysconfig
import typing
from functools import partial
from typing import Any, ForwardRef, List, Optional, get_args
@@ -43,6 +44,8 @@ else:
PYPY = platform.python_implementation() == "PyPy"
GRAALPY = platform.python_implementation() == "GraalVM"
WINDOWS = platform.system() == "Windows"
+# First defined in CPython 3.13, defaults to False
+FREE_THREADED_CPYTHON = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
def add_note(exc, note):
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py b/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
index 8715635462..6e4a30b99a 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
@@ -19,7 +19,7 @@ from weakref import WeakValueDictionary
import hypothesis.core
from hypothesis.errors import HypothesisWarning, InvalidArgument
-from hypothesis.internal.compat import GRAALPY, PYPY
+from hypothesis.internal.compat import FREE_THREADED_CPYTHON, GRAALPY, PYPY
if TYPE_CHECKING:
from typing import Protocol
@@ -116,7 +116,7 @@ def register_random(r: RandomLike) -> None:
return
if not (PYPY or GRAALPY): # pragma: no branch
- # PYPY and GRAALPY do not have `sys.getrefcount`
+ # PYPY and GRAALPY do not have `sys.getrefcount`.
gc.collect()
if not gc.get_referrers(r):
if sys.getrefcount(r) <= _PLATFORM_REF_COUNT:
@@ -127,7 +127,12 @@ def register_random(r: RandomLike) -> None:
"PRNG. See the docs for `register_random` for more "
"details."
)
- else:
+ elif not FREE_THREADED_CPYTHON:
+ # On CPython, check for the free-threaded build because
+ # gc.get_referrers() ignores objects with immortal refcounts
+ # and objects are immortalized in the Python 3.13
+ # free-threading implementation at runtime.
+
warnings.warn(
"It looks like `register_random` was passed an object that could "
"be garbage collected immediately after `register_random` creates "
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 05ca2c83b3..5040febc7d 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, 100, 4)
+__version_info__ = (6, 100, 5)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 420b273733..b5f51bc88f 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.100.4)
+VERSION(6.100.5)
LICENSE(MPL-2.0)