forked from pool/python-hypothesis
Accepting request 1191165 from home:mcalabkova:branches:devel:languages:python
- Update to 6.108.5 * The alphabet= argument to from_regex() now accepts unions of characters() and sampled_from() strategies, in addition to accepting each individually. * Improves support for unions of numpy dtypes such as np.float64 | np.complex128 in from_type() and arrays() * Support for Django 5.0, drop support for end-of-life Django versions (< 4.2). * Migrate the shrinker to our new internal representation, called the IR layer. This improves the shrinker’s performance in the majority of cases. For example, on the Hypothesis test suite, shrinking is a median of 1.38x faster. * The from_dtype() function no longer generates NaT (“not-a-time”) values for the datetime64 or timedelta64 dtypes if passed allow_nan=False * Add the experimental and unstable backend setting. See documentation for details. * Many more minor changes, see the upstream changelog. - Add 0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch to fix tests * https://github.com/HypothesisWorks/hypothesis/issues/4062 OBS-URL: https://build.opensuse.org/request/show/1191165 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=191
This commit is contained in:
88
0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch
Normal file
88
0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch
Normal file
@@ -0,0 +1,88 @@
|
||||
From c83493953839da2d0ae06c094984e7a90af215dc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mark=C3=A9ta?= <meggy.calabkova@gmail.com>
|
||||
Date: Fri, 2 Aug 2024 11:53:29 +0200
|
||||
Subject: [PATCH] Revert "Use tmp_path in ghostwriter tests"
|
||||
|
||||
This reverts commit 769f5750b6bdbdccfd8b8b34c5f9b72196744421.
|
||||
---
|
||||
.../tests/ghostwriter/test_ghostwriter.py | 36 ++++++++-----------
|
||||
1 file changed, 14 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/tests/ghostwriter/test_ghostwriter.py b/tests/ghostwriter/test_ghostwriter.py
|
||||
index ddee5e78f..7bad9f081 100644
|
||||
--- a/tests/ghostwriter/test_ghostwriter.py
|
||||
+++ b/tests/ghostwriter/test_ghostwriter.py
|
||||
@@ -11,7 +11,6 @@
|
||||
import ast
|
||||
import enum
|
||||
import json
|
||||
-import os
|
||||
import platform
|
||||
import re
|
||||
import socket
|
||||
@@ -452,22 +451,13 @@ def test_get_imports_for_strategy(strategy, imports):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
-def in_temp_path(tmp_path):
|
||||
- """Fixture to execute tests in a temporary path."""
|
||||
- old_path = Path.cwd()
|
||||
- os.chdir(tmp_path)
|
||||
- yield
|
||||
- os.chdir(old_path)
|
||||
-
|
||||
-
|
||||
-@pytest.fixture
|
||||
-def temp_script_file(in_temp_path):
|
||||
- """Fixture to create a script file in a temporary working directory.
|
||||
-
|
||||
- Changes the working directory to a temporary directory, then yields an extant file
|
||||
- whose name will end in .py and which includes an importable function.
|
||||
+def temp_script_file():
|
||||
+ """Fixture to yield a Path to a temporary file in the local directory. File name will end
|
||||
+ in .py and will include an importable function.
|
||||
"""
|
||||
p = Path("my_temp_script.py")
|
||||
+ if p.exists():
|
||||
+ raise FileExistsError(f"Did not expect {p} to exist during testing")
|
||||
p.write_text(
|
||||
dedent(
|
||||
"""
|
||||
@@ -477,17 +467,18 @@ def temp_script_file(in_temp_path):
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
- return p
|
||||
+ yield p
|
||||
+ p.unlink()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
-def temp_script_file_with_py_function(in_temp_path):
|
||||
- """Fixture to create a python file in a temporary working directory.
|
||||
-
|
||||
- Changes the working directory to a temporary directory, then yields an extant file
|
||||
- whose name will end in .py and which includes an importable function named "py".
|
||||
+def temp_script_file_with_py_function():
|
||||
+ """Fixture to yield a Path to a temporary file in the local directory. File name will end
|
||||
+ in .py and will include an importable function named "py"
|
||||
"""
|
||||
p = Path("my_temp_script_with_py_function.py")
|
||||
+ if p.exists():
|
||||
+ raise FileExistsError(f"Did not expect {p} to exist during testing")
|
||||
p.write_text(
|
||||
dedent(
|
||||
"""
|
||||
@@ -497,7 +488,8 @@ def temp_script_file_with_py_function(in_temp_path):
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
- return p
|
||||
+ yield p
|
||||
+ p.unlink()
|
||||
|
||||
|
||||
def test_obj_name(temp_script_file, temp_script_file_with_py_function):
|
||||
--
|
||||
2.45.2
|
||||
|
2
_service
2
_service
@@ -2,7 +2,7 @@
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="url">https://github.com/HypothesisWorks/hypothesis.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">hypothesis-python-6.98.9</param>
|
||||
<param name="revision">hypothesis-python-6.108.5</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">hypothesis-python-(.*)</param>
|
||||
<param name="subdir">hypothesis-python</param>
|
||||
|
3
hypothesis-python-6.108.5.tar.gz
Normal file
3
hypothesis-python-6.108.5.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c51df375a0df8e83a525dc768dba398435900d483f8cd605573c6af382550868
|
||||
size 930584
|
BIN
hypothesis-python-6.98.9.tar.gz
(Stored with Git LFS)
BIN
hypothesis-python-6.98.9.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 31 13:22:46 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 6.108.5
|
||||
* The alphabet= argument to from_regex() now accepts unions of characters()
|
||||
and sampled_from() strategies, in addition to accepting each individually.
|
||||
* Improves support for unions of numpy dtypes such as np.float64 | np.complex128
|
||||
in from_type() and arrays()
|
||||
* Support for Django 5.0, drop support for end-of-life Django versions (< 4.2).
|
||||
* Migrate the shrinker to our new internal representation, called the IR layer.
|
||||
This improves the shrinker’s performance in the majority of cases. For example,
|
||||
on the Hypothesis test suite, shrinking is a median of 1.38x faster.
|
||||
* The from_dtype() function no longer generates NaT (“not-a-time”) values for the
|
||||
datetime64 or timedelta64 dtypes if passed allow_nan=False
|
||||
* Add the experimental and unstable backend setting. See documentation for details.
|
||||
* Many more minor changes, see the upstream changelog.
|
||||
- Add 0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch to fix tests
|
||||
* https://github.com/HypothesisWorks/hypothesis/issues/4062
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 29 11:16:28 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
|
@@ -38,7 +38,7 @@ ExclusiveArch: do_not_build
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-hypothesis%{psuffix}
|
||||
Version: 6.98.9
|
||||
Version: 6.108.5
|
||||
Release: 0
|
||||
Summary: A library for property based testing
|
||||
License: MPL-2.0
|
||||
@@ -47,6 +47,9 @@ URL: https://github.com/HypothesisWorks/hypothesis
|
||||
# Edit the `_service` file and run `osc service manualrun` for updates.
|
||||
# See also https://hypothesis.readthedocs.io/en/latest/packaging.html
|
||||
Source: hypothesis-python-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM revert of https://github.com/HypothesisWorks/hypothesis/commit/769f5750b6bdbdccfd8b8b34c5f9b72196744421
|
||||
# gh#HypothesisWorks/hypothesis#4062
|
||||
Patch: 0001-Revert-Use-tmp_path-in-ghostwriter-tests.patch
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytz}
|
||||
|
Reference in New Issue
Block a user