Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Move from asyncio.Task.current_task() to asyncio.current_task() #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opentracing/scope_managers/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AsyncioScopeManager(ThreadLocalScopeManager):
"""
:class:`~opentracing.ScopeManager` implementation for **asyncio**
that stores the :class:`~opentracing.Scope` in the current
:class:`Task` (:meth:`Task.current_task()`), falling back to
:class:`Task` (:meth:`asyncio.current_task()`), falling back to
thread-local storage if none was being executed.

Automatic :class:`~opentracing.Span` propagation from
Expand Down Expand Up @@ -107,7 +107,7 @@ def _get_task(self):
except RuntimeError:
return None

return asyncio.Task.current_task(loop=loop)
return asyncio.current_task(loop=loop)

def _set_task_scope(self, scope, task=None):
if task is None:
Expand Down