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(debug): Enable debugging for Python37 #1055

Merged
merged 3 commits into from
Mar 24, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion samcli/local/docker/lambda_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Represents Lambda runtime containers.
"""
import logging
import json

from .container import Container
from .lambda_image import Runtime
Expand Down Expand Up @@ -293,13 +294,21 @@ def _get_entry_point(runtime, debug_options=None):
"/var/runtime/awslambda/bootstrap.py"
]

elif runtime == Runtime.python37.value:
Copy link
Contributor

@sriram-mv sriram-mv Mar 13, 2019

Choose a reason for hiding this comment

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

at some point we need to clean up with the if else and make it cleaner. Maybe something like a dictionary key dispatch would work here.

#853

Not: Not blocking.

entrypoint = ["/var/rapid/init",
"--bootstrap",
"/var/lang/bin/python3.7",
"--bootstrap-args",
json.dumps(debug_args_list + ["/var/runtime/bootstrap"])
]

return entrypoint

@staticmethod
def _supported_runtimes():
return {Runtime.java8.value, Runtime.dotnetcore20.value, Runtime.dotnetcore21.value, Runtime.go1x.value,
Runtime.nodejs.value, Runtime.nodejs43.value, Runtime.nodejs610.value, Runtime.nodejs810.value,
Runtime.python27.value, Runtime.python36.value}
Runtime.python27.value, Runtime.python36.value, Runtime.python37.value}


class DebuggingNotSupported(Exception):
Expand Down