-
Notifications
You must be signed in to change notification settings - Fork 1k
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
CLI not compatible with Python 3+ #25
Comments
I was initially going to open such an issue but wondered if this compatibility was passed on for now since AWS Lambda only supports Python 2.7 anyway. I'd love for the CLI to support Python 3 as well, but could it lead some to write incompatible code inadvertently? |
The intent is for chalice to support the same versions of python that AWS Lambda supports, which is currently python 2.7. So while possible to make it work, it could be confusing to work on your app in python3, but only to have it fail when deploying to lambda. The more technical reason why supporting python3 is challenging in chalice is because chalice introspects your source code in order to configure things automatically for you, including importing your |
@daneah it can be addressed by splitting codebase into two repos - CLI and core. |
@jamesls sounds absolutely reasonable. Mentioning it in the Readme would be helpful, as I just stumbled across it and had to find this bug report to understand whats going on. |
I added a note in the README about supported python versions. The plan is to support whatever versions AWS Lambda supports. So, for example, if lambda supports python3, and you want to use the python3 runtime, you'd simply create a virtualenv with python3. The |
It is hard to believe that Amazon's premier entry in the hot "serverless" space still only supports the dying technology of Python 2. For those that haven't looked in recent years, support for Python 2 is due to end in 2020. Ubuntu doesn't even install it by default. A summary of the situation (with a nice graphical timeline showing nearly all other enviroments already ported to Python 3) is at http://www.python3statement.org/ Please reopen this bug until Chalice at least provides better support for projects that are trying to ensure Python 3 compatibility, i.e. having code that can be imported into a python 3 code base. |
Getting a syntax error when I try to run the CLI commands. The print statement in the CLI init.py file doesn't have parentheses:
The text was updated successfully, but these errors were encountered: