Revert "asyncio_run helper to deal with a 3.10 warning, refs #1482"

This reverts commit 98dcabccbb.
This commit is contained in:
Simon Willison 2021-10-09 18:25:33 -07:00
commit 0d5cc20aef
2 changed files with 8 additions and 14 deletions

View file

@ -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)