From d06c7adb821aa4040499d65eab42460cec14ac96 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:29:16 +0100 Subject: [PATCH 1/8] Update flask-migrate from 2.5.2 to 2.5.3 --- requirements-app.txt | 2 +- requirements.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index e40e68811..6f26637e1 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -6,7 +6,7 @@ celery[sqs]==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.11.0 -Flask-Migrate==2.5.2 +Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.1 click-datetime==0.2 diff --git a/requirements.txt b/requirements.txt index 0c2a04ac1..c5ee03d7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ celery[sqs]==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.11.0 -Flask-Migrate==2.5.2 +Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.1 click-datetime==0.2 @@ -37,14 +37,14 @@ alembic==1.4.2 amqp==1.4.9 anyjson==0.3.3 attrs==19.3.0 -awscli==1.18.53 +awscli==1.18.65 bcrypt==3.1.7 billiard==3.3.0.23 bleach==3.1.4 blinker==1.4 boto==2.49.0 boto3==1.10.38 -botocore==1.16.3 +botocore==1.16.15 certifi==2020.4.5.1 chardet==3.0.4 click==7.1.2 @@ -58,7 +58,7 @@ greenlet==0.4.15 idna==2.9 importlib-metadata==1.6.0 Jinja2==2.11.2 -jmespath==0.9.5 +jmespath==0.10.0 kombu==3.0.37 Mako==1.1.2 MarkupSafe==1.1.1 @@ -76,11 +76,11 @@ python-editor==1.0.4 python-json-logger==0.1.11 pytz==2020.1 PyYAML==5.3.1 -redis==3.5.0 +redis==3.5.2 requests==2.23.0 rsa==3.4.2 s3transfer==0.3.3 -six==1.14.0 +six==1.15.0 smartypants==2.0.1 statsd==3.3.0 urllib3==1.25.9 From eae99f7504a189e6e976e079a7f8b0fb4cacdf0e Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:31:15 +0100 Subject: [PATCH 2/8] Update flask from 1.1.1 to 1.1.2 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index 6f26637e1..99ec9e4b7 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -8,7 +8,7 @@ Flask-Bcrypt==0.7.1 flask-marshmallow==0.11.0 Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.1.1 +Flask==1.1.2 click-datetime==0.2 eventlet==0.25.1 gunicorn==20.0.4 diff --git a/requirements.txt b/requirements.txt index c5ee03d7c..f153f36aa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ Flask-Bcrypt==0.7.1 flask-marshmallow==0.11.0 Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.1.1 +Flask==1.1.2 click-datetime==0.2 eventlet==0.25.1 gunicorn==20.0.4 From bd0ba6788930211ad9e9a3db1decbca2f6cd1053 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:34:13 +0100 Subject: [PATCH 3/8] Update eventlet from 0.25.1 to 0.25.2 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index 99ec9e4b7..358dee727 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -10,7 +10,7 @@ Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.2 click-datetime==0.2 -eventlet==0.25.1 +eventlet==0.25.2 gunicorn==20.0.4 iso8601==0.1.12 itsdangerous==1.1.0 diff --git a/requirements.txt b/requirements.txt index f153f36aa..d24380c7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.2 click-datetime==0.2 -eventlet==0.25.1 +eventlet==0.25.2 gunicorn==20.0.4 iso8601==0.1.12 itsdangerous==1.1.0 From 8c72dabbe87d3137c7321ccde58a2f90f910805e Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:36:21 +0100 Subject: [PATCH 4/8] Update marshmallow-sqlalchemy from 0.22.3 to 0.23.0 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index 358dee727..883e4307e 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -15,7 +15,7 @@ gunicorn==20.0.4 iso8601==0.1.12 itsdangerous==1.1.0 jsonschema==3.2.0 -marshmallow-sqlalchemy==0.22.3 +marshmallow-sqlalchemy==0.23.0 marshmallow==2.20.5 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.4 PyJWT==1.7.1 diff --git a/requirements.txt b/requirements.txt index d24380c7f..d25f87cc5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ gunicorn==20.0.4 iso8601==0.1.12 itsdangerous==1.1.0 jsonschema==3.2.0 -marshmallow-sqlalchemy==0.22.3 +marshmallow-sqlalchemy==0.23.0 marshmallow==2.20.5 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.4 PyJWT==1.7.1 From ba38a2d5dd428231f668f52355fe916b0f8bbc1b Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:38:27 +0100 Subject: [PATCH 5/8] Update marshmallow from 2.20.5 to 2.21.0 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index 883e4307e..dcfb279e1 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -16,7 +16,7 @@ iso8601==0.1.12 itsdangerous==1.1.0 jsonschema==3.2.0 marshmallow-sqlalchemy==0.23.0 -marshmallow==2.20.5 # pyup: <3 # v3 throws errors +marshmallow==2.21.0 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.4 PyJWT==1.7.1 SQLAlchemy==1.3.13 diff --git a/requirements.txt b/requirements.txt index d25f87cc5..c66a022d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ iso8601==0.1.12 itsdangerous==1.1.0 jsonschema==3.2.0 marshmallow-sqlalchemy==0.23.0 -marshmallow==2.20.5 # pyup: <3 # v3 throws errors +marshmallow==2.21.0 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.4 PyJWT==1.7.1 SQLAlchemy==1.3.13 From 20e97bf78a65879b3e0849d34d4f8f020b0ea663 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:41:16 +0100 Subject: [PATCH 6/8] Update psycopg2-binary from 2.8.4 to 2.8.5 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index dcfb279e1..bb8efc0a4 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -17,7 +17,7 @@ itsdangerous==1.1.0 jsonschema==3.2.0 marshmallow-sqlalchemy==0.23.0 marshmallow==2.21.0 # pyup: <3 # v3 throws errors -psycopg2-binary==2.8.4 +psycopg2-binary==2.8.5 PyJWT==1.7.1 SQLAlchemy==1.3.13 diff --git a/requirements.txt b/requirements.txt index c66a022d8..21dc14451 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ itsdangerous==1.1.0 jsonschema==3.2.0 marshmallow-sqlalchemy==0.23.0 marshmallow==2.21.0 # pyup: <3 # v3 throws errors -psycopg2-binary==2.8.4 +psycopg2-binary==2.8.5 PyJWT==1.7.1 SQLAlchemy==1.3.13 From e770108ec48f5aa1526ac8df1a986fb74ad032d1 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:43:29 +0100 Subject: [PATCH 7/8] Update sqlalchemy from 1.3.13 to 1.3.17 --- requirements-app.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index bb8efc0a4..fd78c6334 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -19,7 +19,7 @@ marshmallow-sqlalchemy==0.23.0 marshmallow==2.21.0 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.5 PyJWT==1.7.1 -SQLAlchemy==1.3.13 +SQLAlchemy==1.3.17 notifications-python-client==5.5.1 diff --git a/requirements.txt b/requirements.txt index 21dc14451..5bd1fb62c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ marshmallow-sqlalchemy==0.23.0 marshmallow==2.21.0 # pyup: <3 # v3 throws errors psycopg2-binary==2.8.5 PyJWT==1.7.1 -SQLAlchemy==1.3.13 +SQLAlchemy==1.3.17 notifications-python-client==5.5.1 From f22483a1ab601a9a773a37dcb64b332a89a08116 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Fri, 22 May 2020 10:49:59 +0100 Subject: [PATCH 8/8] Delete unused Marshmallow schemas --- app/schemas.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/app/schemas.py b/app/schemas.py index 588c92ec0..10cf6e90f 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -43,11 +43,6 @@ def _validate_datetime_not_more_than_96_hours_in_future(dte, msg="Date cannot be raise ValidationError(msg) -def _validate_not_in_future(dte, msg="Date cannot be in the future"): - if dte > date.today(): - raise ValidationError(msg) - - def _validate_not_in_past(dte, msg="Date cannot be in the past"): if dte < date.today(): raise ValidationError(msg) @@ -447,20 +442,6 @@ class SmsTemplateNotificationSchema(SmsNotificationSchema): job = fields.String() -class JobSmsTemplateNotificationSchema(SmsNotificationSchema): - template = fields.Str(required=True) - job = fields.String(required=True) - - -class JobEmailTemplateNotificationSchema(EmailNotificationSchema): - template = fields.Str(required=True) - job = fields.String(required=True) - - -class SmsAdminNotificationSchema(SmsNotificationSchema): - content = fields.Str(required=True) - - class NotificationWithTemplateSchema(BaseSchema): class Meta: model = models.Notification @@ -649,18 +630,6 @@ class EventSchema(BaseSchema): strict = True -class DaySchema(ma.Schema): - - class Meta: - strict = True - - day = fields.Date(required=True) - - @validates('day') - def validate_day(self, value): - _validate_not_in_future(value) - - class UnarchivedTemplateSchema(BaseSchema): archived = fields.Boolean(required=True) @@ -679,11 +648,8 @@ detailed_service_schema = DetailedServiceSchema() template_schema = TemplateSchema() api_key_schema = ApiKeySchema() job_schema = JobSchema() -sms_admin_notification_schema = SmsAdminNotificationSchema() sms_template_notification_schema = SmsTemplateNotificationSchema() -job_sms_template_notification_schema = JobSmsTemplateNotificationSchema() email_notification_schema = EmailNotificationSchema() -job_email_template_notification_schema = JobEmailTemplateNotificationSchema() notification_schema = NotificationModelSchema() notification_with_template_schema = NotificationWithTemplateSchema() notification_with_personalisation_schema = NotificationWithPersonalisationSchema() @@ -697,5 +663,4 @@ template_history_schema = TemplateHistorySchema() event_schema = EventSchema() provider_details_schema = ProviderDetailsSchema() provider_details_history_schema = ProviderDetailsHistorySchema() -day_schema = DaySchema() unarchived_template_schema = UnarchivedTemplateSchema()