Skip to content

Commit fd73280

Browse files
committed
grab f_generator on 3.14 no_other_refs
1 parent 53fddde commit fd73280

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/trio/_core/_tests/test_run.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,10 +2807,6 @@ async def spawn_tasks_in_old_nursery(task_status: _core.TaskStatus[None]) -> Non
28072807
sys.implementation.name != "cpython",
28082808
reason="Only makes sense with refcounting GC",
28092809
)
2810-
@pytest.mark.xfail(
2811-
sys.version_info >= (3, 14),
2812-
reason="https://github.com/python/cpython/issues/125603",
2813-
)
28142810
async def test_ki_protection_doesnt_leave_cyclic_garbage() -> None:
28152811
class MyException(Exception):
28162812
pass

src/trio/_core/_tests/tutil.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ def create_asyncio_future_in_new_loop() -> asyncio.Future[object]:
117117
return loop.create_future()
118118

119119

120-
if sys.version_info >= (3, 11):
120+
if sys.version_info >= (3, 14):
121+
122+
def no_other_refs() -> list[object]:
123+
return [sys._getframe().f_generator]
124+
125+
elif sys.version_info >= (3, 11):
121126

122127
def no_other_refs() -> list[object]:
123128
return []

0 commit comments

Comments
 (0)