Revert "Bump cherrypy from 18.8.0 to 18.9.0 (#2266)"

This reverts commit faef9a94c4.
This commit is contained in:
JonnyWong16 2024-03-24 17:40:56 -07:00
parent fcd8ef11f4
commit 2fc618c01f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
673 changed files with 11579 additions and 159846 deletions

View file

@ -20,7 +20,7 @@ from functools import wraps
from inspect import signature
async def _run_forever_coro(coro, args, kwargs, loop):
def _launch_forever_coro(coro, args, kwargs, loop):
'''
This helper function launches an async main function that was tagged with
forever=True. There are two possibilities:
@ -48,7 +48,7 @@ async def _run_forever_coro(coro, args, kwargs, loop):
# forever=True feature from autoasync at some point in the future.
thing = coro(*args, **kwargs)
if iscoroutine(thing):
await thing
loop.create_task(thing)
def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
@ -127,9 +127,7 @@ def autoasync(coro=None, *, loop=None, forever=False, pass_loop=False):
args, kwargs = bound_args.args, bound_args.kwargs
if forever:
local_loop.create_task(_run_forever_coro(
coro, args, kwargs, local_loop
))
_launch_forever_coro(coro, args, kwargs, local_loop)
local_loop.run_forever()
else:
return local_loop.run_until_complete(coro(*args, **kwargs))