From 4feff50d7c968639aecb21b106c3b757184d3b95 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Tue, 6 Oct 2020 11:09:12 +0100 Subject: [PATCH 1/2] Fix get current task MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.9 has removed `asyncio.Task.current_task`, from the docs: > The asyncio.Task.current_task() and asyncio.Task.all_tasks() have been removed. They were deprecated since Python 3.7 and you can use asyncio.current_task() and asyncio.all_tasks() instead. (Contributed by Rémi Lapeyre in bpo-40967) https://docs.python.org/3.9/whatsnew/3.9.html?highlight=current_task --- opentracing/scope_managers/asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentracing/scope_managers/asyncio.py b/opentracing/scope_managers/asyncio.py index c5ffb49..28a6fa4 100644 --- a/opentracing/scope_managers/asyncio.py +++ b/opentracing/scope_managers/asyncio.py @@ -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: From 12ff86529338760fd4d1b0ab89868081b98d2d79 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Tue, 6 Oct 2020 11:11:43 +0100 Subject: [PATCH 2/2] Run tests on python 3.9 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a2bc89..97a6c7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,8 @@ python: - "3.5" - "3.6" - "3.7" - - "3.8-dev" + - "3.8" + - "3.9" env: - TORNADO=">=4,<5"