aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-06-06 09:56:42 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-06-06 10:05:35 +0300
commitcaa721da15eab69ba0c5eae383d494627ff115f5 (patch)
treea92dcdb254b2688950c2215bcd33e7dbfac39911 /contrib
parentf44820822073337ca895dee0ce177e5cf40260df (diff)
downloadydb-caa721da15eab69ba0c5eae383d494627ff115f5.tar.gz
Intermediate changes
Diffstat (limited to 'contrib')
-rw-r--r--contrib/python/clickhouse-connect/.dist-info/METADATA2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/__version__.py2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/driver/npquery.py5
-rw-r--r--contrib/python/clickhouse-connect/ya.make2
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA6
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/extra/ghostwriter.py96
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/strategies/_internal/types.py16
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--contrib/python/zope.interface/py3/.dist-info/METADATA12
-rw-r--r--contrib/python/zope.interface/py3/ya.make2
11 files changed, 93 insertions, 54 deletions
diff --git a/contrib/python/clickhouse-connect/.dist-info/METADATA b/contrib/python/clickhouse-connect/.dist-info/METADATA
index 725bcd5664f..22f18e5bad0 100644
--- a/contrib/python/clickhouse-connect/.dist-info/METADATA
+++ b/contrib/python/clickhouse-connect/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: clickhouse-connect
-Version: 0.7.9
+Version: 0.7.10
Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
Home-page: https://github.com/ClickHouse/clickhouse-connect
Author: ClickHouse Inc.
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
index bebdf7d0bcb..484aed06984 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
@@ -1 +1 @@
-version = '0.7.9'
+version = '0.7.10'
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/npquery.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/npquery.py
index 70fd455c349..76cd0c4ee03 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/npquery.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/npquery.py
@@ -101,8 +101,9 @@ class NumpyResult(Closable):
chains = [chain(b) for b in zip(*bg)]
new_df_series = []
for c in chains:
- new_df_series.append(pd.concat([pd.Series(piece, copy=False) for piece in c if len(piece) > 0],
- copy=False, ignore_index=True))
+ series = [pd.Series(piece, copy=False) for piece in c if len(piece) > 0]
+ if len(series) > 0:
+ new_df_series.append(pd.concat(series, copy=False, ignore_index=True))
self._df_result = pd.DataFrame(dict(zip(self.column_names, new_df_series)))
self.close()
return self
diff --git a/contrib/python/clickhouse-connect/ya.make b/contrib/python/clickhouse-connect/ya.make
index 562b734db02..b2c10dbad51 100644
--- a/contrib/python/clickhouse-connect/ya.make
+++ b/contrib/python/clickhouse-connect/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(0.7.9)
+VERSION(0.7.10)
LICENSE(Apache-2.0)
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 31be46f1d40..2fd0b3adc1b 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.102.4
+Version: 6.102.5
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
@@ -44,7 +44,7 @@ Requires-Dist: click >=7.0 ; extra == 'all'
Requires-Dist: crosshair-tool >=0.0.54 ; extra == 'all'
Requires-Dist: django >=3.2 ; extra == 'all'
Requires-Dist: dpcontracts >=0.4 ; extra == 'all'
-Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'all'
+Requires-Dist: hypothesis-crosshair >=0.0.4 ; extra == 'all'
Requires-Dist: lark >=0.10.1 ; extra == 'all'
Requires-Dist: libcst >=0.3.16 ; extra == 'all'
Requires-Dist: numpy >=1.17.3 ; extra == 'all'
@@ -63,7 +63,7 @@ Requires-Dist: rich >=9.0.0 ; extra == 'cli'
Provides-Extra: codemods
Requires-Dist: libcst >=0.3.16 ; extra == 'codemods'
Provides-Extra: crosshair
-Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'crosshair'
+Requires-Dist: hypothesis-crosshair >=0.0.4 ; extra == 'crosshair'
Requires-Dist: crosshair-tool >=0.0.54 ; extra == 'crosshair'
Provides-Extra: dateutil
Requires-Dist: python-dateutil >=1.4 ; extra == 'dateutil'
diff --git a/contrib/python/hypothesis/py3/hypothesis/extra/ghostwriter.py b/contrib/python/hypothesis/py3/hypothesis/extra/ghostwriter.py
index 2854b48c299..0c4a5d85234 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/ghostwriter.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/ghostwriter.py
@@ -452,54 +452,72 @@ def _guess_strategy_by_argname(name: str) -> st.SearchStrategy:
return st.nothing()
+def _get_params_builtin_fn(func: Callable) -> List[inspect.Parameter]:
+ if (
+ isinstance(func, (types.BuiltinFunctionType, types.BuiltinMethodType))
+ and hasattr(func, "__doc__")
+ and isinstance(func.__doc__, str)
+ ):
+ # inspect.signature doesn't work on all builtin functions or methods.
+ # In such cases, we can try to reconstruct simple signatures from the docstring.
+ match = re.match(rf"^{func.__name__}\((.+?)\)", func.__doc__)
+ if match is None:
+ return []
+ args = match.group(1).replace("[", "").replace("]", "")
+ params = []
+ # Even if the signature doesn't contain a /, we assume that arguments
+ # are positional-only until shown otherwise - the / is often omitted.
+ kind: inspect._ParameterKind = inspect.Parameter.POSITIONAL_ONLY
+ for arg in args.split(", "):
+ arg, *_ = arg.partition("=")
+ arg = arg.strip()
+ if arg == "/":
+ kind = inspect.Parameter.POSITIONAL_OR_KEYWORD
+ continue
+ if arg.startswith("*") or arg == "...":
+ kind = inspect.Parameter.KEYWORD_ONLY
+ continue # we omit *varargs, if there are any
+ if _iskeyword(arg.lstrip("*")) or not arg.lstrip("*").isidentifier():
+ break # skip all subsequent params if this name is invalid
+ params.append(inspect.Parameter(name=arg, kind=kind))
+ return params
+ return []
+
+
+def _get_params_ufunc(func: Callable) -> List[inspect.Parameter]:
+ if _is_probably_ufunc(func):
+ # `inspect.signature` results vary for ufunc objects, but we can work out
+ # what the required parameters would look like if it was reliable.
+ # Note that we use args named a, b, c... to match the `operator` module,
+ # rather than x1, x2, x3... like the Numpy docs. Because they're pos-only
+ # this doesn't make a runtime difference, and it's much nicer for use-cases
+ # like `equivalent(numpy.add, operator.add)`.
+ return [
+ inspect.Parameter(name=name, kind=inspect.Parameter.POSITIONAL_ONLY)
+ for name in ascii_lowercase[: func.nin] # type: ignore
+ ]
+ return []
+
+
def _get_params(func: Callable) -> Dict[str, inspect.Parameter]:
"""Get non-vararg parameters of `func` as an ordered dict."""
try:
params = list(get_signature(func).parameters.values())
except Exception:
- if (
- isinstance(func, (types.BuiltinFunctionType, types.BuiltinMethodType))
- and hasattr(func, "__doc__")
- and isinstance(func.__doc__, str)
- ):
- # inspect.signature doesn't work on all builtin functions or methods.
- # In such cases, we can try to reconstruct simple signatures from the docstring.
- match = re.match(rf"^{func.__name__}\((.+?)\)", func.__doc__)
- if match is None:
- raise
- args = match.group(1).replace("[", "").replace("]", "")
- params = []
- # Even if the signature doesn't contain a /, we assume that arguments
- # are positional-only until shown otherwise - the / is often omitted.
- kind: inspect._ParameterKind = inspect.Parameter.POSITIONAL_ONLY
- for arg in args.split(", "):
- arg, *_ = arg.partition("=")
- arg = arg.strip()
- if arg == "/":
- kind = inspect.Parameter.POSITIONAL_OR_KEYWORD
- continue
- if arg.startswith("*") or arg == "...":
- kind = inspect.Parameter.KEYWORD_ONLY
- continue # we omit *varargs, if there are any
- if _iskeyword(arg.lstrip("*")) or not arg.lstrip("*").isidentifier():
- break # skip all subsequent params if this name is invalid
- params.append(inspect.Parameter(name=arg, kind=kind))
-
- elif _is_probably_ufunc(func):
- # `inspect.signature` doesn't work on ufunc objects, but we can work out
- # what the required parameters would look like if it did.
- # Note that we use args named a, b, c... to match the `operator` module,
- # rather than x1, x2, x3... like the Numpy docs. Because they're pos-only
- # this doesn't make a runtime difference, and it's much nicer for use-cases
- # like `equivalent(numpy.add, operator.add)`.
- params = [
- inspect.Parameter(name=name, kind=inspect.Parameter.POSITIONAL_ONLY)
- for name in ascii_lowercase[: func.nin] # type: ignore
- ]
+ if params := _get_params_ufunc(func):
+ pass
+ elif params := _get_params_builtin_fn(func):
+ pass
else:
# If we haven't managed to recover a signature through the tricks above,
# we're out of ideas and should just re-raise the exception.
raise
+ else:
+ # If the params we got look like an uninformative placeholder, try fallbacks.
+ P = inspect.Parameter
+ placeholder = [("args", P.VAR_POSITIONAL), ("kwargs", P.VAR_KEYWORD)]
+ if [(p.name, p.kind) for p in params] == placeholder:
+ params = _get_params_ufunc(func) or _get_params_builtin_fn(func) or params
return _params_to_dict(params)
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/types.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/types.py
index 46c4339faba..11e6aa381bc 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/types.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/types.py
@@ -388,7 +388,12 @@ def is_generic_type(type_):
)
-def _try_import_forward_ref(thing, bound): # pragma: no cover
+__EVAL_TYPE_TAKES_TYPE_PARAMS = (
+ "type_params" in inspect.signature(typing._eval_type).parameters # type: ignore
+)
+
+
+def _try_import_forward_ref(thing, bound, *, type_params): # pragma: no cover
"""
Tries to import a real bound type from ``TypeVar`` bound to a ``ForwardRef``.
@@ -397,7 +402,10 @@ def _try_import_forward_ref(thing, bound): # pragma: no cover
because we can only cover each path in a separate python version.
"""
try:
- return typing._eval_type(bound, vars(sys.modules[thing.__module__]), None)
+ kw = {"globalns": vars(sys.modules[thing.__module__]), "localns": None}
+ if __EVAL_TYPE_TAKES_TYPE_PARAMS:
+ kw["type_params"] = type_params
+ return typing._eval_type(bound, **kw)
except (KeyError, AttributeError, NameError):
# We fallback to `ForwardRef` instance, you can register it as a type as well:
# >>> from typing import ForwardRef
@@ -1030,7 +1038,9 @@ def resolve_TypeVar(thing):
if getattr(thing, "__bound__", None) is not None:
bound = thing.__bound__
if isinstance(bound, typing.ForwardRef):
- bound = _try_import_forward_ref(thing, bound)
+ # TODO: on Python 3.13 and later, we should work out what type_params
+ # could be part of this type, and pass them in here.
+ bound = _try_import_forward_ref(thing, bound, type_params=())
strat = unwrap_strategies(st.from_type(bound))
if not isinstance(strat, OneOfStrategy):
return strat
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 6f39e34255e..4bc7530118d 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, 102, 4)
+__version_info__ = (6, 102, 5)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index f2c0ffc9564..7df369619bb 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.102.4)
+VERSION(6.102.5)
LICENSE(MPL-2.0)
diff --git a/contrib/python/zope.interface/py3/.dist-info/METADATA b/contrib/python/zope.interface/py3/.dist-info/METADATA
index 50651bb9eba..40111270bf8 100644
--- a/contrib/python/zope.interface/py3/.dist-info/METADATA
+++ b/contrib/python/zope.interface/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.interface
-Version: 6.4
+Version: 6.4.post0
Summary: Interfaces for Python
Home-page: https://github.com/zopefoundation/zope.interface
Author: Zope Foundation and Contributors
@@ -75,6 +75,16 @@ For detailed documentation, please see https://zopeinterface.readthedocs.io/en/l
Changes
=========
+6.4.post0 (2024-05-22)
+======================
+
+- The sdist of version 6.4 was uploaded to PyPI as
+ ``zope_interface-6.4.tar.gz`` instead of ``zope.interface-6.4-py2.tar.gz``
+ which cannot be installed by ``zc.buildout``. This release is a re-release
+ of version 6.4 with the correct sdist name.
+ (`#298 <https://github.com/zopefoundation/zope.interface/issues/298>`)
+
+
6.4 (2024-05-15)
================
diff --git a/contrib/python/zope.interface/py3/ya.make b/contrib/python/zope.interface/py3/ya.make
index a7510871163..1556a4768ee 100644
--- a/contrib/python/zope.interface/py3/ya.make
+++ b/contrib/python/zope.interface/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.4)
+VERSION(6.4.post0)
LICENSE(ZPL-2.1)