Skip to content

Commit ce529b2

Browse files
committed
Add trio_as_asyncio alias for trio_as_aio and vice versa
1 parent 50cf299 commit ce529b2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

trio_asyncio/adapter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from functools import wraps, partial
2121

2222
__all__ = ['trio2aio', 'aio2trio', 'aio_as_trio', 'trio_as_aio', 'allow_asyncio',
23-
'current_loop', 'current_policy']
23+
'current_loop', 'current_policy', 'asyncio_as_trio', 'trio_as_asyncio']
2424

2525

2626
def trio2aio(proc):
@@ -101,6 +101,8 @@ def __aiter__(self):
101101
def aio_as_trio(proc, loop=None):
102102
return Asyncio_Trio_Wrapper(proc, loop=loop)
103103

104+
asyncio_as_trio = aio_as_trio
105+
104106

105107
class Trio_Asyncio_Wrapper:
106108
"""
@@ -161,6 +163,8 @@ def __aiter__(self):
161163
def trio_as_aio(proc, loop=None):
162164
return Trio_Asyncio_Wrapper(proc, loop=loop)
163165

166+
trio_as_asyncio = trio_as_aio
167+
164168

165169
def aio2trio(proc):
166170
"""Call asyncio code from Trio.

0 commit comments

Comments
 (0)