From fd5bf4fb2a52d08ca0b53ee17e131b5ef324f42d Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:05 +0100 Subject: [PATCH 01/10] Update flask-migrate from 2.4.0 to 2.5.2 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index a87eb2ed8..78e105425 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -6,7 +6,7 @@ celery==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.10.1 -Flask-Migrate==2.4.0 +Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.0.2 click-datetime==0.2 From b751393b53ea9e865e698971d94a43f0aed56be6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:06 +0100 Subject: [PATCH 02/10] Update flask from 1.0.2 to 1.1.1 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index 78e105425..735f48369 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -8,7 +8,7 @@ Flask-Bcrypt==0.7.1 flask-marshmallow==0.10.1 Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.0.2 +Flask==1.1.1 click-datetime==0.2 eventlet==0.24.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching From 9bc886aad440de29ed95db0eed634bfcc4f4eff0 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:08 +0100 Subject: [PATCH 03/10] Update eventlet from 0.24.1 to 0.25.1 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index 735f48369..bb4d3458c 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -10,7 +10,7 @@ Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.1 click-datetime==0.2 -eventlet==0.24.1 +eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 jsonschema==3.0.1 From 83e894a287825e53b1c6568eeb55cd9573523d05 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:09 +0100 Subject: [PATCH 04/10] Update jsonschema from 3.0.1 to 3.0.2 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index bb4d3458c..07a5ccd0a 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -13,7 +13,7 @@ click-datetime==0.2 eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 -jsonschema==3.0.1 +jsonschema==3.0.2 marshmallow-sqlalchemy==0.16.3 marshmallow==2.19.2 psycopg2-binary==2.8.2 From 7f32ed76b1fadc32221b7bcfce748652b886d474 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:11 +0100 Subject: [PATCH 05/10] Update marshmallow-sqlalchemy from 0.16.3 to 0.17.0 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index 07a5ccd0a..bf1214c1f 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -14,7 +14,7 @@ eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 jsonschema==3.0.2 -marshmallow-sqlalchemy==0.16.3 +marshmallow-sqlalchemy==0.17.0 marshmallow==2.19.2 psycopg2-binary==2.8.2 PyJWT==1.7.1 From b695bce2847f9dd64a6caedeeae5ca06b2d8192e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:13 +0100 Subject: [PATCH 06/10] Update marshmallow from 2.19.2 to 3.0.1 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index bf1214c1f..a67f38399 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -15,7 +15,7 @@ gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 jsonschema==3.0.2 marshmallow-sqlalchemy==0.17.0 -marshmallow==2.19.2 +marshmallow==3.0.1 psycopg2-binary==2.8.2 PyJWT==1.7.1 SQLAlchemy==1.3.3 From bbd82e9957a345b1846a6b2eac83a7e7002db205 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:14 +0100 Subject: [PATCH 07/10] Update psycopg2-binary from 2.8.2 to 2.8.3 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index a67f38399..7319f3154 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -16,7 +16,7 @@ iso8601==0.1.12 jsonschema==3.0.2 marshmallow-sqlalchemy==0.17.0 marshmallow==3.0.1 -psycopg2-binary==2.8.2 +psycopg2-binary==2.8.3 PyJWT==1.7.1 SQLAlchemy==1.3.3 From 44872388a89367b2cd97caca21fbbb1174a51cde Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 28 Aug 2019 14:00:16 +0100 Subject: [PATCH 08/10] Update sqlalchemy from 1.3.3 to 1.3.8 --- requirements-app.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-app.txt b/requirements-app.txt index 7319f3154..b03b6d185 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -18,7 +18,7 @@ marshmallow-sqlalchemy==0.17.0 marshmallow==3.0.1 psycopg2-binary==2.8.3 PyJWT==1.7.1 -SQLAlchemy==1.3.3 +SQLAlchemy==1.3.8 notifications-python-client==5.3.0 From 01c702535dea4c692ab1537f49ef854475946f38 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 4 Sep 2019 10:55:22 +0100 Subject: [PATCH 09/10] freeze requirements and bump utils --- requirements-app.txt | 2 +- requirements.txt | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index b03b6d185..b72629c26 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -29,6 +29,6 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.1#egg=notifications-utils==34.0.1 git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3 diff --git a/requirements.txt b/requirements.txt index 8d4126a7c..62c4af0b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,19 +8,19 @@ celery==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.10.1 -Flask-Migrate==2.4.0 +Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.0.2 +Flask==1.1.1 click-datetime==0.2 -eventlet==0.24.1 +eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 -jsonschema==3.0.1 -marshmallow-sqlalchemy==0.16.3 -marshmallow==2.19.2 -psycopg2-binary==2.8.2 +jsonschema==3.0.2 +marshmallow-sqlalchemy==0.17.0 +marshmallow==3.0.1 +psycopg2-binary==2.8.3 PyJWT==1.7.1 -SQLAlchemy==1.3.3 +SQLAlchemy==1.3.8 notifications-python-client==5.3.0 @@ -31,27 +31,27 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.1#egg=notifications-utils==34.0.1 git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3 ## The following requirements were added by pip freeze: -alembic==1.0.11 +alembic==1.1.0 amqp==1.4.9 anyjson==0.3.3 attrs==19.1.0 -awscli==1.16.217 +awscli==1.16.231 bcrypt==3.1.7 billiard==3.3.0.23 bleach==3.1.0 boto3==1.6.16 -botocore==1.12.207 +botocore==1.12.221 certifi==2019.6.16 chardet==3.0.4 Click==7.0 colorama==0.3.9 dnspython==1.16.0 -docutils==0.14 +docutils==0.15.2 flask-redis==0.4.0 future==0.17.1 greenlet==0.4.15 @@ -65,7 +65,7 @@ mistune==0.8.4 monotonic==1.5 orderedset==2.0.1 phonenumbers==8.10.13 -pyasn1==0.4.6 +pyasn1==0.4.7 pycparser==2.19 PyPDF2==1.26.0 pyrsistent==0.15.4 @@ -74,7 +74,7 @@ python-editor==1.0.4 python-json-logger==0.1.11 pytz==2019.2 PyYAML==4.2b1 -redis==3.3.7 +redis==3.3.8 requests==2.22.0 rsa==3.4.2 s3transfer==0.2.1 From 51f90c17fd4fa13d89cc36210e6f38321a30c1ee Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Wed, 4 Sep 2019 12:14:28 +0100 Subject: [PATCH 10/10] pin marshmallow and update flask error handling --- app/errors.py | 3 +++ requirements-app.txt | 2 +- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/errors.py b/app/errors.py index 67448e1fb..09ff8d633 100644 --- a/app/errors.py +++ b/app/errors.py @@ -111,5 +111,8 @@ def register_errors(blueprint): @blueprint.app_errorhandler(500) @blueprint.errorhandler(Exception) def internal_server_error(e): + # if e is a werkzeug InternalServerError then it may wrap the original exception. For more details see: + # https://flask.palletsprojects.com/en/1.1.x/errorhandling/?highlight=internalservererror#unhandled-exceptions + e = getattr(e, 'original_exception', e) current_app.logger.exception(e) return jsonify(result='error', message="Internal server error"), 500 diff --git a/requirements-app.txt b/requirements-app.txt index b72629c26..f628c38e6 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -15,7 +15,7 @@ gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 jsonschema==3.0.2 marshmallow-sqlalchemy==0.17.0 -marshmallow==3.0.1 +marshmallow==2.20.2 # pyup: <3 throws errors psycopg2-binary==2.8.3 PyJWT==1.7.1 SQLAlchemy==1.3.8 diff --git a/requirements.txt b/requirements.txt index 62c4af0b6..b74c9de73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 jsonschema==3.0.2 marshmallow-sqlalchemy==0.17.0 -marshmallow==3.0.1 +marshmallow==2.20.2 # pyup: <3 throws errors psycopg2-binary==2.8.3 PyJWT==1.7.1 SQLAlchemy==1.3.8