aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-03-26 08:35:41 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-03-26 08:44:51 +0300
commite3104bcb75be88c3a88960e4da09f122c5677639 (patch)
tree8850876bb1fc317028a21f83beb2be7362bab6e1 /contrib/python
parente2effc5652e2e258338c443dcb58abb050f725cb (diff)
downloadydb-e3104bcb75be88c3a88960e4da09f122c5677639.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/extra/numpy.py186
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py5
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
5 files changed, 192 insertions, 5 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index d1464866e4..e8d710ced7 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.99.2
+Version: 6.99.4
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 e8a9d3cb15..90ecb400b4 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
@@ -624,11 +624,61 @@ def dtype_factory(kind, sizes, valid_sizes, endianness):
return strat.map((endianness + kind).format)
+@overload
+@defines_dtype_strategy
+def unsigned_integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[8],
+) -> st.SearchStrategy["np.dtype[np.uint8]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def unsigned_integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[16],
+) -> st.SearchStrategy["np.dtype[np.uint16]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def unsigned_integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[32],
+) -> st.SearchStrategy["np.dtype[np.uint32]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def unsigned_integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[64],
+) -> st.SearchStrategy["np.dtype[np.uint64]"]: ...
+
+
+@overload
@defines_dtype_strategy
def unsigned_integer_dtypes(
*,
endianness: str = "?",
sizes: Sequence[Literal[8, 16, 32, 64]] = (8, 16, 32, 64),
+) -> st.SearchStrategy["np.dtype[np.unsignedinteger[Any]]"]: ...
+
+
+@defines_dtype_strategy
+def unsigned_integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Union[Literal[8, 16, 32, 64], Sequence[Literal[8, 16, 32, 64]]] = (
+ 8,
+ 16,
+ 32,
+ 64,
+ ),
) -> st.SearchStrategy["np.dtype[np.unsignedinteger[Any]]"]:
"""Return a strategy for unsigned integer dtypes.
@@ -642,11 +692,61 @@ def unsigned_integer_dtypes(
return dtype_factory("u", sizes, (8, 16, 32, 64), endianness)
+@overload
+@defines_dtype_strategy
+def integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[8],
+) -> st.SearchStrategy["np.dtype[np.int8]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[16],
+) -> st.SearchStrategy["np.dtype[np.int16]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[32],
+) -> st.SearchStrategy["np.dtype[np.int32]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[64],
+) -> st.SearchStrategy["np.dtype[np.int64]"]: ...
+
+
+@overload
@defines_dtype_strategy
def integer_dtypes(
*,
endianness: str = "?",
sizes: Sequence[Literal[8, 16, 32, 64]] = (8, 16, 32, 64),
+) -> st.SearchStrategy["np.dtype[np.signedinteger[Any]]"]: ...
+
+
+@defines_dtype_strategy
+def integer_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Union[Literal[8, 16, 32, 64], Sequence[Literal[8, 16, 32, 64]]] = (
+ 8,
+ 16,
+ 32,
+ 64,
+ ),
) -> st.SearchStrategy["np.dtype[np.signedinteger[Any]]"]:
"""Return a strategy for signed integer dtypes.
@@ -656,11 +756,58 @@ def integer_dtypes(
return dtype_factory("i", sizes, (8, 16, 32, 64), endianness)
+@overload
+@defines_dtype_strategy
+def floating_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[16],
+) -> st.SearchStrategy["np.dtype[np.float16]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def floating_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[32],
+) -> st.SearchStrategy["np.dtype[np.float32]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def floating_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[64],
+) -> st.SearchStrategy["np.dtype[np.float64]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def floating_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[128],
+) -> st.SearchStrategy["np.dtype[np.float128]"]: ...
+
+
+@overload
@defines_dtype_strategy
def floating_dtypes(
*,
endianness: str = "?",
sizes: Sequence[Literal[16, 32, 64, 96, 128]] = (16, 32, 64),
+) -> st.SearchStrategy["np.dtype[np.floating[Any]]"]: ...
+
+
+@defines_dtype_strategy
+def floating_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Union[
+ Literal[16, 32, 64, 96, 128], Sequence[Literal[16, 32, 64, 96, 128]]
+ ] = (16, 32, 64),
) -> st.SearchStrategy["np.dtype[np.floating[Any]]"]:
"""Return a strategy for floating-point dtypes.
@@ -674,11 +821,50 @@ def floating_dtypes(
return dtype_factory("f", sizes, (16, 32, 64, 96, 128), endianness)
+@overload
+@defines_dtype_strategy
+def complex_number_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[64],
+) -> st.SearchStrategy["np.dtype[np.complex64]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def complex_number_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[128],
+) -> st.SearchStrategy["np.dtype[np.complex128]"]: ...
+
+
+@overload
+@defines_dtype_strategy
+def complex_number_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Literal[256],
+) -> st.SearchStrategy["np.dtype[np.complex256]"]: ...
+
+
+@overload
@defines_dtype_strategy
def complex_number_dtypes(
*,
endianness: str = "?",
sizes: Sequence[Literal[64, 128, 192, 256]] = (64, 128),
+) -> st.SearchStrategy["np.dtype[np.complexfloating[Any, Any]]"]: ...
+
+
+@defines_dtype_strategy
+def complex_number_dtypes(
+ *,
+ endianness: str = "?",
+ sizes: Union[Literal[64, 128, 192, 256], Sequence[Literal[64, 128, 192, 256]]] = (
+ 64,
+ 128,
+ ),
) -> st.SearchStrategy["np.dtype[np.complexfloating[Any, Any]]"]:
"""Return a strategy for complex-number dtypes.
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
index d8d6be91ae..448f7e51ac 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/strategies.py
@@ -52,12 +52,13 @@ from hypothesis.internal.reflection import (
from hypothesis.strategies._internal.utils import defines_strategy
from hypothesis.utils.conventions import UniqueIdentifier
-if sys.version_info >= (3, 13):
+# TODO: Use `(3, 13)` once Python 3.13 is released.
+if sys.version_info >= (3, 13, 0, "final"):
Ex = TypeVar("Ex", covariant=True, default=Any)
elif TYPE_CHECKING:
from typing_extensions import TypeVar # type: ignore[assignment]
- Ex = TypeVar("Ex", covariant=True, default=Any)
+ Ex = TypeVar("Ex", covariant=True, default=Any) # type: ignore[call-arg,misc]
else:
Ex = TypeVar("Ex", covariant=True)
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 3b606ab7d4..2b269394e5 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, 99, 2)
+__version_info__ = (6, 99, 4)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 0e3245c527..d365120737 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.99.2)
+VERSION(6.99.4)
LICENSE(MPL-2.0)