mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-31 22:23:12 +08:00
10 lines
304 B
Python
10 lines
304 B
Python
import sys
|
|
|
|
# asyncio.Task.current_task method is deprecated and will be removed in Python
|
|
# 3.9. Instead use asyncio.current_task
|
|
if sys.version_info >= (3, 7, 0):
|
|
from asyncio import current_task as asyncio_current_task
|
|
else:
|
|
import asyncio
|
|
asyncio_current_task = asyncio.Task.current_task
|