Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update all minor dependencies #1843

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ def try_to_send_notifications_to_queue(notification_id_queue, service, saved_not
def handle_batch_error_and_forward(
task: Any,
signed_and_verified: list[tuple[Any, Any]],
notification_type: str,
notification_type: Optional[str],
exception,
receipt: UUID = None,
receipt: Optional[UUID] = None,
template: Any = None,
):
if receipt:
Expand Down
2 changes: 1 addition & 1 deletion app/dao/date_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_current_financial_year_start_year():


def get_financial_year_for_datetime(start_date):
if type(start_date) == date:
if type(start_date) is date:
start_date = datetime.combine(start_date, time.min)

year = int(start_date.strftime("%Y"))
Expand Down
2 changes: 1 addition & 1 deletion app/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NotificationDictToSign(TypedDict):
key_type: str # should be ApiKeyType but I can't import that here
client_reference: Optional[str]
queue: Optional[str]
sender_id: NotRequired[str]
sender_id: Optional[str]
job: NotRequired[str] # actually job_id
row_number: Optional[Any] # should this be int or str?

Expand Down
6 changes: 3 additions & 3 deletions app/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import string
from abc import ABC, abstractmethod
from enum import Enum
from typing import Any, Dict
from typing import Any, Dict, Optional
from uuid import UUID, uuid4

from flask import current_app
Expand Down Expand Up @@ -40,7 +40,7 @@ def inbox_name(self, suffix=None, process_type=None):
return f"{self.value}::{str(process_type)}"
return self.value

def inflight_prefix(self, suffix: str = None, process_type: str = None) -> str:
def inflight_prefix(self, suffix: Optional[str] = None, process_type: Optional[str] = None) -> str:
if process_type and suffix:
return f"{Buffer.IN_FLIGHT.value}:{str(suffix)}:{str(process_type)}"
if suffix:
Expand All @@ -50,7 +50,7 @@ def inflight_prefix(self, suffix: str = None, process_type: str = None) -> str:
return f"{Buffer.IN_FLIGHT.value}::{str(process_type)}"
return f"{Buffer.IN_FLIGHT.value}"

def inflight_name(self, receipt: UUID = uuid4(), suffix: str = None, process_type: str = None) -> str:
def inflight_name(self, receipt: UUID = uuid4(), suffix: Optional[str] = None, process_type: Optional[str] = None) -> str:
return f"{self.inflight_prefix(suffix, process_type)}:{str(receipt)}"


Expand Down
443 changes: 214 additions & 229 deletions poetry.lock

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "~3.10.9"
apig-wsgi = "2.15.0"
apig-wsgi = "2.18.0"
boto = "2.49.0"
cffi = "1.15.1"
celery = {extras = ["sqs"], version = "5.2.7"}
celery = {extras = ["sqs"], version = "5.3.1"}
docopt = "0.6.2"
environs = "9.3.2" # pyup: <9.3.3 # marshmallow v3 throws errors"
environs = "9.5.0" # pyup: <9.3.3 # marshmallow v3 throws errors"
fido2 = "0.9.3"
Flask-Bcrypt = "1.0.1"
flask-marshmallow = "0.14.0"
Expand All @@ -40,11 +40,11 @@ gunicorn = "20.1.0"
iso8601 = "2.0.0"
idna = "2.10" # pinned to align with test moto dependency requirements (for <=2.9)
jsonschema = "3.2.0"
marshmallow-sqlalchemy = "0.23.1"
marshmallow = "3.19.0"
marshmallow-sqlalchemy = "0.29.0"
marshmallow = "3.20.1"
python-magic = "0.4.27"
psycopg2-binary = "2.9.6"
PyJWT = "2.6.0"
PyJWT = "2.8.0"
pytz = "2021.3"
PyYAML = "5.3.1"
SQLAlchemy = "1.4.48"
Expand All @@ -61,44 +61,44 @@ more-itertools = "8.14.0"
awscli-cwlogs = "1.4.6"
aws-embedded-metrics = "1.0.8"
# Putting upgrade on hold due to new version introducing breaking changes
Werkzeug = "2.3.3"
Werkzeug = "2.3.6"
MarkupSafe = "2.1.3"
# REVIEW: v2 is using sha512 instead of sha1 by default (in v1)
itsdangerous = "2.1.2"
notifications-utils = { git = "https://github.com/cds-snc/notifier-utils.git", rev = "52.0.4" }
notifications-utils = { git = "https://github.com/cds-snc/notifier-utils.git", rev = "52.0.6" }
# rsa = "4.9 # awscli 1.22.38 depends on rsa<4.8
typing-extensions = "4.5.0"
typing-extensions = "4.7.1"
greenlet = "2.0.2"
simple-salesforce = "^1.12.3"

[tool.poetry.group.test.dependencies]
flake8 = "6.0.0"
flake8 = "6.1.0"
isort = "5.12.0"
moto = "4.1.11"
idna = "2.10"
pytest = "7.2.2"
pytest = "7.4.0"
pytest-env = "0.8.1"
pytest-mock = "3.10.0"
pytest-mock = "3.11.1"
pytest-cov = "3.0.0"
coveralls = "1.11.1"
pytest-xdist = "2.5.0"
freezegun = "1.2.2"
requests-mock = "1.10.0"
requests-mock = "1.11.0"
# optional requirements for jsonschema
strict-rfc3339 = "0.7"
rfc3987 = "1.3.8"
# used for creating manifest file locally
jinja2-cli = { extras = ["yaml"], version = "0.8.2" }
black = "23.3.0"
locust = "2.15.1"
mypy = "0.812"
black = "23.7.0"
locust = "2.16.1"
mypy = "0.991"
sqlalchemy-stubs = "0.4"
sqlalchemy2-stubs = "0.0.2a34"
networkx = "2.8.8" # not directly required, pinned by Snyk to avoid a vulnerability
pytest-mock-resources = { extras = ["redis"], version = "2.6.13" }
pytest-mock-resources = { extras = ["redis"], version = "2.9.1" }
types-boto = "2.49.18.8"
types-mock = "4.0.15.2"
types-python-dateutil = "2.8.19.13"
types-pytz = "2022.7.1.2"
types-requests = "2.28.11.17"
types-redis = "4.5.5.2"
types-requests = "2.31.0.2"
types-redis = "4.6.0.3"
2 changes: 1 addition & 1 deletion tests/app/celery/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,8 @@ def test_process_rows_works_without_key_type(
"row_number": "row_num",
"personalisation": {"foo": "bar"},
"queue": "send-{}-tasks".format(template_type),
"client_reference": reference,
"sender_id": str(sender_id) if sender_id else None,
"client_reference": reference,
},
)
task_mock.apply_async.assert_called_once()
Expand Down
2 changes: 1 addition & 1 deletion tests/app/template_statistics/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def set_up_get_all_from_hash(mock_redis, side_effect):
redis returns binary strings for both keys and values - so given a list of side effects (return values),
make sure
"""
assert type(side_effect) == list
assert isinstance(side_effect, list)
side_effects = []
for ret_val in side_effect:
if ret_val is None:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def os_environ():

class EnvironDict(dict):
def __setitem__(self, key, value):
assert type(value) == str
assert isinstance(value, str)
super().__setitem__(key, value)

os.environ = EnvironDict()
Expand Down
Loading
Loading