Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.2k forks source link

Zappa not compatible with Python3.8 #2222

Open divyaarya opened 3 years ago

divyaarya commented 3 years ago

Summary - Zappa version 0.52.0 not working with Python 3.8

Context

I created the virtualenv using python 3.8 and tried to deploy the environment. Its showing some error. Same thing with python3.7 is working seamlessly.

Expected Behavior

zappa deploy should start deploying the project.

Actual Behavior

zappa deploy with python3.8 version, its showing below error-- Traceback (most recent call last): File "/home/user/Development/serverless_project/virt/demo_zappa/bin/zappa", line 5, in from zappa.cli import handle File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/zappa/cli.py", line 44, in from .core import Zappa, logger, API_GATEWAY_REGIONS File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/zappa/core.py", line 33, in import troposphere File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/troposphere/init.py", line 586, in class Template(object): File "/home/user/Development/serverless_project/virt/demo_zappa/lib/python3.8/site-packages/troposphere/init.py", line 588, in Template 'AWSTemplateFormatVersion': (basestring, False), NameError: name 'basestring' is not defined

Steps to Reproduce(Similar steps with python3.7 are working fine)

  1. Created Django Project
  2. Created virualenv for python3.8 (virtualenv -p /usr/bin/python3.8 virt/demo_zappa/)
  3. Setup zappa_settings.json with runtime "python3.8"
  4. Executing zappa init or zappa deploy is producing errors.

Your Environment

{ "dev": { "aws_region": "ap-south-1", "django_settings": "python_zappa.settings", "profile_name": "default", "project_name": "python-zappa", "runtime": "python3.8", "s3_bucket": "", "manage_roles": false, "role_arn": "arn:aws:iam:::role/", "slim_handler": false, "delete_local_zip": true } }

john-parton commented 3 years ago

Works with troposphere==3.0.2, but there are other problems with using that.