aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis/py3
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 /contrib/python/hypothesis/py3
parente16b329fb8d258f106d4f5345195d1fba93cf09c (diff)
downloadydb-4df3e22156bd8dc3401baf0ad2104a66e945e11f.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/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
7 files changed, 23 insertions, 21 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)