blob: e0883aa6835fc67a6d0eae6a67518527d67b91bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
from . import compat
if compat.py3k:
import asyncio
from ._concurrency_py3k import await_only
from ._concurrency_py3k import await_fallback
from ._concurrency_py3k import greenlet
from ._concurrency_py3k import greenlet_spawn
from ._concurrency_py3k import AsyncAdaptedLock
else:
asyncio = None
greenlet = None
def await_only(thing):
return thing
def await_fallback(thing):
return thing
def greenlet_spawn(fn, *args, **kw):
raise ValueError("Cannot use this function in py2.")
def AsyncAdaptedLock(*args, **kw):
raise ValueError("Cannot use this function in py2.")
|