From 1d67c82f0f718c483782cde538f07fd66b0d4662 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Fri, 2 Aug 2019 14:34:05 +0100 Subject: [PATCH] utils bump also dont use splitlines on csv data, there might be quoted newlines we dont want to split on --- .gitignore | 1 + app/utils.py | 2 +- pytest.ini | 1 + requirements-app.txt | 2 +- requirements.txt | 12 ++++++------ 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 5ec4a9689..36ac372c9 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ docs/_build/ target/ .idea/ .DS_Store +.vscode # Frontend dependencies and compiled assets app/assets/stylesheets/govuk_template/.sass-cache/ diff --git a/app/utils.py b/app/utils.py index 6120a0dc8..b3ded9282 100644 --- a/app/utils.py +++ b/app/utils.py @@ -304,7 +304,7 @@ class Spreadsheet(): def as_rows(self): if not self._rows: self._rows = list(csv.reader( - self._csv_data.strip().splitlines(), + StringIO(self._csv_data), quoting=csv.QUOTE_MINIMAL, skipinitialspace=True, )) diff --git a/pytest.ini b/pytest.ini index 1b601a845..eea60e3f2 100644 --- a/pytest.ini +++ b/pytest.ini @@ -14,3 +14,4 @@ env = filterwarnings = error:Applying marks directly:pytest.RemovedInPytest4Warning +addopts = -p no:warnings diff --git a/requirements-app.txt b/requirements-app.txt index 89eed08cb..bd972c21c 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -23,4 +23,4 @@ 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.4#egg=notifications-utils==33.2.4 +git+https://github.com/alphagov/notifications-utils.git@33.2.8#egg=notifications-utils==33.2.8 diff --git a/requirements.txt b/requirements.txt index 468dca804..4a1a756ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,13 +25,13 @@ 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.4#egg=notifications-utils==33.2.4 +git+https://github.com/alphagov/notifications-utils.git@33.2.8#egg=notifications-utils==33.2.8 ## The following requirements were added by pip freeze: -awscli==1.16.199 +awscli==1.16.209 bleach==3.1.0 boto3==1.6.16 -botocore==1.12.189 +botocore==1.12.199 certifi==2019.6.16 chardet==3.0.4 Click==7.0 @@ -48,21 +48,21 @@ jdcal==1.4.1 Jinja2==2.10.1 jmespath==0.9.4 lml==0.0.9 -lxml==4.3.4 +lxml==4.4.0 MarkupSafe==1.1.1 mistune==0.8.4 monotonic==1.5 openpyxl==2.5.14 orderedset==2.0.1 phonenumbers==8.10.13 -pyasn1==0.4.5 +pyasn1==0.4.6 pyexcel-ezodf==0.3.4 PyJWT==1.7.1 PyPDF2==1.26.0 python-dateutil==2.8.0 python-json-logger==0.1.11 PyYAML==4.2b1 -redis==3.2.1 +redis==3.3.4 requests==2.22.0 rsa==3.4.2 s3transfer==0.2.1