Miserlou/Zappa

Zappa not compatible with Python3.8

divyaarya opened this issue · 1 comments

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

  • Zappa version used: 0.52.0

  • Operating System and Python version: Ubuntu 18.04 LTS and Python 3.8.10

  • The output of pip freeze:
    argcomplete==1.12.3
    asgiref==3.3.4
    boto3==1.17.89
    botocore==1.20.89
    certifi==2021.5.30
    cfn-flip==1.2.3
    chardet==4.0.0
    click==8.0.1
    Django==3.2.3
    django-extensions==3.1.3
    djangorestframework==3.12.4
    durationpy==0.5
    future==0.18.2
    hjson==3.0.2
    idna==2.9
    importlib-metadata==4.5.0
    jmespath==0.10.0
    kappa==0.6.0
    pep517==0.10.0
    pip-tools==6.1.0
    placebo==0.9.0
    PyMySQL==1.0.2
    python-dateutil==2.8.1
    python-slugify==5.0.2
    pytz==2021.1
    PyYAML==5.4.1
    requests==2.25.1
    s3transfer==0.4.2
    six==1.16.0
    sqlparse==0.4.1
    text-unidecode==1.3
    toml==0.10.2
    tqdm==4.61.0
    troposphere==2.7.1
    typing-extensions==3.10.0.0
    urllib3==1.26.5
    Werkzeug==0.16.1
    wsgi-request-logger==0.4.6
    zappa==0.52.0
    zipp==3.4.1

  • Your zappa_settings.json:

{
"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
}
}

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