Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.11 support #2063

Merged
merged 4 commits into from
Dec 12, 2023
Merged

python 3.11 support #2063

merged 4 commits into from
Dec 12, 2023

Conversation

ogrodnek
Copy link
Contributor

@ogrodnek ogrodnek commented Jul 28, 2023

Issue #, if available: #2053

Description of changes:

Python 3.11 support
https://aws.amazon.com/blogs/compute/python-3-11-runtime-now-available-in-aws-lambda/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ogrodnek ogrodnek changed the title initial pass at 3.11 initial pass at 3.11 (WIP) Jul 28, 2023
@@ -498,7 +499,8 @@ class DependencyBuilder(object):
'cp36m': (2, 17),
'cp37m': (2, 17),
'cp38': (2, 26),
'cp310': (2, 26)
'cp310': (2, 26),
'cp311': (2, 26),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ docker run -it --entrypoint "ldd" public.ecr.aws/lambda/python:3.11 --version
ldd (GNU libc) 2.26

elif (major, minor) <= (3, 9):
return 'python3.9'
return 'python3.10'
elif (major, minor) <= (3, 10):
Copy link
Contributor Author

@ogrodnek ogrodnek Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I just added an additional branch, but pylint did not like having that many return statements.

@@ -271,15 +271,15 @@ Integrating with AWS Lambda Powertools
--------------------------------------

`AWS Lambda Powertools
<https://awslabs.github.io/aws-lambda-powertools-python/latest/>`__ is a suite of
<https://docs.powertools.aws.dev/lambda/python/latest/>`__ is a suite of
Copy link
Contributor Author

@ogrodnek ogrodnek Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the prcheck link checker complained (failed) about these powertools links.

@@ -45,7 +45,7 @@
],
},
'numpy': {
'version': '1.21.6',
'version': '1.23.3',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had a similar issue to last time where I had to bump these slightly to get a version that included 3.11.

@ogrodnek ogrodnek changed the title initial pass at 3.11 (WIP) python 3.11 support Jul 28, 2023
@@ -151,16 +151,13 @@ def lambda_python_version(self) -> str:
if major == 2:
return 'python2.7'
# Python 3 for backwards compatibility needs to select python3.6
# for python versions 3.0-3.6. 3.7 and higher will use python3.7.
# for python versions 3.0-3.6. 3.7-3.10 will use their version.
# 3.11 and higher will use 3.11
elif (major, minor) <= (3, 6):
return 'python3.6'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesls I was noticing python 3.6 appears no longer supported: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Wasn't sure about changing this to force 3.7 as minimum? Maybe removing 3.6 would be better as a separate PR if it's wanted?...

@ogrodnek ogrodnek marked this pull request as ready for review July 28, 2023 19:50
@pietrobolcato
Copy link

This should be merged, is really important that chalice doesn't lag behind so much

@devinmatte
Copy link

@jamesls Do you have any time soon to take a look at this?

@semlak
Copy link

semlak commented Sep 14, 2023

This should be merged, is really important that chalice doesn't lag behind so much

Agreed. It is important to merge this or provide feedback.

@ogrodnek
Copy link
Contributor Author

Hi @jamesls I just wanted to check in to see if there's any changes I can make to make this PR easier to merge or if you have any feedback, I'm happy to make it. I know you're busy, so, no worries if you're also not ready to take a look at this. Thanks, and thanks again for your work on chalice!

@Steve-Groner
Copy link

@jamesls Any word on merging this so Python 3.11 is supported?

@venkatajax
Copy link

Can someone pls comment if this PR is merged?

@rodolfolottin
Copy link

Looking forward for this! 🙌

@MariaMokbel
Copy link

Can't wait to have this PR merged 🙏🏼

@hbock-42
Copy link

hbock-42 commented Dec 12, 2023

Seems very promising, huge update, I understand it takes time to review :D

@jamesls
Copy link
Member

jamesls commented Dec 12, 2023

Taking a look now.

@jamesls
Copy link
Member

jamesls commented Dec 12, 2023

Looks great, thanks for the pull request!

jamesls added a commit to jamesls/chalice that referenced this pull request Dec 12, 2023
PR aws#2063

* python_3.11:
  Add changelog entry for python3.11
  bump versions for 3.11
  update links to powertools
  reduce number of returns
  initial pass at 3.11
@jamesls jamesls merged commit 80eeb38 into aws:master Dec 12, 2023
20 checks passed
@ogrodnek
Copy link
Contributor Author

Thanks @jamesls , I really appreciate your work on chalice! It's been really great to use!

@devinmatte devinmatte mentioned this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants