Skip to content

Python 37 support #32

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

Merged
merged 5 commits into from
Nov 22, 2018
Merged

Python 37 support #32

merged 5 commits into from
Nov 22, 2018

Conversation

sanathkr
Copy link
Contributor

Description of changes:
Lambda supports Python 3.7. Adding support for building Py37 functions in the builder.

Tested this change locally by running integration tests in Python 3.7

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

Copy link
Contributor

@stealthycoin stealthycoin left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just two small comments. And would be good to integ test it on each version just to make sure.

@@ -138,7 +145,7 @@ class DependencyBuilder(object):
'sqlalchemy'
}

def __init__(self, osutils, pip_runner=None):
def __init__(self, osutils, pip_runner=None, runtime="python2.7"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Defaulting to 2.7 😲 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha removed the default.

Copy link
Contributor

Choose a reason for hiding this comment

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

Python 3 or bust!

"python2.7": "cp27mu",
"python3.6": "cp36m",
"python3.7": "cp37m"
}.get(runtime)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way we can ever get here with an unsupported runtime? If so do we want to raise something here like UnsupportedRuntimeError with a property for the runtime value? Or is this impossible, because of the validator? If its impossible I think I'd rather [runtime] so we at least get a very obvious KeyError instead of a None silently sneaking in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran into this right in our integ test. So it is possible that we will come here with an unsupported runtime.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok yea. I think I like having an explicit error for it. Thoughts?

Copy link
Contributor

@stealthycoin stealthycoin left a comment

Choose a reason for hiding this comment

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

Looks good! Ship it contingent on tests passing!

@sanathkr sanathkr merged commit 1c59f4c into aws:develop Nov 22, 2018
sanathkr added a commit that referenced this pull request Nov 27, 2018
* Python 37 support

* Making the ABI selection explicit

* Fixing the lambda_abi to a supported list

* Making tests work
sanathkr added a commit that referenced this pull request Nov 27, 2018
mndeveci added a commit to mndeveci/aws-lambda-builders that referenced this pull request Mar 17, 2023
* Add python3.10 support.

* add support for py3.10

* add ci jobs for py3.10

* Fix python3.10 workflows.

---------

Co-authored-by: Mehmet Nuri Deveci <[email protected]>
mndeveci added a commit that referenced this pull request Mar 20, 2023
* feat: add python3.10 support (#32)

* Add python3.10 support.

* add support for py3.10

* add ci jobs for py3.10

* Fix python3.10 workflows.

---------

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Update DESIGN.md

* update test cases with py310 differences

---------

Co-authored-by: Sean O Brien <[email protected]>
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.

2 participants