From 0a6b8255f0b7de6c02c453a8992619b5d7350537 2018-07-31 15:23:05 From: Branko Majic Date: 2018-07-31 15:23:05 Subject: [PATCH] MAR-131: Use Python 3 in test site wsgihello2 role: - Switch role to use Python 3 via meta dependency. - Fix the demo application to work with Python 3. - Update ipcalc dependency (so it would work with Python 3). --- diff --git a/testsite/playbooks/roles/wsgihello2/files/hello.wsgi b/testsite/playbooks/roles/wsgihello2/files/hello.wsgi index 68b65298718ed4f7c426eb04ea5d1e7f33fcdf6f..009e256742ab322b4e7c1b7933a00cb78a242670 100644 --- a/testsite/playbooks/roles/wsgihello2/files/hello.wsgi +++ b/testsite/playbooks/roles/wsgihello2/files/hello.wsgi @@ -32,4 +32,4 @@ def application(environ, start_response): ('Content-Length', str(len(output)))] start_response(status, response_headers) - return [output] + return [output.encode('utf-8')] diff --git a/testsite/playbooks/roles/wsgihello2/files/requirements.txt b/testsite/playbooks/roles/wsgihello2/files/requirements.txt index 4718881b5fb6ca3d34cfd0fbf089b399b0222d29..0ffb641936723f63bdfa79405d5f33cca8228d07 100644 --- a/testsite/playbooks/roles/wsgihello2/files/requirements.txt +++ b/testsite/playbooks/roles/wsgihello2/files/requirements.txt @@ -1,3 +1,3 @@ django-apptemplates==1.2 -ipcalc==1.1.3 +ipcalc==1.99.0 django==1.8.16 diff --git a/testsite/playbooks/roles/wsgihello2/meta/main.yml b/testsite/playbooks/roles/wsgihello2/meta/main.yml index f077d98ea170a88f019067b032cc976f854b25aa..006d98aaa66f9003368a5940fbb8bf2c18fe688a 100644 --- a/testsite/playbooks/roles/wsgihello2/meta/main.yml +++ b/testsite/playbooks/roles/wsgihello2/meta/main.yml @@ -15,6 +15,7 @@ dependencies: wsgi_requirements: - futures==3.1.1 - gunicorn==19.6.0 + python_version: 3 - role: database db_name: wsgi_{{ testsite_domain_underscores }} db_password: wsgi_{{ testsite_domain_underscores }}