Skip to content

Commit 164aecd

Browse files
committed
xfails pass on 3.14
1 parent bff8c4e commit 164aecd

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

tests/test_garbage_collection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import platform
2+
import sys
23
from collections.abc import Iterable
34
from typing import Any
45
from weakref import WeakValueDictionary
@@ -20,7 +21,7 @@
2021
)
2122

2223

23-
@pytest.mark.xfail(is_free_threaded, reason='GC leaks on free-threaded')
24+
@pytest.mark.xfail(is_free_threaded and sys.version_info < (3, 14), reason='GC leaks on free-threaded (<3.14)')
2425
@pytest.mark.xfail(
2526
condition=platform.python_implementation() == 'PyPy', reason='https://foss.heptapod.net/pypy/pypy/-/issues/3899'
2627
)
@@ -48,7 +49,7 @@ class MyModel(BaseModel):
4849
assert_gc(lambda: len(cache) == 0)
4950

5051

51-
@pytest.mark.xfail(is_free_threaded, reason='GC leaks on free-threaded')
52+
@pytest.mark.xfail(is_free_threaded and sys.version_info < (3, 14), reason='GC leaks on free-threaded (<3.14)')
5253
@pytest.mark.xfail(
5354
condition=platform.python_implementation() == 'PyPy', reason='https://foss.heptapod.net/pypy/pypy/-/issues/3899'
5455
)

tests/validators/test_dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ def test_dataclass_wrap_json():
15161516
assert v.validate_json('{"a": "hello", "b": true}', strict=True) == FooDataclass(a='hello', b=True)
15171517

15181518

1519-
@pytest.mark.xfail(is_free_threaded, reason='GC leaks on free-threaded')
1519+
@pytest.mark.xfail(is_free_threaded and sys.version_info < (3, 14), reason='GC leaks on free-threaded (<3.14)')
15201520
@pytest.mark.xfail(
15211521
condition=platform.python_implementation() == 'PyPy', reason='https://foss.heptapod.net/pypy/pypy/-/issues/3899'
15221522
)

tests/validators/test_model_init.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import platform
2+
import sys
23
import weakref
34

45
import pytest
@@ -411,7 +412,7 @@ def __init__(self, **kwargs):
411412
assert calls == ["{'a': '1'}", "{'a': '1', 'x': 4}"]
412413

413414

414-
@pytest.mark.xfail(is_free_threaded, reason='GC leaks on free-threaded')
415+
@pytest.mark.xfail(is_free_threaded and sys.version_info < (3, 14), reason='GC leaks on free-threaded (<3.14)')
415416
@pytest.mark.xfail(
416417
condition=platform.python_implementation() == 'PyPy', reason='https://foss.heptapod.net/pypy/pypy/-/issues/3899'
417418
)

tests/validators/test_with_default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def val_func(v: Any, handler: core_schema.ValidatorFunctionWrapHandler) -> Any:
636636
validator.validate_python('')
637637

638638

639-
@pytest.mark.xfail(is_free_threaded, reason='GC leaks on free-threaded')
639+
@pytest.mark.xfail(is_free_threaded and sys.version_info < (3, 14), reason='GC leaks on free-threaded (<3.14)')
640640
@pytest.mark.xfail(
641641
condition=platform.python_implementation() == 'PyPy', reason='https://foss.heptapod.net/pypy/pypy/-/issues/3899'
642642
)

0 commit comments

Comments
 (0)