From c544e1a830528f0d9fff7082b503b88c1aecc1d1 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 16 Jun 2016 10:10:36 +0100 Subject: [PATCH 1/2] Fix unpacking syntax for Python 3.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.5 introduced the ability to do unpacking before keyword arguments, eg ``` my_method(**dictionary, foo=bar) ``` This was introduced in https://www.python.org/dev/peps/pep-0448/ This is not valid syntax in Python 3.4, which is what’s running on our boxes. This commit changes an instance of this syntax which was introduced in 56d9c29e915fffd9274fb73714df1e0e86a8caf1 --- app/statistics_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/statistics_utils.py b/app/statistics_utils.py index efe6ffe00..cba2484af 100644 --- a/app/statistics_utils.py +++ b/app/statistics_utils.py @@ -84,6 +84,6 @@ def get_failure_rate_for_job(job): def add_rate_to_jobs(jobs): return [dict( - **job, - failure_rate=(get_failure_rate_for_job(job)) * 100 + failure_rate=(get_failure_rate_for_job(job)) * 100, + **job ) for job in jobs] From bc3dc94392262a3c498c1949886609a2b7698231 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 16 Jun 2016 10:15:05 +0100 Subject: [PATCH 2/2] Make Travis use same Python version as our boxes Our boxes are running Python 3.4.3. Travis was set to use 3.5. This is bad because it means that tests can pass on Travis but then the app can fail to start. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 50af03e0a..912637125 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ cache: directories: - node_modules python: -- '3.5' +- '3.4.3' env: secure: jT9BIioqBMkOdLZhU+WJNdnRJ+06G7qUx4QqEVldp96dJwmWpPEvA0XbitdnQt/WXYkpMlDbgSApvvGj2ZNvdpowRRe5HFX8D2Udhi2g9+cXgKrQxH6zv0evJyQLOjCINW6KtgMCJ5wkYR3qQ4BQawlDt6ecpmeboKTmvs2W8jZ09aV4IKKvdd7BwFon10QVPF5ny10G83unLtKnKgRMjSSLnaEiA78pE/LSUkekK4mhmtl+yfQf60cIuQGcN9NCYIt5PrdYYyMkbUaht9ykwL2C11sp5JYPClI9k6lrlpGJCdL9wbJwejGhR/pEqwJ4tKK8Zv+mngmkbzE6fd5ehuRMnIUAifG4t3p6WbhKwY5pJsdVyPgWcRSPXOJA7yEcAeTAvWcC++6mCIFBeMxt/yQNw02jkFHeNKRh2twTRvr4xWZHq9FsVxTEVz89OOuue3IkkyDNmVusGJ9+AVRIn9Oa+U/r3bDnrs7jz+meSwb82GZUBzFpUe2pe8qeBE572Ay7yHB73VHUgp/2A1qkZ4SnTjTpMbnS5RdXTgwtMkOs5MLZgteCVxFL3sHcr9e/B3UIUnzKUSPXXOjHyDxBwrABWo81V9Vp2IPV7P9Ofv8zroudjQxK5MOcbmiPQF+eEB9L4DvkUBNsGxtJ/nmPp6tmN0Xjo0xXVdZCEVj29Og= before_install: