Skip to content

Commit 9572aaf

Browse files
committed
Fix compatibility with Trio 0.15.0
1 parent 43668c2 commit 9572aaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pytest_trio/_tests/test_fixture_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def fixture_with_unique_name(nursery):
1212
async def test_fixture_names(fixture_with_unique_name):
1313
# This might be a bit fragile ... if we rearrange the nursery hierarchy
1414
# somehow so it breaks, then we can make it more robust.
15-
task = trio.hazmat.current_task()
15+
task = trio.lowlevel.current_task()
1616
assert task.name == "<test 'test_fixture_names'>"
1717
sibling_names = {task.name for task in task.parent_nursery.child_tasks}
1818
assert "<fixture 'fixture_with_unique_name'>" in sibling_names

pytest_trio/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ async def run(self, test_ctx, contextvars_ctx):
208208

209209
# This is a gross hack. I guess Trio should provide a context=
210210
# argument to start_soon/start?
211-
task = trio.hazmat.current_task()
211+
task = trio.lowlevel.current_task()
212212
assert canary not in task.context
213213
task.context = contextvars_ctx
214214
# Force a yield so we pick up the new context

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
packages=find_packages(),
1717
entry_points={'pytest11': ['trio = pytest_trio.plugin']},
1818
install_requires=[
19-
"trio >= 0.11",
19+
"trio >= 0.15.0",
2020
"async_generator >= 1.9",
2121
"outcome",
2222
# For node.get_closest_marker

0 commit comments

Comments
 (0)