You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import sys
|
|
|
|
|
|
def load_contextvar_class():
|
|
if sys.version_info >= (3, 7):
|
|
from contextvars import ContextVar
|
|
elif sys.version_info >= (3, 5, 3):
|
|
from aiocontextvars import ContextVar
|
|
else:
|
|
from contextvars import ContextVar
|
|
|
|
return ContextVar
|
|
|
|
|
|
ContextVar = load_contextvar_class()
|