GoogleCloudPlatform/continuous-deployment-demo

This script does not work with Python 3.5

Closed this issue · 3 comments

It is not possible to test if the code is compatible with Python 3.5 because this setup only works with Python 2.7

For instance, fetch_gae_sdk.py does import StringIO which is not valid on Python 3.5.

#8

I've solved the issue with a workaround, however I'd appreciate having a Travis-independent solution for deployment readily available

language: python
sudo: required
dist: xenial
python: "3.7"

before_install:
  - openssl aes-256-cbc -K $encrypted_XXX_key -iv $encrypted_XXX_iv -in credentials.tar.gz.enc -out credentials.tar.gz -d
  - tar -xzf credentials.tar.gz
  - mkdir -p lib

install:
  - pip install -r requirements.txt
  - pip install -r requirements-for-testing.txt

script:
  - pytest && pytest test_e2e/run.py

deploy:
  provider: gae
  skip_cleanup: true # Skip cleanup so api_key.py and vendored dependencies are still there
  keyfile: client-secret.json
  project: project-name
  default: true  # default project app version

+1 This repository has a number of python 3.x compatibility issues.
ie. urllib2 , StringIO and so on.
@google-admin Please close the repo or note the compatibility requirements

The source on the master branch has been updated for python 3. Thanks for reporting!