aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-02-11 13:12:23 +0300
committerDaniil Cherednik <dcherednik@ydb.tech>2024-02-14 14:25:52 +0000
commit055aa7619a1d02399db47a08b64da91eb41b5479 (patch)
tree60606dc81489d4d04c376c4f1b5ca5f6fee470e7
parent0e78f7eecaeb4b2e9e2f8315b2f1638d1332aa1b (diff)
downloadydb-055aa7619a1d02399db47a08b64da91eb41b5479.tar.gz
Intermediate changes
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/extra/numpy.py14
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--contrib/tools/python/src/Modules/socketmodule.h12
5 files changed, 21 insertions, 11 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 135737b731..8338cfd8cc 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.97.0
+Version: 6.97.1
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/extra/numpy.py b/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
index 396b9498fe..29d73f76be 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
@@ -46,8 +46,14 @@ from hypothesis.internal.conjecture import utils as cu
from hypothesis.internal.coverage import check_function
from hypothesis.internal.reflection import proxies
from hypothesis.internal.validation import check_type
+from hypothesis.strategies._internal.lazy import unwrap_strategies
from hypothesis.strategies._internal.numbers import Real
-from hypothesis.strategies._internal.strategies import Ex, T, check_strategy
+from hypothesis.strategies._internal.strategies import (
+ Ex,
+ MappedSearchStrategy,
+ T,
+ check_strategy,
+)
from hypothesis.strategies._internal.utils import defines_strategy
@@ -393,7 +399,6 @@ class ArrayStrategy(st.SearchStrategy):
return result
-@check_function
def fill_for(elements, unique, fill, name=""):
if fill is None:
if unique or not elements.has_reusable_values:
@@ -508,6 +513,11 @@ def arrays(
)
elements = from_dtype(dtype, **(elements or {}))
check_strategy(elements, "elements")
+ # If there's a redundant cast to the requested dtype, remove it. This unlocks
+ # optimizations such as fast unique sampled_from, and saves some time directly too.
+ unwrapped = unwrap_strategies(elements)
+ if isinstance(unwrapped, MappedSearchStrategy) and unwrapped.pack == dtype.type:
+ elements = unwrapped.mapped_strategy
if isinstance(shape, int):
shape = (shape,)
shape = tuple(shape)
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 41fe61ff7e..81c33333c3 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, 97, 0)
+__version_info__ = (6, 97, 1)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 8be1df19a1..b2ecf2aa29 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.97.0)
+VERSION(6.97.1)
LICENSE(MPL-2.0)
diff --git a/contrib/tools/python/src/Modules/socketmodule.h b/contrib/tools/python/src/Modules/socketmodule.h
index d98e00e88d..1da06b1e3d 100644
--- a/contrib/tools/python/src/Modules/socketmodule.h
+++ b/contrib/tools/python/src/Modules/socketmodule.h
@@ -48,15 +48,15 @@ typedef int socklen_t;
#endif
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/rfcomm.h>
-#include <bluetooth/l2cap.h>
-#include <bluetooth/sco.h>
-#include <bluetooth/hci.h>
+#error #include <bluetooth/bluetooth.h>
+#error #include <bluetooth/rfcomm.h>
+#error #include <bluetooth/l2cap.h>
+#error #include <bluetooth/sco.h>
+#error #include <bluetooth/hci.h>
#endif
#ifdef HAVE_BLUETOOTH_H
-#include <bluetooth.h>
+#error #include <bluetooth.h>
#endif
#ifdef HAVE_NETPACKET_PACKET_H