it looks like 3.11 is just new on serverless framework 3.36.0 I got this error with pathlib here:
INIT_START Runtime Version: python:3.11.v16 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:XXXX
START
[ERROR] Runtime.ImportModuleError: Unable to import module 'src/http/save_data/handler': cannot import name 'Sequence' from 'collections' (/var/lang/lib/python3.11/collections/__init__.py)
Traceback (most recent call last):
and this is my requirements:
boto3==1.28.73
botocore==1.31.73
DateTime==5.2
jmespath==1.0.1
pathlib==1.0.1
python-dateutil==2.8.2
pytz==2023.3.post1
s3transfer==0.7.0
six==1.16.0
urllib3==2.0.7
zope.interface==6.1
here's how I fixed it: I removed pathlib from the requirements and could run the code without the warning.