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

feat: Add support for Python 3.9 runtime #1267

Merged
merged 2 commits into from Sep 6, 2021

Conversation

eeroniemi
Copy link
Contributor

Description

Add support for Python 3.9 runtime

Motivation and Context

Motivation was to get serverless-offline to support latest stable Python version (3.9).

Fixes issue: #1266

How Has This Been Tested?

I cloned serverless-offline repo, built it, and included it in my Serverless Framework project. Before my patch, when trying to use Python 3.9 I got error:

offline: Warning: found unsupported runtime 'python3.9' for function 'foo'
offline: Failure: Unsupported runtime

After this change there was no error and everything worked as expected.

Copy link
Collaborator

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Thanks @eeroniemi 🙇 I think we should also still include message similar to this one:

if (runtime === 'nodejs14.x') {
logWarning(
'"nodejs14.x" runtime is not supported with docker. See https://github.com/lambci/docker-lambda/issues/329',
)
throw new Error('Unsupported runtime')
}

as the python3.9 is not supported in docker at the moment

@eeroniemi
Copy link
Contributor Author

Hi @pgrzesik. I added check as you suggested. Now if I try run serverless-offline with useDocker: true configuration option and python3.9 runtime, I get error:

offline: "python3.9" runtime is not supported with docker.
offline: Failure: Unsupported runtime

Copy link
Collaborator

@pgrzesik pgrzesik 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, thank you @eeroniemi 🙇

@pgrzesik pgrzesik changed the title Add support for Python 3.9 runtime feat: Add support for Python 3.9 runtime Sep 6, 2021
@pgrzesik pgrzesik merged commit c9b4f9e into dherault:master Sep 6, 2021
@pgrzesik
Copy link
Collaborator

pgrzesik commented Sep 6, 2021

FYI: This change has been released with 8.1.0 release today

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

2 participants