From 54a28856f0a57db8195529e86a13c86debe1047f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 17:35:05 +0000 Subject: [PATCH 1/4] Bump sqlalchemy from 1.2.17 to 1.3.0 Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.2.17 to 1.3.0. - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases) - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES) - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f4349c18..92e3c0f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,7 @@ python-stdnum==1.9 PyYAML==3.13 requests[security]==2.27.1 requests-mock==1.5.2 -SQLAlchemy==1.2.17 +SQLAlchemy==1.3.0 SQLAlchemy-Utils==0.33.11 teal==0.2.0a38 webargs==5.5.3 From 5dbbe775d801b708e730219ba10815ca637f301a Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 7 Feb 2022 18:56:34 +0100 Subject: [PATCH 2/4] Bump sqlalchemy from 1.2.17 to 1.3.24 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 92e3c0f5..96b2a227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,7 +23,7 @@ python-stdnum==1.9 PyYAML==3.13 requests[security]==2.27.1 requests-mock==1.5.2 -SQLAlchemy==1.3.0 +SQLAlchemy==1.3.24 SQLAlchemy-Utils==0.33.11 teal==0.2.0a38 webargs==5.5.3 From fbedbc8f7fda62572c02a47bc079537442f9c2a2 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 22 Feb 2022 12:22:23 +0100 Subject: [PATCH 3/4] Drop Additional keyword arguments [Deprecated since version 0.9](https://docs.sqlalchemy.org/en/12/core/type_basics.html#sqlalchemy.types.Float.params.**kwargs) --- ereuse_devicehub/resources/action/models.py | 2 +- ereuse_devicehub/resources/tradedocument/models.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index a213ced5..6fc039aa 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -1748,7 +1748,7 @@ class MoveOnDocument(JoinedTableMixin, ActionWithMultipleTradeDocuments): """Action than certify one movement of some indescriptible material of one container to an other.""" - weight = db.Column(db.Float(nullable=True)) + weight = db.Column(db.Float()) weight.comment = """Weight than go to recycling""" container_from_id = db.Column( db.BigInteger, diff --git a/ereuse_devicehub/resources/tradedocument/models.py b/ereuse_devicehub/resources/tradedocument/models.py index 177b2bd3..59d8a8c4 100644 --- a/ereuse_devicehub/resources/tradedocument/models.py +++ b/ereuse_devicehub/resources/tradedocument/models.py @@ -72,7 +72,7 @@ class TradeDocument(Thing): file_hash.comment = """This is the hash of the file produced from frontend.""" url = db.Column(URL()) url.comment = """This is the url where resides the document.""" - weight = db.Column(db.Float(nullable=True)) + weight = db.Column(db.Float()) weight.comment = """This is the weight of one container than this document express.""" __table_args__ = ( @@ -150,10 +150,10 @@ class TradeDocument(Thing): with suppress(StopIteration, ValueError): actions = copy.copy(self.actions) actions.sort(key=lambda x: x.created) - t_trades = ['Trade', - 'Confirm', - 'ConfirmRevokeDocument', - 'RevokeDocument', + t_trades = ['Trade', + 'Confirm', + 'ConfirmRevokeDocument', + 'RevokeDocument', 'ConfirmDocument'] return next(e for e in reversed(actions) if e.t in t_trades) From c51f1aa2e3179ae4437248863cab464ef8a44519 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 22 Feb 2022 12:31:56 +0100 Subject: [PATCH 4/4] Pin itsdangerous version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix ImportError: cannot import name ‘json’ from itsdangerous --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 9a8b67a3..303ffeb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ Flask-Cors==3.0.10 Flask-SQLAlchemy==2.3.2 hashids==1.2.0 inflection==0.3.1 +itsdangerous==2.0.1 marshmallow==3.0.0b11 marshmallow-enum==1.4.1 passlib==1.7.1