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

[asyncio] Fix get current task on Python 3.9 #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ python:
- "3.5"
- "3.6"
- "3.7"
- "3.8-dev"
- "3.8"
- "3.9"

env:
- TORNADO=">=4,<5"
Expand Down
2 changes: 1 addition & 1 deletion opentracing/scope_managers/asyncio.py
Original file line number Diff line number Diff line change
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