mirror of
https://github.com/simonw/datasette.git
synced 2026-06-09 10:36:58 +02:00
Revert "asyncio_run helper to deal with a 3.10 warning, refs #1482"
This reverts commit 98dcabccbb.
This commit is contained in:
parent
875117c343
commit
0d5cc20aef
2 changed files with 8 additions and 14 deletions
|
|
@ -1089,12 +1089,3 @@ async def derive_named_parameters(db, sql):
|
|||
return [row["p4"].lstrip(":") for row in results if row["opcode"] == "Variable"]
|
||||
except sqlite3.DatabaseError:
|
||||
return possible_params
|
||||
|
||||
|
||||
def asyncio_run(coro):
|
||||
if hasattr(asyncio, "run"):
|
||||
# Added in Python 3.7
|
||||
return asyncio.run(coro)
|
||||
else:
|
||||
loop = asyncio.get_event_loop()
|
||||
return loop.run_until_complete(coro)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue