-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Although Python 3.12 is listed as supported by Vercel, it does not work properly with asynchronous functions.
I am trying to deploy a Starlette app (which is ASGI). Just listing Starlette as dependency did not work, as Vercel complained that it's missing aiohttp:
LAMBDA_WARNING: Unhandled exception. [...]
[ERROR] Runtime.ImportModuleError: Unable to import module 'vc__handler__python': No module named 'aiohttp'
Traceback (most recent call last):
So, I've added it to the dependencies (although I don't see the point in it). Nevertheless, it now fails with a different error:
LAMBDA_WARNING: Unhandled exception. [...]
[ERROR] TypeError: Queue.__init__() got an unexpected keyword argument 'loop'
Traceback (most recent call last):
File "/var/task/vc__handler__python.py", line 305, in vc_handler
response = asgi_cycle(__vc_module.app, body)
File "/var/task/vc__handler__python.py", line 202, in __call__
self.app_queue = asyncio.Queue(loop=loop)
I could trace back to this line of vc_init:
vercel/packages/python/vc_init.py
Line 202 in 3101d24
| self.app_queue = asyncio.Queue(loop=loop) |
According to the Python docs, the loop argument to the Queue was removed in Python 3.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels