Skip to content

Commit 14d30c6

Browse files
authored
Merge pull request #4809 from HypothesisWorks/create-pull-request/patch
Update pinned dependencies
2 parents 2033379 + a4ec3cf commit 14d30c6

17 files changed

Lines changed: 33 additions & 55 deletions

‎hypothesis/pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pandas = ["pandas>=1.1"]
116116
pytest = ["pytest>=4.6"]
117117
dpcontracts = ["dpcontracts>=0.4"]
118118
redis = ["redis>=3.0.0"]
119-
crosshair = ["hypothesis-crosshair>=0.0.28", "crosshair-tool>=0.0.108"]
119+
crosshair = ["hypothesis-crosshair>=0.0.29", "crosshair-tool>=0.0.109"]
120120
# zoneinfo is an odd one: every dependency is platform-conditional.
121121
zoneinfo = ["tzdata>=2026.3; sys_platform == 'win32' or sys_platform == 'emscripten'"]
122122
# We only support Django versions with upstream support - see
@@ -126,7 +126,7 @@ zoneinfo = ["tzdata>=2026.3; sys_platform == 'win32' or sys_platform == 'emscrip
126126
django = ["django>=5.2"]
127127
watchdog = ["watchdog>=4.0.0"]
128128
# Avoid changing this by hand. This is automatically updated by update_changelog_and_version
129-
all = ["black>=20.8b0", "click>=7.0", "crosshair-tool>=0.0.108", "django>=5.2", "dpcontracts>=0.4", "hypothesis-crosshair>=0.0.28", "lark>=0.10.1", "libcst>=0.3.16", "numpy>=1.21.6", "pandas>=1.1", "pytest>=4.6", "python-dateutil>=1.4", "pytz>=2014.1", "redis>=3.0.0", "rich>=9.0.0", "tzdata>=2026.3; sys_platform == 'win32' or sys_platform == 'emscripten'", "watchdog>=4.0.0"]
129+
all = ["black>=20.8b0", "click>=7.0", "crosshair-tool>=0.0.109", "django>=5.2", "dpcontracts>=0.4", "hypothesis-crosshair>=0.0.29", "lark>=0.10.1", "libcst>=0.3.16", "numpy>=1.21.6", "pandas>=1.1", "pytest>=4.6", "python-dateutil>=1.4", "pytz>=2014.1", "redis>=3.0.0", "rich>=9.0.0", "tzdata>=2026.3; sys_platform == 'win32' or sys_platform == 'emscripten'", "watchdog>=4.0.0"]
130130

131131
[project.scripts]
132132
hypothesis = "hypothesis.extra.cli:main"

‎hypothesis/tests/cover/test_float_nastiness.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
)
2727

2828
from tests.common.debug import find_any, minimal
29+
from tests.common.utils import Why, xfail_on_crosshair
2930

3031
try:
3132
import numpy
@@ -259,6 +260,12 @@ def test_cannot_exclude_endpoint_with_zero_interval(lo, hi, exmin, exmax):
259260
WIDTHS = (64, 32, 16)
260261

261262

263+
# crosshair-tool 0.0.109 can realize a symbolic float to a rational that is not
264+
# representable as an IEEE double (e.g. 1 + 2**-1064 when constrained to != 1);
265+
# converting it to a concrete float then rounds to the excluded value, so the
266+
# bounds-validation in st.floats() raises a spurious InvalidArgument. Remove
267+
# once a fixed crosshair-tool is pinned.
268+
@xfail_on_crosshair(Why.other, strict=False)
262269
@pytest.mark.parametrize("nonfloat", [st.nothing(), st.none()])
263270
@given(data=st.data(), width=st.sampled_from(WIDTHS))
264271
def test_fuzzing_floats_bounds(data, width, nonfloat):

‎hypothesis/tests/cover/test_randoms.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
)
2828

2929
from tests.common.debug import assert_all_examples, find_any
30-
from tests.common.utils import Why, xfail_on_crosshair
3130

3231

3332
def test_implements_all_random_methods():
@@ -177,7 +176,6 @@ def test_copying_synchronizes(r1, method_call):
177176
assert getattr(r1, method)(*args, **kwargs) == getattr(r2, method)(*args, **kwargs)
178177

179178

180-
@xfail_on_crosshair(Why.symbolic_outside_context, strict=False)
181179
@pytest.mark.parametrize("use_true_random", [True, False])
182180
def test_seeding_to_different_values_does_not_synchronize(use_true_random):
183181
@given(
@@ -193,7 +191,6 @@ def test(r1, r2):
193191
test()
194192

195193

196-
@xfail_on_crosshair(Why.symbolic_outside_context, strict=False)
197194
@pytest.mark.parametrize("use_true_random", [True, False])
198195
def test_unrelated_calls_desynchronizes(use_true_random):
199196
@given(

‎hypothesis/tests/cover/test_sampled_from.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
assert_simple_property,
3535
check_can_generate_examples,
3636
)
37-
from tests.common.utils import Why, fails_with, xfail_on_crosshair
37+
from tests.common.utils import fails_with
3838

3939
an_enum = enum.Enum("A", "a b c")
4040
a_flag = enum.Flag("A", "a b c")
@@ -175,11 +175,6 @@ def test_max_size_is_respected_with_unique_sampled_from(ls):
175175
assert len(ls) <= 3
176176

177177

178-
# crosshair-tool 0.0.108 encodes `==` between a promoted symbolic int and a
179-
# symbolic float as SMT structural equality, under which +0.0 != -0.0; this
180-
# makes the uniqueness check take an infeasible branch and realization then
181-
# raises CrossHairInternal. Remove once a fixed crosshair-tool is pinned.
182-
@xfail_on_crosshair(Why.other)
183178
@given(st.lists(st.sampled_from([0, 0.0]), unique=True, min_size=1))
184179
def test_issue_2247_regression(ls):
185180
assert len(ls) == 1

‎hypothesis/tests/cover/test_testdecorators.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ def test_has_ascii(x):
316316
assert any(c in ascii_characters for c in x)
317317

318318

319-
@xfail_on_crosshair(Why.symbolic_outside_context, strict=False)
320319
def test_can_derandomize():
321320
values = []
322321

‎hypothesis/tests/cover/test_type_lookup.py‎

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@
3232
check_can_generate_examples,
3333
find_any,
3434
)
35-
from tests.common.utils import (
36-
Why,
37-
fails_with,
38-
skipif_threading,
39-
temp_registered,
40-
xfail_on_crosshair,
41-
)
35+
from tests.common.utils import fails_with, skipif_threading, temp_registered
4236

4337
# we'll continue testing the typing variants until their removal from the stdlib
4438
# ruff: noqa: UP006, UP035, UP007
@@ -266,19 +260,9 @@ def _check_instances(t):
266260
)
267261

268262

269-
def maybe_mark(x):
270-
if x.__name__ in "Match Decimal IPv4Address":
271-
marks = xfail_on_crosshair(Why.other, as_marks=True, strict=False)
272-
return pytest.param(x, marks=marks)
273-
return x
274-
275-
276263
@pytest.mark.parametrize(
277264
"typ",
278-
sorted(
279-
(maybe_mark(x) for x in _global_type_lookup if _check_instances(x)),
280-
key=str,
281-
),
265+
sorted((x for x in _global_type_lookup if _check_instances(x)), key=str),
282266
)
283267
@given(data=st.data())
284268
def test_can_generate_from_all_registered_types(data, typ):

‎hypothesis/tests/cover/test_verbosity.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from hypothesis.strategies import booleans, integers, lists
1717

1818
from tests.common.debug import minimal
19-
from tests.common.utils import Why, capture_out, fails, xfail_on_crosshair
19+
from tests.common.utils import capture_out, fails
2020

2121

2222
@contextmanager
@@ -62,7 +62,6 @@ def test_includes_progress_in_verbose_mode():
6262
assert "Trying example: " in out
6363

6464

65-
@xfail_on_crosshair(Why.symbolic_outside_context, strict=False)
6665
def test_prints_initial_attempts_on_find():
6766
with capture_verbosity() as o:
6867

‎hypothesis/tests/crosshair/test_crosshair.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ def test_event_with_realization(value):
228228
float(value)
229229

230230

231+
# Any earlier crosshair-backed test which ran under an observability callback
232+
# (e.g. test_realizes_event) leaves process-global crosshair state which stops
233+
# this test from finding the failing example. Remove the xfail once that
234+
# state-leak is fixed upstream.
235+
@pytest.mark.xfail(strict=False, reason="observability in a previous test breaks this")
231236
def test_crosshair_can_hit_a_specific_date():
232237
# See https://github.com/HypothesisWorks/hypothesis/issues/4759.
233238
@given(st.dates())

‎hypothesis/tests/nocover/test_baseexception.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def test_do_nothing(x):
4848
test_do_nothing()
4949

5050

51-
@xfail_on_crosshair(Why.other, strict=False) # extra replay from backend switch
5251
@pytest.mark.parametrize("e", [KeyboardInterrupt, ValueError])
5352
def test_baseexception_no_rerun_no_flaky(e):
5453
runs = 0

‎hypothesis/tests/nocover/test_database_usage.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def stuff():
7777
raise AssertionError
7878

7979

80-
@xfail_on_crosshair(Why.other, strict=False)
8180
def test_trashes_invalid_examples():
8281
database = InMemoryExampleDatabase()
8382

0 commit comments

Comments
 (0)