mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 14:42:24 -05:00
bump requirements, fix pyflake8 things, unpin botocore/awscli
This commit is contained in:
@@ -113,7 +113,7 @@ def __get_token_issuer(auth_token):
|
||||
client = get_token_issuer(auth_token)
|
||||
except TokenIssuerError:
|
||||
raise AuthError("Invalid token: iss field not provided", 403)
|
||||
except TokenDecodeError as e:
|
||||
except TokenDecodeError:
|
||||
raise AuthError("Invalid token: signature, api token is not valid", 403)
|
||||
return client
|
||||
|
||||
@@ -123,5 +123,5 @@ def handle_admin_key(auth_token, secret):
|
||||
decode_jwt_token(auth_token, secret)
|
||||
except TokenExpiredError:
|
||||
raise AuthError("Invalid token: expired, check that your system clock is accurate", 403)
|
||||
except TokenDecodeError as e:
|
||||
except TokenDecodeError:
|
||||
raise AuthError("Invalid token: signature, api token is not valid", 403)
|
||||
|
||||
@@ -14,6 +14,6 @@ def process_ses_results(self, response):
|
||||
errors = process_ses_response(response)
|
||||
if errors:
|
||||
current_app.logger.error(errors)
|
||||
except Exception as exc:
|
||||
except Exception:
|
||||
current_app.logger.exception('Error processing SES results')
|
||||
self.retry(queue=QueueNames.RETRY)
|
||||
|
||||
@@ -21,7 +21,7 @@ def deliver_sms(self, notification_id):
|
||||
if not notification:
|
||||
raise NoResultFound()
|
||||
send_to_providers.send_sms_to_provider(notification)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
try:
|
||||
current_app.logger.exception(
|
||||
"SMS notification delivery for id: {} failed".format(notification_id)
|
||||
@@ -46,7 +46,7 @@ def deliver_email(self, notification_id):
|
||||
except InvalidEmailError as e:
|
||||
current_app.logger.exception(e)
|
||||
update_notification_status_by_id(notification_id, 'technical-failure')
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
try:
|
||||
current_app.logger.exception(
|
||||
"RETRY: Email notification {} failed".format(notification_id)
|
||||
|
||||
@@ -14,7 +14,7 @@ class EmailClient(Client):
|
||||
'''
|
||||
|
||||
def send_email(self, *args, **kwargs):
|
||||
raise NotImplemented('TODO Need to implement.')
|
||||
raise NotImplementedError('TODO Need to implement.')
|
||||
|
||||
def get_name(self):
|
||||
raise NotImplemented('TODO Need to implement.')
|
||||
raise NotImplementedError('TODO Need to implement.')
|
||||
|
||||
@@ -19,7 +19,7 @@ class SmsClient(Client):
|
||||
'''
|
||||
|
||||
def send_sms(self, *args, **kwargs):
|
||||
raise NotImplemented('TODO Need to implement.')
|
||||
raise NotImplementedError('TODO Need to implement.')
|
||||
|
||||
def get_name(self):
|
||||
raise NotImplemented('TODO Need to implement.')
|
||||
raise NotImplementedError('TODO Need to implement.')
|
||||
|
||||
@@ -316,7 +316,7 @@ def replay_service_callbacks(file_name, service_id):
|
||||
try:
|
||||
notification = Notification.query.filter_by(client_reference=ref.strip()).one()
|
||||
notifications.append(notification)
|
||||
except NoResultFound as e:
|
||||
except NoResultFound:
|
||||
errors.append("Reference: {} was not found in notifications.".format(ref))
|
||||
|
||||
for e in errors:
|
||||
|
||||
@@ -121,6 +121,6 @@ def escape_special_characters(string):
|
||||
for special_character in ('\\', '_', '%', '/'):
|
||||
string = string.replace(
|
||||
special_character,
|
||||
'\{}'.format(special_character)
|
||||
r'\{}'.format(special_character)
|
||||
)
|
||||
return string
|
||||
|
||||
@@ -23,9 +23,7 @@ SQLAlchemy==1.2.12
|
||||
notifications-python-client==5.2.0
|
||||
|
||||
# PaaS
|
||||
awscli==1.15.82 # pyup: ignore
|
||||
awscli-cwlogs>=1.4,<1.5
|
||||
botocore<1.11.0 # pyup: ignore
|
||||
|
||||
|
||||
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
|
||||
|
||||
@@ -25,9 +25,7 @@ SQLAlchemy==1.2.12
|
||||
notifications-python-client==5.2.0
|
||||
|
||||
# PaaS
|
||||
awscli==1.15.82 # pyup: ignore
|
||||
awscli-cwlogs>=1.4,<1.5
|
||||
botocore<1.11.0 # pyup: ignore
|
||||
|
||||
|
||||
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
|
||||
@@ -38,20 +36,22 @@ git+https://github.com/alphagov/notifications-utils.git@30.5.6#egg=notifications
|
||||
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.1
|
||||
alembic==1.0.2
|
||||
amqp==1.4.9
|
||||
anyjson==0.3.3
|
||||
awscli==1.16.49
|
||||
bcrypt==3.1.4
|
||||
billiard==3.3.0.23
|
||||
bleach==2.1.3
|
||||
boto3==1.6.16
|
||||
botocore==1.12.39
|
||||
certifi==2018.10.15
|
||||
chardet==3.0.4
|
||||
Click==7.0
|
||||
colorama==0.3.9
|
||||
docutils==0.14
|
||||
Flask-Redis==0.3.0
|
||||
future==0.16.0
|
||||
future==0.17.1
|
||||
greenlet==0.4.15
|
||||
html5lib==1.0.1
|
||||
idna==2.7
|
||||
@@ -59,7 +59,7 @@ Jinja2==2.10
|
||||
jmespath==0.9.3
|
||||
kombu==3.0.37
|
||||
Mako==1.0.7
|
||||
MarkupSafe==1.0
|
||||
MarkupSafe==1.1.0
|
||||
mistune==0.8.3
|
||||
monotonic==1.5
|
||||
orderedset==2.0.1
|
||||
@@ -67,11 +67,11 @@ phonenumbers==8.9.4
|
||||
pyasn1==0.4.4
|
||||
pycparser==2.19
|
||||
PyPDF2==1.26.0
|
||||
python-dateutil==2.7.3
|
||||
python-dateutil==2.7.5
|
||||
python-editor==1.0.3
|
||||
python-json-logger==0.1.8
|
||||
pytz==2018.6
|
||||
PyYAML==3.13
|
||||
pytz==2018.7
|
||||
PyYAML==3.12
|
||||
redis==2.10.6
|
||||
requests==2.20.0
|
||||
rsa==3.4.2
|
||||
@@ -79,6 +79,6 @@ s3transfer==0.1.13
|
||||
six==1.11.0
|
||||
smartypants==2.0.1
|
||||
statsd==3.2.2
|
||||
urllib3==1.24
|
||||
urllib3==1.24.1
|
||||
webencodings==0.5.1
|
||||
Werkzeug==0.14.1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-r requirements.txt
|
||||
flake8==3.5.0
|
||||
pytest==3.9.3
|
||||
moto==1.3.6
|
||||
flake8==3.6.0
|
||||
pytest==3.10.0
|
||||
moto==1.3.7
|
||||
pytest-env==0.6.2
|
||||
pytest-mock==1.10.0
|
||||
pytest-cov==2.6.0
|
||||
pytest-xdist==1.23.2
|
||||
pytest-xdist==1.24.0
|
||||
coveralls==1.5.1
|
||||
freezegun==0.3.11
|
||||
requests-mock==1.5.2
|
||||
|
||||
Reference in New Issue
Block a user