aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-07-10 09:04:03 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-07-10 09:14:17 +0300
commit4df3e22156bd8dc3401baf0ad2104a66e945e11f (patch)
tree5bcc4fd99a454598532e3bf29436b21f68466cb5
parente16b329fb8d258f106d4f5345195d1fba93cf09c (diff)
downloadydb-4df3e22156bd8dc3401baf0ad2104a66e945e11f.tar.gz
Intermediate changes
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/core.py9
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/database.py25
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/entropy.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/stateful.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
-rw-r--r--contrib/python/importlib-metadata/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py23
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/_adapters.py23
-rw-r--r--contrib/python/importlib-metadata/py3/ya.make2
11 files changed, 34 insertions, 60 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index cd866b19e8..71e941b0c8 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.104.0
+Version: 6.104.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/core.py b/contrib/python/hypothesis/py3/hypothesis/core.py
index 759d9b5afc..c2767421cb 100644
--- a/contrib/python/hypothesis/py3/hypothesis/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/core.py
@@ -1104,12 +1104,11 @@ class StateForActualGivenExecution:
if TESTCASE_CALLBACKS:
if runner := getattr(self, "_runner", None):
phase = runner._current_phase
- elif (
- self.failed_normally or self.failed_due_to_deadline
- ): # pragma: no cover # FIXME
- phase = "shrink"
else: # pragma: no cover # in case of messing with internals
- phase = "unknown"
+ if self.failed_normally or self.failed_due_to_deadline:
+ phase = "shrink"
+ else:
+ phase = "unknown"
backend_desc = f", using backend={self.settings.backend!r}" * (
self.settings.backend != "hypothesis"
and not getattr(runner, "_switch_to_hypothesis_provider", False)
diff --git a/contrib/python/hypothesis/py3/hypothesis/database.py b/contrib/python/hypothesis/py3/hypothesis/database.py
index f584f08e1a..72b015ce9e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/database.py
+++ b/contrib/python/hypothesis/py3/hypothesis/database.py
@@ -225,17 +225,20 @@ class DirectoryBasedExampleDatabase(ExampleDatabase):
# Note: we attempt to create the dir in question now. We
# already checked for permissions, but there can still be other issues,
# e.g. the disk is full, or permissions might have been changed.
- self._key_path(key).mkdir(exist_ok=True, parents=True)
- path = self._value_path(key, value)
- if not path.exists():
- suffix = binascii.hexlify(os.urandom(16)).decode("ascii")
- tmpname = path.with_suffix(f"{path.suffix}.{suffix}")
- tmpname.write_bytes(value)
- try:
- tmpname.rename(path)
- except OSError: # pragma: no cover
- tmpname.unlink()
- assert not tmpname.exists()
+ try:
+ self._key_path(key).mkdir(exist_ok=True, parents=True)
+ path = self._value_path(key, value)
+ if not path.exists():
+ suffix = binascii.hexlify(os.urandom(16)).decode("ascii")
+ tmpname = path.with_suffix(f"{path.suffix}.{suffix}")
+ tmpname.write_bytes(value)
+ try:
+ tmpname.rename(path)
+ except OSError: # pragma: no cover
+ tmpname.unlink()
+ assert not tmpname.exists()
+ except OSError: # pragma: no cover
+ pass
def move(self, src: bytes, dest: bytes, value: bytes) -> None:
if src == dest:
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py b/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
index eedd5919dc..fe7d3f8347 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/entropy.py
@@ -127,7 +127,7 @@ def register_random(r: RandomLike) -> None:
"PRNG. See the docs for `register_random` for more "
"details."
)
- elif not FREE_THREADED_CPYTHON: # pragma: no cover # FIXME
+ elif not FREE_THREADED_CPYTHON: # pragma: no branch
# 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
diff --git a/contrib/python/hypothesis/py3/hypothesis/stateful.py b/contrib/python/hypothesis/py3/hypothesis/stateful.py
index 0cdf33dd38..067d9c77c6 100644
--- a/contrib/python/hypothesis/py3/hypothesis/stateful.py
+++ b/contrib/python/hypothesis/py3/hypothesis/stateful.py
@@ -388,7 +388,7 @@ class RuleBasedStateMachine(metaclass=StateMachineMeta):
for target in targets:
name = self._new_name(target)
- def printer(obj, p, cycle, name=name): # pragma: no cover # FIXME
+ def printer(obj, p, cycle, name=name):
return p.text(name)
self.__printer.singleton_pprinters.setdefault(id(result), printer)
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index fff67d6291..ec253b11e5 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, 104, 0)
+__version_info__ = (6, 104, 1)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 8bd9ebb97a..1999325709 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.104.0)
+VERSION(6.104.1)
LICENSE(MPL-2.0)
diff --git a/contrib/python/importlib-metadata/py3/.dist-info/METADATA b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
index ed13bc60a6..d7dd4a31a2 100644
--- a/contrib/python/importlib-metadata/py3/.dist-info/METADATA
+++ b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib_metadata
-Version: 7.2.1
+Version: 8.0.0
Summary: Read metadata from Python packages
Author-email: "Jason R. Coombs" <jaraco@jaraco.com>
Project-URL: Source, https://github.com/python/importlib_metadata
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
index 579b9ce591..6147ca9f5e 100644
--- a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
@@ -11,7 +11,6 @@ import inspect
import pathlib
import operator
import textwrap
-import warnings
import functools
import itertools
import posixpath
@@ -339,27 +338,7 @@ class FileHash:
return f'<FileHash mode: {self.mode} value: {self.value}>'
-class DeprecatedNonAbstract:
- # Required until Python 3.14
- def __new__(cls, *args, **kwargs):
- all_names = {
- name for subclass in inspect.getmro(cls) for name in vars(subclass)
- }
- abstract = {
- name
- for name in all_names
- if getattr(getattr(cls, name), '__isabstractmethod__', False)
- }
- if abstract:
- warnings.warn(
- f"Unimplemented abstract methods {abstract}",
- DeprecationWarning,
- stacklevel=2,
- )
- return super().__new__(cls)
-
-
-class Distribution(DeprecatedNonAbstract):
+class Distribution(metaclass=abc.ABCMeta):
"""
An abstract Python distribution package.
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/_adapters.py b/contrib/python/importlib-metadata/py3/importlib_metadata/_adapters.py
index 120e43a048..6223263ed5 100644
--- a/contrib/python/importlib-metadata/py3/importlib_metadata/_adapters.py
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/_adapters.py
@@ -1,20 +1,8 @@
-import functools
-import warnings
import re
import textwrap
import email.message
from ._text import FoldedCase
-from ._compat import pypy_partial
-
-
-# Do not remove prior to 2024-01-01 or Python 3.14
-_warn = functools.partial(
- warnings.warn,
- "Implicit None on return values is deprecated and will raise KeyErrors.",
- DeprecationWarning,
- stacklevel=pypy_partial(2),
-)
class Message(email.message.Message):
@@ -53,12 +41,17 @@ class Message(email.message.Message):
def __getitem__(self, item):
"""
- Warn users that a ``KeyError`` can be expected when a
- missing key is supplied. Ref python/importlib_metadata#371.
+ Override parent behavior to typical dict behavior.
+
+ ``email.message.Message`` will emit None values for missing
+ keys. Typical mappings, including this ``Message``, will raise
+ a key error for missing keys.
+
+ Ref python/importlib_metadata#371.
"""
res = super().__getitem__(item)
if res is None:
- _warn()
+ raise KeyError(item)
return res
def _repair_headers(self):
diff --git a/contrib/python/importlib-metadata/py3/ya.make b/contrib/python/importlib-metadata/py3/ya.make
index 9f1a42353d..ad2a140f18 100644
--- a/contrib/python/importlib-metadata/py3/ya.make
+++ b/contrib/python/importlib-metadata/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(7.2.1)
+VERSION(8.0.0)
LICENSE(Apache-2.0)