From bd1498f49f4c0898f3d292580327346ca854cf1f Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Tue, 25 May 2021 07:57:51 +0100 Subject: [PATCH] Bump utils version which contains `~` as an invalid first character for a postal address. --- app/notifications/validators.py | 2 +- requirements-app.txt | 2 +- requirements.txt | 24 +++++++++++-------- .../test_post_letter_notifications.py | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/notifications/validators.py b/app/notifications/validators.py index bcdf15534..f9d885f84 100644 --- a/app/notifications/validators.py +++ b/app/notifications/validators.py @@ -265,7 +265,7 @@ def validate_address(service, letter_data): ) if address.has_invalid_characters: raise ValidationError( - message='Address lines must not start with any of the following characters: @ ( ) = [ ] ” \\ / , < >' + message='Address lines must not start with any of the following characters: @ ( ) = [ ] ” \\ / , < > ~' ) if address.international: return address.postage diff --git a/requirements-app.txt b/requirements-app.txt index ab701b28d..c26bb5f8e 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -34,7 +34,7 @@ notifications-python-client==6.0.2 # PaaS awscli-cwlogs==1.4.6 -git+https://github.com/alphagov/notifications-utils.git@44.1.0#egg=notifications-utils==44.1.0 +git+https://github.com/alphagov/notifications-utils.git@44.2.1#egg=notifications-utils==44.2.1 # gds-metrics requires prometheseus 0.2.0, override that requirement as 0.7.1 brings significant performance gains prometheus-client==0.10.1 diff --git a/requirements.txt b/requirements.txt index 0b5a868d6..6a8057a6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,29 +36,30 @@ notifications-python-client==6.0.2 # PaaS awscli-cwlogs==1.4.6 -git+https://github.com/alphagov/notifications-utils.git@44.1.0#egg=notifications-utils==44.1.0 +git+https://github.com/alphagov/notifications-utils.git@44.2.1#egg=notifications-utils==44.2.1 # gds-metrics requires prometheseus 0.2.0, override that requirement as 0.7.1 brings significant performance gains prometheus-client==0.10.1 gds-metrics==0.2.4 ## The following requirements were added by pip freeze: -alembic==1.6.2 +alembic==1.6.3 amqp==1.4.9 anyjson==0.3.3 attrs==21.2.0 -awscli==1.19.69 +awscli==1.19.78 bcrypt==3.2.0 billiard==3.3.0.23 bleach==3.3.0 blinker==1.4 boto==2.49.0 -boto3==1.17.69 -botocore==1.20.69 +boto3==1.17.78 +botocore==1.20.78 certifi==2020.12.5 chardet==4.0.0 -click==7.1.2 +click==8.0.1 colorama==0.4.3 +dataclasses==0.8 dnspython==1.16.0 docutils==0.15.2 flask-redis==0.4.0 @@ -66,15 +67,16 @@ geojson==2.5.0 govuk-bank-holidays==0.8 greenlet==1.1.0 idna==2.10 -Jinja2==2.11.3 +importlib-metadata==4.0.1 +Jinja2==3.0.1 jmespath==0.10.0 kombu==3.0.37 Mako==1.1.4 -MarkupSafe==1.1.1 +MarkupSafe==2.0.1 mistune==0.8.4 orderedset==2.0.3 packaging==20.9 -phonenumbers==8.12.22 +phonenumbers==8.12.23 pyasn1==0.4.8 pycparser==2.20 pyparsing==2.4.7 @@ -94,6 +96,8 @@ six==1.16.0 smartypants==2.0.1 soupsieve==2.2.1 statsd==3.3.0 +typing-extensions==3.10.0.0 urllib3==1.26.4 webencodings==0.5.1 -Werkzeug==1.0.1 +Werkzeug==2.0.1 +zipp==3.4.1 diff --git a/tests/app/v2/notifications/test_post_letter_notifications.py b/tests/app/v2/notifications/test_post_letter_notifications.py index fb37b28be..4528a7566 100644 --- a/tests/app/v2/notifications/test_post_letter_notifications.py +++ b/tests/app/v2/notifications/test_post_letter_notifications.py @@ -222,7 +222,7 @@ def test_post_letter_notification_international_sets_rest_of_world( 'postcode': 'SW1A 1AA', 'name': 'Lizzie' }, - 'Address lines must not start with any of the following characters: @ ( ) = [ ] ” \\ / , < >', + 'Address lines must not start with any of the following characters: @ ( ) = [ ] ” \\ / , < > ~', ), ( [LETTER_TYPE, INTERNATIONAL_LETTERS],