From bed6e111d68486c9419c7ddb98225a93090ed9a0 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 12:18:11 +0200 Subject: [PATCH 01/23] :recycle: Replace deprecated `pkg_resources` with `importlib` Signed-off-by: ff137 --- aries_cloudagent/config/logging.py | 7 +++++-- aries_cloudagent/utils/classloader.py | 22 ++++++++++++++-------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/aries_cloudagent/config/logging.py b/aries_cloudagent/config/logging.py index fa1a0db419..2e3661559e 100644 --- a/aries_cloudagent/config/logging.py +++ b/aries_cloudagent/config/logging.py @@ -8,7 +8,7 @@ import sys import yaml import time as mod_time -import pkg_resources +from importlib import resources from contextvars import ContextVar from datetime import datetime, timedelta @@ -69,9 +69,12 @@ def load_resource(path: str, encoding: str = None) -> TextIO: components = path.rsplit(":", 1) try: if len(components) == 1: + # Local filesystem resource return open(components[0], encoding=encoding) else: - bstream = pkg_resources.resource_stream(components[0], components[1]) + # Package resource + package, resource = components + bstream = resources.open_binary(package, resource) if encoding: return io.TextIOWrapper(bstream, encoding=encoding) return bstream diff --git a/aries_cloudagent/utils/classloader.py b/aries_cloudagent/utils/classloader.py index b2a24e62a3..f1644814ba 100644 --- a/aries_cloudagent/utils/classloader.py +++ b/aries_cloudagent/utils/classloader.py @@ -1,7 +1,8 @@ """The classloader provides utilties to dynamically load classes and modules.""" import inspect -import pkg_resources +from importlib import resources +from pathlib import Path import sys from importlib import import_module @@ -158,20 +159,25 @@ def load_subclass_of(cls, base_class: Type, mod_path: str, package: str = None): @classmethod def scan_subpackages(cls, package: str) -> Sequence[str]: """Return a list of sub-packages defined under a named package.""" - # FIXME use importlib.resources in python 3.7 if "." in package: package, sub_pkg = package.split(".", 1) else: sub_pkg = "." - if not pkg_resources.resource_isdir(package, sub_pkg): + + try: + package_path = resources.files(package) + except FileNotFoundError: raise ModuleLoadError(f"Undefined package {package}") + + if not (package_path / sub_pkg).is_dir(): + raise ModuleLoadError(f"Undefined package {package}") + found = [] joiner = "" if sub_pkg == "." else f"{sub_pkg}." - for sub_path in pkg_resources.resource_listdir(package, sub_pkg): - if pkg_resources.resource_exists( - package, f"{sub_pkg}/{sub_path}/__init__.py" - ): - found.append(f"{package}.{joiner}{sub_path}") + sub_path = package_path / sub_pkg + for item in sub_path.iterdir(): + if (item / "__init__.py").exists(): + found.append(f"{package}.{joiner}{item.name}") return found From 3bc373557013a4251ea8a634ed6433fbd137ecb1 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 12:34:23 +0200 Subject: [PATCH 02/23] :recycle: Refactor tests to accommodate for pkg_resources being replaced with importlib Signed-off-by: ff137 --- aries_cloudagent/config/tests/test_logging.py | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/aries_cloudagent/config/tests/test_logging.py b/aries_cloudagent/config/tests/test_logging.py index 7d8d220a0c..f1c08cc3b7 100644 --- a/aries_cloudagent/config/tests/test_logging.py +++ b/aries_cloudagent/config/tests/test_logging.py @@ -136,19 +136,27 @@ def test_banner_did(self): assert test_did in output def test_load_resource(self): + # Testing local file access with mock.patch("builtins.open", mock.MagicMock()) as mock_open: test_module.load_resource("abc", encoding="utf-8") + mock_open.assert_called_once() # Verify if open was called correctly mock_open.side_effect = IOError("insufficient privilege") - test_module.load_resource("abc", encoding="utf-8") - - with mock.patch.object( - test_module.pkg_resources, "resource_stream", mock.MagicMock() - ) as mock_res_stream, mock.patch.object( - test_module.io, "TextIOWrapper", mock.MagicMock() + with self.assertRaises(IOError): + test_module.load_resource("abc", encoding="utf-8") + + # Testing package resource access with encoding (text mode) + with mock.patch( + "importlib.resources.open_binary", mock.MagicMock() + ) as mock_open_binary, mock.patch( + "io.TextIOWrapper", mock.MagicMock() ) as mock_text_io_wrapper: test_module.load_resource("abc:def", encoding="utf-8") + mock_open_binary.assert_called_once_with("abc", "def") + mock_text_io_wrapper.assert_called_once() - with mock.patch.object( - test_module.pkg_resources, "resource_stream", mock.MagicMock() - ) as mock_res_stream: + # Testing package resource access without encoding (binary mode) + with mock.patch( + "importlib.resources.open_binary", mock.MagicMock() + ) as mock_open_binary: test_module.load_resource("abc:def", encoding=None) + mock_open_binary.assert_called_once_with("abc", "def") From 3f05059147d1a0f8de040cda78deabf01f8bddca Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 12:35:39 +0200 Subject: [PATCH 03/23] :art: remove unused import Signed-off-by: ff137 --- aries_cloudagent/utils/classloader.py | 1 - 1 file changed, 1 deletion(-) diff --git a/aries_cloudagent/utils/classloader.py b/aries_cloudagent/utils/classloader.py index f1644814ba..12a4d6fe01 100644 --- a/aries_cloudagent/utils/classloader.py +++ b/aries_cloudagent/utils/classloader.py @@ -2,7 +2,6 @@ import inspect from importlib import resources -from pathlib import Path import sys from importlib import import_module From 52e671b20633ad238d9fca0bfdad828cecd1a056 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 12:59:22 +0200 Subject: [PATCH 04/23] :art: remove the return type Signed-off-by: ff137 --- aries_cloudagent/config/logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries_cloudagent/config/logging.py b/aries_cloudagent/config/logging.py index 2e3661559e..760173e835 100644 --- a/aries_cloudagent/config/logging.py +++ b/aries_cloudagent/config/logging.py @@ -58,7 +58,7 @@ def filter(self, record): return True -def load_resource(path: str, encoding: str = None) -> TextIO: +def load_resource(path: str, encoding: str = None): """Open a resource file located in a python package or the local filesystem. Args: From 3f74fad59a4813299e7fc61b9cf96ce3712df3e0 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 12:59:40 +0200 Subject: [PATCH 05/23] :art: fix test Signed-off-by: ff137 --- aries_cloudagent/config/tests/test_logging.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aries_cloudagent/config/tests/test_logging.py b/aries_cloudagent/config/tests/test_logging.py index f1c08cc3b7..8ae25bad2b 100644 --- a/aries_cloudagent/config/tests/test_logging.py +++ b/aries_cloudagent/config/tests/test_logging.py @@ -139,10 +139,9 @@ def test_load_resource(self): # Testing local file access with mock.patch("builtins.open", mock.MagicMock()) as mock_open: test_module.load_resource("abc", encoding="utf-8") - mock_open.assert_called_once() # Verify if open was called correctly mock_open.side_effect = IOError("insufficient privilege") - with self.assertRaises(IOError): - test_module.load_resource("abc", encoding="utf-8") + # load_resource should absorb IOError + test_module.load_resource("abc", encoding="utf-8") # Testing package resource access with encoding (text mode) with mock.patch( From fc9894d6a621fd574f0530f6285773b194576015 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 13:08:45 +0200 Subject: [PATCH 06/23] :art: Signed-off-by: ff137 --- aries_cloudagent/config/logging.py | 1 - 1 file changed, 1 deletion(-) diff --git a/aries_cloudagent/config/logging.py b/aries_cloudagent/config/logging.py index 760173e835..149d5456b5 100644 --- a/aries_cloudagent/config/logging.py +++ b/aries_cloudagent/config/logging.py @@ -21,7 +21,6 @@ ) from logging.handlers import BaseRotatingHandler from random import randint -from typing import TextIO from portalocker import LOCK_EX, lock, unlock from pythonjsonlogger import jsonlogger From af87e1eec25e6a1c1cf5c751d80fb926d2817d1e Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 15:39:45 +0200 Subject: [PATCH 07/23] :art: Fix Marshmallow deprecation warnings by introducing metadata field Signed-off-by: ff137 --- .../anoncreds/models/anoncreds_cred_def.py | 75 ++++++++++++------- .../anoncreds/models/anoncreds_revocation.py | 59 ++++++++++----- .../anoncreds/models/anoncreds_schema.py | 28 ++++--- aries_cloudagent/anoncreds/routes.py | 28 ++++--- .../protocols/didexchange/v1_0/routes.py | 6 +- .../models/issuer_cred_rev_record.py | 6 +- 6 files changed, 133 insertions(+), 69 deletions(-) diff --git a/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py b/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py index b9e038ea9d..0630114bcc 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py @@ -16,7 +16,10 @@ NUM_STR_WHOLE_VALIDATE, ) -NUM_STR_WHOLE = {"validate": NUM_STR_WHOLE_VALIDATE, "example": NUM_STR_WHOLE_EXAMPLE} +NUM_STR_WHOLE = { + "validate": NUM_STR_WHOLE_VALIDATE, + "metadata": {"example": NUM_STR_WHOLE_EXAMPLE}, +} class CredDefValuePrimary(BaseModel): @@ -126,17 +129,27 @@ class Meta: model_class = CredDefValueRevocation unknown = EXCLUDE - g = fields.Str(example="1 1F14F&ECB578F 2 095E45DDF417D") - g_dash = fields.Str(example="1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D") - h = fields.Str(example="1 16675DAE54BFAE8 2 095E45DD417D") - h0 = fields.Str(example="1 21E5EF9476EAF18 2 095E45DDF417D") - h1 = fields.Str(example="1 236D1D99236090 2 095E45DDF417D") - h2 = fields.Str(example="1 1C3AE8D1F1E277 2 095E45DDF417D") - htilde = fields.Str(example="1 1D8549E8C0F8 2 095E45DDF417D") - h_cap = fields.Str(example="1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000") - u = fields.Str(example="1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000") - pk = fields.Str(example="1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D") - y = fields.Str(example="1 153558BD903312 2 095E45DDF417D 1 0000000000000000") + g = fields.Str(metadata={"example": "1 1F14F&ECB578F 2 095E45DDF417D"}) + g_dash = fields.Str( + metadata={"example": "1 1D64716fCDC00C 1 0C781960FA66E3D3 2 095E45DDF417D"} + ) + h = fields.Str(metadata={"example": "1 16675DAE54BFAE8 2 095E45DD417D"}) + h0 = fields.Str(metadata={"example": "1 21E5EF9476EAF18 2 095E45DDF417D"}) + h1 = fields.Str(metadata={"example": "1 236D1D99236090 2 095E45DDF417D"}) + h2 = fields.Str(metadata={"example": "1 1C3AE8D1F1E277 2 095E45DDF417D"}) + htilde = fields.Str(metadata={"example": "1 1D8549E8C0F8 2 095E45DDF417D"}) + h_cap = fields.Str( + metadata={"example": "1 1B2A32CF3167 1 2490FEBF6EE55 1 0000000000000000"} + ) + u = fields.Str( + metadata={"example": "1 0C430AAB2B4710 1 1CB3A0932EE7E 1 0000000000000000"} + ) + pk = fields.Str( + metadata={"example": "1 142CD5E5A7DC 1 153885BD903312 2 095E45DDF417D"} + ) + y = fields.Str( + metadata={"example": "1 153558BD903312 2 095E45DDF417D 1 0000000000000000"} + ) class CredDefValue(BaseModel): @@ -178,11 +191,11 @@ class Meta: primary = fields.Nested( CredDefValuePrimarySchema(), - description="Primary value for credential definition", + metadata={"description": "Primary value for credential definition"}, ) revocation = fields.Nested( CredDefValueRevocationSchema(), - description="Revocation value for credential definition", + metadata={"description": "Revocation value for credential definition"}, required=False, ) @@ -243,20 +256,26 @@ class Meta: unknown = EXCLUDE issuer_id = fields.Str( - description="Issuer Identifier of the credential definition or schema", + metadata={ + "description": "Issuer Identifier of the credential definition or schema", + "example": INDY_OR_KEY_DID_EXAMPLE, + }, data_key="issuerId", - example=INDY_OR_KEY_DID_EXAMPLE, ) schema_id = fields.Str( data_key="schemaId", - description="Schema identifier", - example=INDY_SCHEMA_ID_EXAMPLE, + metadata={ + "description": "Schema identifier", + "example": INDY_SCHEMA_ID_EXAMPLE, + }, ) type = fields.Str(validate=OneOf(["CL"])) tag = fields.Str( - description="""The tag value passed in by the Issuer to + metadata={ + "description": """The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation.""", - example="default", + "example": "default", + } ) value = fields.Nested(CredDefValueSchema()) @@ -315,12 +334,14 @@ class Meta: ) ) credential_definition_id = fields.Str( - description="credential definition id", + metadata={ + "description": "credential definition id", + "example": INDY_CRED_DEF_ID_EXAMPLE, + }, allow_none=True, - example=INDY_CRED_DEF_ID_EXAMPLE, ) credential_definition = fields.Nested( - CredDefSchema(), description="credential definition" + CredDefSchema(), metadata={"description": "credential definition"} ) @@ -418,11 +439,13 @@ class Meta: unknown = EXCLUDE credential_definition_id = fields.Str( - description="credential definition id", - example=INDY_CRED_DEF_ID_EXAMPLE, + metadata={ + "description": "credential definition id", + "example": INDY_CRED_DEF_ID_EXAMPLE, + }, ) credential_definition = fields.Nested( - CredDefSchema(), description="credential definition" + CredDefSchema(), metadata={"description": "credential definition"} ) resolution_metadata = fields.Dict() credential_definitions_metadata = fields.Dict() diff --git a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py index b60eefafa2..3a257749c4 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py @@ -130,18 +130,25 @@ class Meta: unknown = EXCLUDE issuer_id = fields.Str( - description="Issuer Identifier of the credential definition or schema", + metadata={ + "description": "Issuer Identifier of the credential definition or schema", + "example": INDY_OR_KEY_DID_EXAMPLE, + }, data_key="issuerId", - example=INDY_OR_KEY_DID_EXAMPLE, ) type = fields.Str(data_key="revocDefType") cred_def_id = fields.Str( - description="Credential definition identifier", + metadata={ + "description": "Credential definition identifier", + "example": INDY_CRED_DEF_ID_EXAMPLE, + }, data_key="credDefId", - example=INDY_CRED_DEF_ID_EXAMPLE, ) tag = fields.Str( - description="tag for the revocation registry definition", example="default" + metadata={ + "description": "tag for the revocation registry definition", + "example": "default", + } ) value = fields.Nested(RevRegDefValueSchema()) @@ -204,11 +211,13 @@ class Meta: ) ) revocation_registry_definition_id = fields.Str( - description="revocation registry definition id", - example=INDY_REV_REG_ID_EXAMPLE, + metadata={ + "description": "revocation registry definition id", + "example": INDY_REV_REG_ID_EXAMPLE, + } ) revocation_registry_definition = fields.Nested( - RevRegDefSchema(), description="revocation registry definition" + RevRegDefSchema(), metadata={"description": "revocation registry definition"} ) @@ -381,30 +390,40 @@ class Meta: unknown = EXCLUDE issuer_id = fields.Str( - description="Issuer Identifier of the credential definition or schema", + metadata={ + "description": "Issuer Identifier of the credential definition or schema", + "example": INDY_OR_KEY_DID_EXAMPLE, + }, data_key="issuerId", - example=INDY_OR_KEY_DID_EXAMPLE, ) rev_reg_def_id = fields.Str( - description="The ID of the revocation registry definition", + metadata={ + "description": "The ID of the revocation registry definition", + "example": INDY_REV_REG_ID_EXAMPLE, + }, data_key="revRegDefId", - example=INDY_REV_REG_ID_EXAMPLE, ) revocation_list = fields.List( fields.Int(), - description="Bit list representing revoked credentials", + metadata={ + "description": "Bit list representing revoked credentials", + "example": [0, 1, 1, 0], + }, data_key="revocationList", - example=[0, 1, 1, 0], ) current_accumulator = fields.Str( - description="The current accumalator value", - example="21 118...1FB", + metadata={ + "description": "The current accumalator value", + "example": "21 118...1FB", + }, data_key="currentAccumulator", ) timestamp = fields.Int( - description="Timestamp at which revocation list is applicable", + metadata={ + "description": "Timestamp at which revocation list is applicable", + "example": INDY_ISO8601_DATETIME_EXAMPLE, + }, required=False, - example=INDY_ISO8601_DATETIME_EXAMPLE, ) @@ -458,7 +477,9 @@ class Meta: ] ) ) - revocation_list = fields.Nested(RevListSchema(), description="revocation list") + revocation_list = fields.Nested( + RevListSchema(), metadata={"description": "revocation list"} + ) class RevListResult(BaseModel): diff --git a/aries_cloudagent/anoncreds/models/anoncreds_schema.py b/aries_cloudagent/anoncreds/models/anoncreds_schema.py index 58cb4a06f2..c9190239fa 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_schema.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_schema.py @@ -61,20 +61,26 @@ class Meta: unknown = EXCLUDE issuer_id = fields.Str( - description="Issuer Identifier of the credential definition or schema", + metadata={ + "description": "Issuer Identifier of the credential definition or schema", + "example": INDY_OR_KEY_DID_EXAMPLE, + }, data_key="issuerId", - example=INDY_OR_KEY_DID_EXAMPLE, ) attr_names = fields.List( fields.Str( - description="Attribute name", - example="score", + metadata={ + "description": "Attribute name", + "example": "score", + } ), - description="Schema attribute names", + metadata={"description": "Schema attribute names"}, data_key="attrNames", ) - name = fields.Str(description="Schema name", example="Example schema") - version = fields.Str(description="Schema version", example="1.0") + name = fields.Str( + metadata={"description": "Schema name", "example": "Example schema"} + ) + version = fields.Str(metadata={"description": "Schema version", "example": "1.0"}) class GetSchemaResult(BaseModel): @@ -130,7 +136,7 @@ class Meta: schema_value = fields.Nested(AnonCredsSchemaSchema(), data_key="schema") schema_id = fields.Str( - description="Schema identifier", example=INDY_SCHEMA_ID_EXAMPLE + metadata={"description": "Schema identifier", "example": INDY_SCHEMA_ID_EXAMPLE} ) resolution_metadata = fields.Dict() schema_metadata = fields.Dict() @@ -184,8 +190,10 @@ class Meta: ) ) schema_id = fields.Str( - description="Schema identifier", - example=INDY_SCHEMA_ID_EXAMPLE, + metadata={ + "description": "Schema identifier", + "example": INDY_SCHEMA_ID_EXAMPLE, + } ) schema_value = fields.Nested(AnonCredsSchemaSchema(), data_key="schema") diff --git a/aries_cloudagent/anoncreds/routes.py b/aries_cloudagent/anoncreds/routes.py index 2931c18807..1edc0607a3 100644 --- a/aries_cloudagent/anoncreds/routes.py +++ b/aries_cloudagent/anoncreds/routes.py @@ -447,8 +447,10 @@ class GetCredDefsResponseSchema(OpenAPISchema): credential_definition_ids = fields.List( fields.Str( - description="credential definition identifiers", - example="GvLGiRogTJubmj5B36qhYz:3:CL:8:faber.agent.degree_schema", + metadata={ + "description": "credential definition identifiers", + "example": "GvLGiRogTJubmj5B36qhYz:3:CL:8:faber.agent.degree_schema", + } ) ) @@ -482,20 +484,28 @@ class InnerRevRegDefSchema(OpenAPISchema): """Request schema for revocation registry creation request.""" issuer_id = fields.Str( - description="Issuer Identifier of the credential definition or schema", + metadata={ + "description": "Issuer Identifier of the credential definition or schema", + "example": INDY_OR_KEY_DID_EXAMPLE, + }, data_key="issuerId", - example=INDY_OR_KEY_DID_EXAMPLE, ) cred_def_id = fields.Str( - description="Credential definition identifier", + metadata={ + "description": "Credential definition identifier", + "example": INDY_SCHEMA_ID_EXAMPLE, + }, data_key="credDefId", - example=INDY_SCHEMA_ID_EXAMPLE, ) - tag = fields.Str(description="tag for revocation registry", example="default") + tag = fields.Str( + metadata={"description": "tag for revocation registry", "example": "default"} + ) max_cred_num = fields.Int( - description="Maximum number of credential revocations per registry", + metadata={ + "description": "Maximum number of credential revocations per registry", + "example": 777, + }, data_key="maxCredNum", - example=666, ) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/routes.py b/aries_cloudagent/protocols/didexchange/v1_0/routes.py index 0c7b90cd7c..4c3197bd57 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/routes.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/routes.py @@ -185,9 +185,11 @@ class DIDXRejectRequestSchema(OpenAPISchema): """Parameters and validators for reject-request request string.""" reason = fields.Str( - description="Reason for rejecting the DID Exchange", + metadata={ + "description": "Reason for rejecting the DID Exchange", + "example": "Request rejected", + }, required=False, - example="Request rejected", ) diff --git a/aries_cloudagent/revocation_anoncreds/models/issuer_cred_rev_record.py b/aries_cloudagent/revocation_anoncreds/models/issuer_cred_rev_record.py index 49a68b9209..bab3909b83 100644 --- a/aries_cloudagent/revocation_anoncreds/models/issuer_cred_rev_record.py +++ b/aries_cloudagent/revocation_anoncreds/models/issuer_cred_rev_record.py @@ -154,15 +154,15 @@ class Meta: ) rev_reg_id = fields.Str( required=False, - description="Revocation registry identifier", + metadata={"description": "Revocation registry identifier"}, ) cred_def_id = fields.Str( required=False, - description="Credential definition identifier", + metadata={"description": "Credential definition identifier"}, ) cred_rev_id = fields.Str( required=False, - description="Credential revocation identifier", + metadata={"description": "Credential revocation identifier"}, ) cred_ex_version = fields.Str( required=False, metadata={"description": "Credential exchange version"} From b6ff481071554ac22cf970721be51ce2dc0c4455 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 16:02:18 +0200 Subject: [PATCH 08/23] :arrow_up: Upgrade `jsonpath-ng` Signed-off-by: ff137 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d206d36eb1..c168a103fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ base58="~2.1.0" ConfigArgParse="~1.5.3" deepmerge="~0.3.0" ecdsa="~0.16.1" -jsonpath_ng="1.5.2" +jsonpath-ng="1.6.1" Markdown="~3.1.1" markupsafe="2.0.1" marshmallow="~3.20.1" From 1a49a0e2592f9fbd2ba2ba948a48b5abb9d45dae Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 16:05:27 +0200 Subject: [PATCH 09/23] Update lock file Signed-off-by: ff137 --- poetry.lock | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8081a9129a..0de5538f30 100644 --- a/poetry.lock +++ b/poetry.lock @@ -790,17 +790,6 @@ toolz = ">=0.8.0" [package.extras] cython = ["cython"] -[[package]] -name = "decorator" -version = "5.1.1" -description = "Decorators for Humans" -optional = false -python-versions = ">=3.5" -files = [ - {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, - {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, -] - [[package]] name = "deepmerge" version = "0.3.0" @@ -1203,33 +1192,31 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonpath-ng" -version = "1.5.2" +version = "1.6.1" description = "A final implementation of JSONPath for Python that aims to be standard compliant, including arithmetic and binary comparison operators and providing clear AST for metaprogramming." optional = false python-versions = "*" files = [ - {file = "jsonpath-ng-1.5.2.tar.gz", hash = "sha256:144d91379be14d9019f51973bd647719c877bfc07dc6f3f5068895765950c69d"}, - {file = "jsonpath_ng-1.5.2-py3-none-any.whl", hash = "sha256:93d1f248be68e485eb6635c3a01b2d681f296dc349d71e37c8755837b8944d36"}, + {file = "jsonpath-ng-1.6.1.tar.gz", hash = "sha256:086c37ba4917304850bd837aeab806670224d3f038fe2833ff593a672ef0a5fa"}, + {file = "jsonpath_ng-1.6.1-py3-none-any.whl", hash = "sha256:8f22cd8273d7772eea9aaa84d922e0841aa36fdb8a2c6b7f6c3791a16a9bc0be"}, ] [package.dependencies] -decorator = "*" ply = "*" -six = "*" [[package]] name = "jwcrypto" -version = "1.5.3" +version = "1.5.4" description = "Implementation of JOSE Web standards" optional = false python-versions = ">= 3.8" files = [ - {file = "jwcrypto-1.5.3.tar.gz", hash = "sha256:3af84bb6ed78fb29325308d4eca55e2842f1583010cb6c09207375a4ecea151f"}, + {file = "jwcrypto-1.5.4.tar.gz", hash = "sha256:0815fbab613db99bad85691da5f136f8860423396667728a264bcfa6e1db36b0"}, ] [package.dependencies] cryptography = ">=3.4" -typing_extensions = "*" +typing_extensions = ">=4.5.0" [[package]] name = "lxml" @@ -2777,4 +2764,4 @@ indy = ["python3-indy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "7170ac3cc281b82cf814d0757f2b7d0b94bf7009a58921ee9b6566dc51c957bd" +content-hash = "03d6243f318a33b1924161fd6a5458bf41954757f82da8e6bbb3f2a04a5998e0" From c73527d2b8061c4a774678a097a0910b4982235d Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 16:14:59 +0200 Subject: [PATCH 10/23] :arrow_up: Bump `rlp` to latest Signed-off-by: ff137 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c168a103fe..54e5fc3121 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ pytz="~2021.1" pyyaml="~6.0.1" qrcode = {version = ">=6.1,<7.0", extras = ["pil"]} requests="~2.31.0" -rlp="1.2.0" +rlp="4.0.0" unflatten="~0.1" sd-jwt = "^0.10.3" did-peer-2 = "^0.1.2" From c8386ec5ea25e8d5718bc6b8a78e6592a5c3cfaa Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 16:15:07 +0200 Subject: [PATCH 11/23] Update lock file Signed-off-by: ff137 --- poetry.lock | 77 +++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0de5538f30..38ea7cfe68 100644 --- a/poetry.lock +++ b/poetry.lock @@ -871,62 +871,59 @@ gmpy2 = ["gmpy2"] [[package]] name = "eth-hash" -version = "0.3.3" +version = "0.6.0" description = "eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3" optional = false -python-versions = ">=3.5, <4" +python-versions = ">=3.8, <4" files = [ - {file = "eth-hash-0.3.3.tar.gz", hash = "sha256:8cde211519ff1a98b46e9057cb909f12ab62e263eb30a0a94e2f7e1f46ac67a0"}, - {file = "eth_hash-0.3.3-py3-none-any.whl", hash = "sha256:3c884e4f788b38cc92cff05c4e43bc6b82686066f04ecfae0e11cdcbe5a283bd"}, + {file = "eth-hash-0.6.0.tar.gz", hash = "sha256:ae72889e60db6acbb3872c288cfa02ed157f4c27630fcd7f9c8442302c31e478"}, + {file = "eth_hash-0.6.0-py3-none-any.whl", hash = "sha256:9f8daaa345764f8871dc461855049ac54ae4291d780279bce6fce7f24e3f17d3"}, ] [package.extras] -dev = ["Sphinx (>=1.6.5,<2)", "bumpversion (>=0.5.3,<1)", "flake8 (==3.7.9)", "ipython", "isort (>=4.2.15,<5)", "mypy (==0.770)", "pydocstyle (>=5.0.0,<6)", "pytest (==5.4.1)", "pytest-watch (>=4.1.0,<5)", "pytest-xdist", "sphinx-rtd-theme (>=0.1.9,<1)", "towncrier (>=19.2.0,<20)", "tox (==3.14.6)", "twine", "wheel"] -doc = ["Sphinx (>=1.6.5,<2)", "sphinx-rtd-theme (>=0.1.9,<1)", "towncrier (>=19.2.0,<20)"] -lint = ["flake8 (==3.7.9)", "isort (>=4.2.15,<5)", "mypy (==0.770)", "pydocstyle (>=5.0.0,<6)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] pycryptodome = ["pycryptodome (>=3.6.6,<4)"] -pysha3 = ["pysha3 (>=1.0.0,<2.0.0)"] -test = ["pytest (==5.4.1)", "pytest-xdist", "tox (==3.14.6)"] +pysha3 = ["pysha3 (>=1.0.0,<2.0.0)", "safe-pysha3 (>=1.0.0)"] +test = ["pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-typing" -version = "2.3.0" +version = "4.0.0" description = "eth-typing: Common type annotations for ethereum python packages" optional = false -python-versions = ">=3.5, <4" +python-versions = ">=3.8, <4" files = [ - {file = "eth-typing-2.3.0.tar.gz", hash = "sha256:39cce97f401f082739b19258dfa3355101c64390914c73fe2b90012f443e0dc7"}, - {file = "eth_typing-2.3.0-py3-none-any.whl", hash = "sha256:b7fa58635c1cb0cbf538b2f5f1e66139575ea4853eac1d6000f0961a4b277422"}, + {file = "eth-typing-4.0.0.tar.gz", hash = "sha256:9af0b6beafbc5c2e18daf19da5f5a68315023172c4e79d149e12ad10a3d3f731"}, + {file = "eth_typing-4.0.0-py3-none-any.whl", hash = "sha256:7e556bea322b6e8c0a231547b736c258e10ce9eed5ddc254f51031b12af66a16"}, ] [package.extras] -dev = ["Sphinx (>=1.6.5,<2)", "bumpversion (>=0.5.3,<1)", "flake8 (==3.8.3)", "ipython", "isort (>=4.2.15,<5)", "mypy (==0.782)", "pydocstyle (>=3.0.0,<4)", "pytest (>=4.4,<4.5)", "pytest-watch (>=4.1.0,<5)", "pytest-xdist", "sphinx-rtd-theme (>=0.1.9)", "tox (>=2.9.1,<3)", "twine", "wheel"] -doc = ["Sphinx (>=1.6.5,<2)", "sphinx-rtd-theme (>=0.1.9)"] -lint = ["flake8 (==3.8.3)", "isort (>=4.2.15,<5)", "mypy (==0.782)", "pydocstyle (>=3.0.0,<4)"] -test = ["pytest (>=4.4,<4.5)", "pytest-xdist", "tox (>=2.9.1,<3)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +test = ["pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-utils" -version = "1.10.0" +version = "3.0.0" description = "eth-utils: Common utility functions for python code that interacts with Ethereum" optional = false -python-versions = ">=3.5,!=3.5.2,<4" +python-versions = ">=3.8, <4" files = [ - {file = "eth-utils-1.10.0.tar.gz", hash = "sha256:bf82762a46978714190b0370265a7148c954d3f0adaa31c6f085ea375e4c61af"}, - {file = "eth_utils-1.10.0-py3-none-any.whl", hash = "sha256:74240a8c6f652d085ed3c85f5f1654203d2f10ff9062f83b3bad0a12ff321c7a"}, + {file = "eth-utils-3.0.0.tar.gz", hash = "sha256:8721869568448349bceae63c277b75758d11e0dc190e7ef31e161b89619458f1"}, + {file = "eth_utils-3.0.0-py3-none-any.whl", hash = "sha256:9a284106acf6f6ce91ddf792489cf8bd4c681fd5ae7653d2f3d5d100be5c3905"}, ] [package.dependencies] -cytoolz = {version = ">=0.10.1,<1.0.0", markers = "implementation_name == \"cpython\""} -eth-hash = ">=0.3.1,<0.4.0" -eth-typing = ">=2.2.1,<3.0.0" -toolz = {version = ">0.8.2,<1", markers = "implementation_name == \"pypy\""} +cytoolz = {version = ">=0.10.1", markers = "implementation_name == \"cpython\""} +eth-hash = ">=0.3.1" +eth-typing = ">=3.0.0" +toolz = {version = ">0.8.2", markers = "implementation_name == \"pypy\""} [package.extras] -dev = ["Sphinx (>=1.6.5,<2)", "black (>=18.6b4,<19)", "bumpversion (>=0.5.3,<1)", "flake8 (==3.7.9)", "hypothesis (>=4.43.0,<5.0.0)", "ipython", "isort (>=4.2.15,<5)", "mypy (==0.720)", "pydocstyle (>=5.0.0,<6)", "pytest (==5.4.1)", "pytest (>=3.4.1,<4.0.0)", "pytest-watch (>=4.1.0,<5)", "pytest-xdist", "sphinx-rtd-theme (>=0.1.9,<2)", "towncrier (>=19.2.0,<20)", "tox (==3.14.6)", "twine (>=1.13,<2)", "wheel (>=0.30.0,<1.0.0)"] -doc = ["Sphinx (>=1.6.5,<2)", "sphinx-rtd-theme (>=0.1.9,<2)", "towncrier (>=19.2.0,<20)"] -lint = ["black (>=18.6b4,<19)", "flake8 (==3.7.9)", "isort (>=4.2.15,<5)", "mypy (==0.720)", "pydocstyle (>=5.0.0,<6)", "pytest (>=3.4.1,<4.0.0)"] -test = ["hypothesis (>=4.43.0,<5.0.0)", "pytest (==5.4.1)", "pytest-xdist", "tox (==3.14.6)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "hypothesis (>=4.43.0)", "ipython", "mypy (==1.5.1)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +test = ["hypothesis (>=4.43.0)", "mypy (==1.5.1)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "exceptiongroup" @@ -2241,23 +2238,23 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rlp" -version = "1.2.0" -description = "A package for Recursive Length Prefix encoding and decoding" +version = "4.0.0" +description = "rlp: A package for Recursive Length Prefix encoding and decoding" optional = false -python-versions = "*" +python-versions = ">=3.8, <4" files = [ - {file = "rlp-1.2.0-py2.py3-none-any.whl", hash = "sha256:97b7e770f16442772311b33e6bc28b45318e7c8def69b9df16452304e224e9df"}, - {file = "rlp-1.2.0.tar.gz", hash = "sha256:27273fc2dbc3513c1e05ea6b8af28aac8745fb09c164e39e2ed2807bf7e1b342"}, + {file = "rlp-4.0.0-py3-none-any.whl", hash = "sha256:1747fd933e054e6d25abfe591be92e19a4193a56c93981c05bd0f84dfe279f14"}, + {file = "rlp-4.0.0.tar.gz", hash = "sha256:61a5541f86e4684ab145cb849a5929d2ced8222930a570b3941cf4af16b72a78"}, ] [package.dependencies] -eth-utils = ">=1.0.2,<2" +eth-utils = ">=2" [package.extras] -dev = ["Sphinx (>=1.6.5,<2)", "bumpversion (>=0.5.3,<1)", "flake8 (==3.4.1)", "hypothesis (==3.56.5)", "ipython", "pytest (==3.3.2)", "pytest-watch (>=4.1.0,<5)", "pytest-xdist", "setuptools (>=36.2.0)", "sphinx-rtd-theme (>=0.1.9)", "tox (>=2.9.1,<3)", "twine", "wheel"] -doc = ["Sphinx (>=1.6.5,<2)", "sphinx-rtd-theme (>=0.1.9)"] -lint = ["flake8 (==3.4.1)"] -test = ["hypothesis (==3.56.5)", "pytest (==3.3.2)", "tox (>=2.9.1,<3)"] +dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "hypothesis (==5.19.0)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +rust-backend = ["rusty-rlp (>=0.2.1,<0.3)"] +test = ["hypothesis (==5.19.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "ruff" @@ -2764,4 +2761,4 @@ indy = ["python3-indy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "03d6243f318a33b1924161fd6a5458bf41954757f82da8e6bbb3f2a04a5998e0" +content-hash = "d6262896db12a3f1c1bc4cb2039ea82799688e1ea89e7c6caf12114b14f1c982" From adcd45b36ce63d608254770b193bc24a135c5446 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 17:42:34 +0200 Subject: [PATCH 12/23] :art: Fix Marshmallow deprecation warnings with metadata field Signed-off-by: ff137 --- .../anoncreds/models/anoncreds_revocation.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py index 3a257749c4..5fe66d8f0e 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py @@ -62,15 +62,18 @@ class Meta: unknown = EXCLUDE public_keys = fields.Dict( - data_key="publicKeys", example=INDY_RAW_PUBLIC_KEY_EXAMPLE + data_key="publicKeys", metadata={"example": INDY_RAW_PUBLIC_KEY_EXAMPLE} ) - max_cred_num = fields.Int(data_key="maxCredNum", example=666) + max_cred_num = fields.Int(data_key="maxCredNum", metadata={"example": 777}) tails_location = fields.Str( data_key="tailsLocation", - example="https://tails-server.com/hash/7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P", + metadata={ + "example": "https://tails-server.com/hash/7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P" + }, ) tails_hash = fields.Str( - data_key="tailsHash", example="7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P" + data_key="tailsHash", + metadata={"example": "7Qen9RDyemMuV7xGQvp7NjwMSpyHieJyBakycxN7dX7P"}, ) From a865df71b9797d25f9f714ad0979569485792303 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 17:50:19 +0200 Subject: [PATCH 13/23] :art: `send_webhook` tests to expect and absorb deprecation warning Signed-off-by: ff137 --- aries_cloudagent/admin/tests/test_admin_server.py | 5 +++-- aries_cloudagent/core/tests/test_dispatcher.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/aries_cloudagent/admin/tests/test_admin_server.py b/aries_cloudagent/admin/tests/test_admin_server.py index 7eae850288..72a4300e69 100644 --- a/aries_cloudagent/admin/tests/test_admin_server.py +++ b/aries_cloudagent/admin/tests/test_admin_server.py @@ -507,5 +507,6 @@ def _smaller_scope(): with pytest.raises(RuntimeError): await responder.send_outbound(None) - with pytest.raises(RuntimeError): - await responder.send_webhook("test", {}) + with pytest.deprecated_call(): + with pytest.raises(RuntimeError): + await responder.send_webhook("test", {}) diff --git a/aries_cloudagent/core/tests/test_dispatcher.py b/aries_cloudagent/core/tests/test_dispatcher.py index adceb7d5ec..0644c6d3fa 100644 --- a/aries_cloudagent/core/tests/test_dispatcher.py +++ b/aries_cloudagent/core/tests/test_dispatcher.py @@ -590,8 +590,9 @@ def _smaller_scope(): with self.assertRaises(RuntimeError): await responder.send_outbound(None) - with self.assertRaises(RuntimeError): - await responder.send_webhook("test", {}) + with pytest.deprecated_call(): + with self.assertRaises(RuntimeError): + await responder.send_webhook("test", {}) # async def test_dispatch_version_with_degraded_features(self): # profile = make_profile() From d1d276b18107fcec24fbe90c516d413dca813c35 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 17:57:01 +0200 Subject: [PATCH 14/23] :arrow_up: Upgrade `Markdown` to latest Signed-off-by: ff137 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 54e5fc3121..eaec349daf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ ConfigArgParse="~1.5.3" deepmerge="~0.3.0" ecdsa="~0.16.1" jsonpath-ng="1.6.1" -Markdown="~3.1.1" +Markdown="~3.5.2" markupsafe="2.0.1" marshmallow="~3.20.1" nest_asyncio="~1.5.5" From b8a8e6868853da2685dc1718554ea333bba7d7f2 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 2 Feb 2024 17:59:14 +0200 Subject: [PATCH 15/23] Update lock file Signed-off-by: ff137 --- poetry.lock | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index 38ea7cfe68..cc6a1b1369 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1122,6 +1122,25 @@ files = [ {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] +[[package]] +name = "importlib-metadata" +version = "7.0.1" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, + {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + [[package]] name = "indy-credx" version = "1.1.1" @@ -1310,19 +1329,20 @@ source = ["Cython (>=3.0.7)"] [[package]] name = "markdown" -version = "3.1.1" -description = "Python implementation of Markdown." +version = "3.5.2" +description = "Python implementation of John Gruber's Markdown." optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" +python-versions = ">=3.8" files = [ - {file = "Markdown-3.1.1-py2.py3-none-any.whl", hash = "sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"}, - {file = "Markdown-3.1.1.tar.gz", hash = "sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a"}, + {file = "Markdown-3.5.2-py3-none-any.whl", hash = "sha256:d43323865d89fc0cb9b20c75fc8ad313af307cc087e84b657d9eec768eddeadd"}, + {file = "Markdown-3.5.2.tar.gz", hash = "sha256:e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8"}, ] [package.dependencies] -setuptools = ">=36" +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] +docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] [[package]] @@ -2753,6 +2773,21 @@ files = [ idna = ">=2.0" multidict = ">=4.0" +[[package]] +name = "zipp" +version = "3.17.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, + {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] + [extras] askar = ["anoncreds", "aries-askar", "indy-credx", "indy-vdr"] bbs = ["ursa-bbs-signatures"] @@ -2761,4 +2796,4 @@ indy = ["python3-indy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "d6262896db12a3f1c1bc4cb2039ea82799688e1ea89e7c6caf12114b14f1c982" +content-hash = "e09d129a9c0ef3a42156af4a26400519bc9b66e69ceeb71334bfcf64d4a0bf25" From 97640e1b51ec1c22e58de50dcea142299aa31d77 Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 7 Feb 2024 23:30:28 +0200 Subject: [PATCH 16/23] :art: replace usage of deprecated .warn method with .warning Signed-off-by: ff137 --- aries_cloudagent/anoncreds/default/legacy_indy/registry.py | 6 +++--- aries_cloudagent/anoncreds/revocation.py | 6 +++--- aries_cloudagent/indy/credx/issuer.py | 6 +++--- aries_cloudagent/revocation/models/issuer_rev_reg_record.py | 6 +++--- aries_cloudagent/revocation/recover.py | 2 +- aries_cloudagent/revocation_anoncreds/recover.py | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/aries_cloudagent/anoncreds/default/legacy_indy/registry.py b/aries_cloudagent/anoncreds/default/legacy_indy/registry.py index 3be3cab976..c302f2348d 100644 --- a/aries_cloudagent/anoncreds/default/legacy_indy/registry.py +++ b/aries_cloudagent/anoncreds/default/legacy_indy/registry.py @@ -796,8 +796,8 @@ async def _revoc_reg_entry_with_fix( # Ledger rejected transaction request: client request invalid: # InvalidClientRequest(...) # In this scenario we try to post a correction - LOGGER.warn("Retry ledger update/fix due to error") - LOGGER.warn(err) + LOGGER.warning("Retry ledger update/fix due to error") + LOGGER.warning(err) (_, _, rev_entry_res) = await self.fix_ledger_entry( profile, rev_list, @@ -806,7 +806,7 @@ async def _revoc_reg_entry_with_fix( write_ledger, endorser_did, ) - LOGGER.warn("Ledger update/fix applied") + LOGGER.warning("Ledger update/fix applied") elif "InvalidClientTaaAcceptanceError" in err.roll_up: # if no write access (with "InvalidClientTaaAcceptanceError") # e.g. aries_cloudagent.ledger.error.LedgerTransactionError: diff --git a/aries_cloudagent/anoncreds/revocation.py b/aries_cloudagent/anoncreds/revocation.py index c596c8a0e9..0b9891b4dc 100644 --- a/aries_cloudagent/anoncreds/revocation.py +++ b/aries_cloudagent/anoncreds/revocation.py @@ -1205,7 +1205,7 @@ async def revoke_pending_credentials( ) failed_crids.add(rev_id) elif rev_id >= rev_info["next_index"]: - LOGGER.warn( + LOGGER.warning( "Skipping requested credential revocation" "on rev reg id %s, cred rev id=%s not yet issued", revoc_reg_id, @@ -1213,7 +1213,7 @@ async def revoke_pending_credentials( ) failed_crids.add(rev_id) elif rev_list.revocation_list[rev_id] == 1: - LOGGER.warn( + LOGGER.warning( "Skipping requested credential revocation" "on rev reg id %s, cred rev id=%s already revoked", revoc_reg_id, @@ -1255,7 +1255,7 @@ async def revoke_pending_credentials( CATEGORY_REV_LIST, revoc_reg_id, for_update=True ) if not rev_info_upd: - LOGGER.warn( + LOGGER.warning( "Revocation registry missing, skipping update: {}", revoc_reg_id, ) diff --git a/aries_cloudagent/indy/credx/issuer.py b/aries_cloudagent/indy/credx/issuer.py index 6150d9d9ca..26843c0428 100644 --- a/aries_cloudagent/indy/credx/issuer.py +++ b/aries_cloudagent/indy/credx/issuer.py @@ -456,7 +456,7 @@ async def revoke_credentials( ) failed_crids.add(rev_id) elif rev_id > rev_info["curr_id"]: - LOGGER.warn( + LOGGER.warning( "Skipping requested credential revocation" "on rev reg id %s, cred rev id=%s not yet issued", revoc_reg_id, @@ -464,7 +464,7 @@ async def revoke_credentials( ) failed_crids.add(rev_id) elif rev_id in used_ids: - LOGGER.warn( + LOGGER.warning( "Skipping requested credential revocation" "on rev reg id %s, cred rev id=%s already revoked", revoc_reg_id, @@ -500,7 +500,7 @@ async def revoke_credentials( CATEGORY_REV_REG_INFO, revoc_reg_id, for_update=True ) if not rev_reg_upd or not rev_reg_info: - LOGGER.warn( + LOGGER.warning( "Revocation registry missing, skipping update: {}", revoc_reg_id, ) diff --git a/aries_cloudagent/revocation/models/issuer_rev_reg_record.py b/aries_cloudagent/revocation/models/issuer_rev_reg_record.py index a027010937..60c1ffd1fc 100644 --- a/aries_cloudagent/revocation/models/issuer_rev_reg_record.py +++ b/aries_cloudagent/revocation/models/issuer_rev_reg_record.py @@ -330,15 +330,15 @@ async def send_entry( # Ledger rejected transaction request: client request invalid: # InvalidClientRequest(...) # In this scenario we try to post a correction - LOGGER.warn("Retry ledger update/fix due to error") - LOGGER.warn(err) + LOGGER.warning("Retry ledger update/fix due to error") + LOGGER.warning(err) (_, _, res) = await self.fix_ledger_entry( profile, True, ledger.pool.genesis_txns, ) rev_entry_res = {"result": res} - LOGGER.warn("Ledger update/fix applied") + LOGGER.warning("Ledger update/fix applied") elif "InvalidClientTaaAcceptanceError" in err.roll_up: # if no write access (with "InvalidClientTaaAcceptanceError") # e.g. aries_cloudagent.ledger.error.LedgerTransactionError: diff --git a/aries_cloudagent/revocation/recover.py b/aries_cloudagent/revocation/recover.py index f2bf38267c..eca105a1b4 100644 --- a/aries_cloudagent/revocation/recover.py +++ b/aries_cloudagent/revocation/recover.py @@ -100,7 +100,7 @@ async def generate_ledger_rrrecovery_txn( set_revoked = set(set_revoked) mismatch = prev_revoked - set_revoked if mismatch: - LOGGER.warn( + LOGGER.warning( "Credential index(es) revoked on the ledger, but not in wallet: %s", mismatch, ) diff --git a/aries_cloudagent/revocation_anoncreds/recover.py b/aries_cloudagent/revocation_anoncreds/recover.py index 2a891d265a..2d9eca8755 100644 --- a/aries_cloudagent/revocation_anoncreds/recover.py +++ b/aries_cloudagent/revocation_anoncreds/recover.py @@ -102,7 +102,7 @@ async def generate_ledger_rrrecovery_txn( set_revoked = set(set_revoked) mismatch = prev_revoked - set_revoked if mismatch: - LOGGER.warn( + LOGGER.warning( "Credential index(es) revoked on the ledger, but not in wallet: %s", mismatch, ) From 492acd337dfd598e7e78c2c89e07b4837725980b Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 7 Feb 2024 23:33:32 +0200 Subject: [PATCH 17/23] :art: set test scope to module level Signed-off-by: ff137 --- aries_cloudagent/storage/tests/test_askar_storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries_cloudagent/storage/tests/test_askar_storage.py b/aries_cloudagent/storage/tests/test_askar_storage.py index a7d9883273..f257c60180 100644 --- a/aries_cloudagent/storage/tests/test_askar_storage.py +++ b/aries_cloudagent/storage/tests/test_askar_storage.py @@ -358,7 +358,7 @@ async def test_postgres_wallet_storage_works(self): class TestAskarStorageSearchSession(IsolatedAsyncioTestCase): - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") async def test_askar_storage_search_session(self): profile = "profileId" From 71ebce743685c0bf4fa4c975a2a1dcc6e4915a70 Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 7 Feb 2024 23:35:31 +0200 Subject: [PATCH 18/23] :art: set test scope to module level Signed-off-by: ff137 --- .../v1_0/handlers/tests/test_response_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/handlers/tests/test_response_handler.py b/aries_cloudagent/protocols/didexchange/v1_0/handlers/tests/test_response_handler.py index 0fd802b2b1..87369fbaf2 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/handlers/tests/test_response_handler.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/handlers/tests/test_response_handler.py @@ -77,7 +77,7 @@ async def asyncSetUp(self): did_doc_attach=self.did_doc_attach, ) - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") @mock.patch.object(test_module, "DIDXManager") async def test_called(self, mock_didx_mgr): mock_didx_mgr.return_value.accept_response = mock.CoroutineMock() @@ -91,7 +91,7 @@ async def test_called(self, mock_didx_mgr): ) assert not responder.messages - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") @mock.patch.object(test_module, "DIDXManager") async def test_called_auto_ping(self, mock_didx_mgr): self.ctx.update_settings({"auto_ping_connection": True}) @@ -109,7 +109,7 @@ async def test_called_auto_ping(self, mock_didx_mgr): result, target = messages[0] assert isinstance(result, Ping) - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") @mock.patch.object(test_module, "DIDXManager") @mock.patch.object(connection_target, "ConnectionTarget") async def test_problem_report(self, mock_conn_target, mock_didx_mgr): @@ -146,7 +146,7 @@ async def test_problem_report(self, mock_conn_target, mock_didx_mgr): ) assert target == {"target_list": [mock_conn_target]} - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") @mock.patch.object(test_module, "DIDXManager") @mock.patch.object(connection_target, "ConnectionTarget") async def test_problem_report_did_doc( @@ -193,7 +193,7 @@ async def test_problem_report_did_doc( ) assert target == {"target_list": [mock_conn_target]} - @pytest.mark.asyncio + @pytest.mark.asyncio(scope="module") @mock.patch.object(test_module, "DIDXManager") @mock.patch.object(connection_target, "ConnectionTarget") async def test_problem_report_did_doc_no_conn_target( From 58f9490d216d295304d325d5285b9e4a79a19cda Mon Sep 17 00:00:00 2001 From: ff137 Date: Mon, 12 Feb 2024 11:24:18 +0200 Subject: [PATCH 19/23] :art: fix metadata containing required field Signed-off-by: ff137 --- aries_cloudagent/anoncreds/routes.py | 53 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/aries_cloudagent/anoncreds/routes.py b/aries_cloudagent/anoncreds/routes.py index 1edc0607a3..e1eea30d33 100644 --- a/aries_cloudagent/anoncreds/routes.py +++ b/aries_cloudagent/anoncreds/routes.py @@ -86,17 +86,17 @@ class SchemaPostOptionSchema(OpenAPISchema): endorser_connection_id = fields.Str( metadata={ "description": endorser_connection_id_description, - "required": False, "example": UUIDFour.EXAMPLE, - } + }, + required=False, ) create_transaction_for_endorser = fields.Bool( metadata={ "description": create_transaction_for_endorser_description, - "required": False, "example": False, - } + }, + required=False, ) @@ -267,8 +267,8 @@ class CredIdMatchInfo(OpenAPISchema): metadata={ "description": "Credential definition identifier", "example": INDY_CRED_DEF_ID_EXAMPLE, - "required": True, - } + }, + required=True, ) @@ -279,23 +279,23 @@ class InnerCredDefSchema(OpenAPISchema): metadata={ "description": "Credential definition tag", "example": "default", - "required": True, - } + }, + required=True, ) schema_id = fields.Str( metadata={ "description": "Schema identifier", "example": INDY_SCHEMA_ID_EXAMPLE, - "required": True, }, + required=True, data_key="schemaId", ) issuer_id = fields.Str( metadata={ "description": "Issuer Identifier of the credential definition", "example": INDY_OR_KEY_DID_EXAMPLE, - "required": True, }, + required=True, data_key="issuerId", ) @@ -307,28 +307,27 @@ class CredDefPostOptionsSchema(OpenAPISchema): metadata={ "description": endorser_connection_id_description, "example": UUIDFour.EXAMPLE, - "required": False, - } + }, + required=False, ) create_transaction_for_endorser = fields.Bool( metadata={ "description": create_transaction_for_endorser_description, "example": False, - "required": False, - } + }, + required=False, ) support_revocation = fields.Bool( metadata={ "description": "Support credential revocation", - "required": False, - } + }, + required=False, ) revocation_registry_size = fields.Int( metadata={ "description": "Maximum number of credential revocations per registry", - "example": 666, - "required": False, - } + }, + required=False, ) @@ -516,15 +515,15 @@ class RevRegDefOptionsSchema(OpenAPISchema): metadata={ "description": endorser_connection_id_description, "example": UUIDFour.EXAMPLE, - "required": False, - } + }, + required=False, ) create_transaction_for_endorser = fields.Bool( metadata={ "description": create_transaction_for_endorser_description, "example": False, - "required": False, - } + }, + required=False, ) @@ -591,15 +590,15 @@ class RevListOptionsSchema(OpenAPISchema): metadata={ "description": endorser_connection_id_description, "example": UUIDFour.EXAMPLE, - "required": False, - } + }, + required=False, ) create_transaction_for_endorser = fields.Bool( metadata={ "description": create_transaction_for_endorser_description, "example": False, - "required": False, - } + }, + required=False, ) From 4df2984b7aa6629ac2c21eef76ed2797b3f8a843 Mon Sep 17 00:00:00 2001 From: ff137 Date: Mon, 12 Feb 2024 12:19:44 +0200 Subject: [PATCH 20/23] :art: fix marshmallow warning Signed-off-by: ff137 --- aries_cloudagent/anoncreds/routes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aries_cloudagent/anoncreds/routes.py b/aries_cloudagent/anoncreds/routes.py index e1eea30d33..6044b6d154 100644 --- a/aries_cloudagent/anoncreds/routes.py +++ b/aries_cloudagent/anoncreds/routes.py @@ -606,8 +606,10 @@ class RevListCreateRequestSchema(OpenAPISchema): """Request schema for revocation registry creation request.""" rev_reg_def_id = fields.Str( - description="Revocation registry definition identifier", - example=INDY_REV_REG_ID_EXAMPLE, + metadata={ + "description": "Revocation registry definition identifier", + "example": INDY_REV_REG_ID_EXAMPLE, + } ) options = fields.Nested(RevListOptionsSchema) From dfd829df5f9a485fd8e412edce4211d0fe2a80f0 Mon Sep 17 00:00:00 2001 From: ff137 Date: Mon, 12 Feb 2024 12:39:22 +0200 Subject: [PATCH 21/23] :art: ignore specific warnings from external packages Signed-off-by: ff137 --- aries_cloudagent/admin/tests/test_admin_server.py | 5 +++++ pyproject.toml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/aries_cloudagent/admin/tests/test_admin_server.py b/aries_cloudagent/admin/tests/test_admin_server.py index 72a4300e69..300e82f758 100644 --- a/aries_cloudagent/admin/tests/test_admin_server.py +++ b/aries_cloudagent/admin/tests/test_admin_server.py @@ -20,6 +20,11 @@ from ..server import AdminServer, AdminSetupError +# Ignore Marshmallow warning, as well as 'NotAppKeyWarning' coming from apispec packages +@pytest.mark.filterwarnings( + "ignore:The 'missing' attribute of fields is deprecated. Use 'load_default' instead.", + "ignore:It is recommended to use web.AppKey instances for keys.", +) class TestAdminServer(IsolatedAsyncioTestCase): async def asyncSetUp(self): self.message_results = [] diff --git a/pyproject.toml b/pyproject.toml index eaec349daf..5f02f6482a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,6 +139,9 @@ markers = [ ] junit_family = "xunit1" asyncio_mode = "auto" +filterwarnings = [ + 'ignore:distutils Version classes are deprecated. Use packaging.version instead.:DeprecationWarning', # Ignore specific DeprecationWarning for old packages using distutils version class +] [tool.coverage.run] From dc63049f61339f94ab5cecf257f1c3dc27ba5760 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Wed, 14 Feb 2024 09:00:05 -0800 Subject: [PATCH 22/23] Add Dependabot configuration - Configure Dependabot to automatically maintain dependencies for GitHub Actions. - Check for updates once a week. - Group all updates into a single PR. Signed-off-by: Wade Barnes --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..cd4692b79f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ + # For details on how this file works refer to: + # - https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file +version: 2 +updates: + # Maintain dependencies for GitHub Actions + # - Check for updates once a week + # - Group all updates into a single PR + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + all-actions: + patterns: [ "*" ] \ No newline at end of file From 8eceb59e787922eef43649b1ab126c12888e0ca4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:50:20 +0000 Subject: [PATCH 23/23] chore(deps): Bump the all-actions group with 10 updates Bumps the all-actions group with 10 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `2` | `4` | | [actions/setup-python](https://github.com/actions/setup-python) | `4` | `5` | | [psf/black](https://github.com/psf/black) | `24.1.1` | `24.2.0` | | [github/codeql-action](https://github.com/github/codeql-action) | `2` | `3` | | [pypa/gh-action-pip-audit](https://github.com/pypa/gh-action-pip-audit) | `1.0.0` | `1.0.8` | | [actions/cache](https://github.com/actions/cache) | `3` | `4` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `2` | `3` | | [docker/login-action](https://github.com/docker/login-action) | `2` | `3` | | [docker/metadata-action](https://github.com/docker/metadata-action) | `4` | `5` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `3` | `5` | Updates `actions/checkout` from 2 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) Updates `actions/setup-python` from 4 to 5 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) Updates `psf/black` from 24.1.1 to 24.2.0 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.1.1...24.2.0) Updates `github/codeql-action` from 2 to 3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) Updates `pypa/gh-action-pip-audit` from 1.0.0 to 1.0.8 - [Release notes](https://github.com/pypa/gh-action-pip-audit/releases) - [Commits](https://github.com/pypa/gh-action-pip-audit/compare/v1.0.0...v1.0.8) Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) Updates `docker/setup-buildx-action` from 2 to 3 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) Updates `docker/login-action` from 2 to 3 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) Updates `docker/metadata-action` from 4 to 5 - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) Updates `docker/build-push-action` from 3 to 5 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: psf/black dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: pypa/gh-action-pip-audit dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-actions - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/blackformat.yml | 6 +++--- .github/workflows/codeql.yml | 6 +++--- .github/workflows/integrationtests.yml | 2 +- .github/workflows/nigthly.yml | 2 +- .github/workflows/pip-audit.yml | 4 ++-- .github/workflows/publish-indy.yml | 12 ++++++------ .github/workflows/publish.yml | 12 ++++++------ .github/workflows/pythonpublish.yml | 4 ++-- .github/workflows/snyk.yml | 4 ++-- .github/workflows/tests-indy.yml | 8 ++++---- .github/workflows/tests.yml | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/blackformat.yml b/.github/workflows/blackformat.yml index 4474603ea5..39f2345bf3 100644 --- a/.github/workflows/blackformat.yml +++ b/.github/workflows/blackformat.yml @@ -10,11 +10,11 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.9" - name: Black Code Formatter Check # The version of black should be adjusted at the same time dev # dependencies are updated. - uses: psf/black@24.1.1 + uses: psf/black@24.2.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e6f15917a0..e77074d757 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,13 +17,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: python - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/integrationtests.yml b/.github/workflows/integrationtests.yml index e7c5a23275..6d2fca9349 100644 --- a/.github/workflows/integrationtests.yml +++ b/.github/workflows/integrationtests.yml @@ -20,7 +20,7 @@ jobs: if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request') steps: - name: checkout-acapy - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: acapy #- name: run-von-network diff --git a/.github/workflows/nigthly.yml b/.github/workflows/nigthly.yml index 7af06f95a4..c6e01b95ce 100644 --- a/.github/workflows/nigthly.yml +++ b/.github/workflows/nigthly.yml @@ -26,7 +26,7 @@ jobs: commits_today: ${{ steps.commits.outputs.commits_today }} date: ${{ steps.date.outputs.date }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: print latest_commit run: echo ${{ github.sha }} - name: Get new commits diff --git a/.github/workflows/pip-audit.yml b/.github/workflows/pip-audit.yml index 486a36e0fb..5fa3be6f7e 100644 --- a/.github/workflows/pip-audit.yml +++ b/.github/workflows/pip-audit.yml @@ -11,14 +11,14 @@ jobs: runs-on: ubuntu-latest if: (github.event_name == 'pull_request' && github.repository == 'hyperledger/aries-cloudagent-python') || (github.event_name != 'pull_request') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: install run: | python -m venv env/ source env/bin/activate python -m pip install --upgrade pip python -m pip install . - - uses: pypa/gh-action-pip-audit@v1.0.0 + - uses: pypa/gh-action-pip-audit@v1.0.8 with: virtual-environment: env/ local: true diff --git a/.github/workflows/publish-indy.yml b/.github/workflows/publish-indy.yml index 17f479c8e6..3d95cc6d84 100644 --- a/.github/workflows/publish-indy.yml +++ b/.github/workflows/publish-indy.yml @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref || '' }} @@ -61,7 +61,7 @@ jobs: echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -69,10 +69,10 @@ jobs: ${{ runner.os }}-buildx- - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log in to the GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -80,7 +80,7 @@ jobs: - name: Setup Image Metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python @@ -88,7 +88,7 @@ jobs: type=raw,value=py${{ matrix.python-version }}-indy-${{ env.INDY_VERSION }}-${{ inputs.tag || github.event.release.tag_name }} - name: Build and Push Image to ghcr.io - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: push: true context: . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 937c2e1bbd..8195dc1b7c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref || '' }} @@ -58,7 +58,7 @@ jobs: echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -66,10 +66,10 @@ jobs: ${{ runner.os }}-buildx- - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log in to the GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -77,7 +77,7 @@ jobs: - name: Setup Image Metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python @@ -85,7 +85,7 @@ jobs: type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }} - name: Build and Push Image to ghcr.io - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: push: true context: . diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 5e7ebfb330..8211541fbe 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -8,9 +8,9 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install dependencies diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 7160212071..30d997d594 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository_owner == 'hyperledger' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build a Docker image run: docker build -t aries-cloudagent -f docker/Dockerfile . - name: Run Snyk to check Docker image for vulnerabilities @@ -28,6 +28,6 @@ jobs: image: aries-cloudagent args: --file=docker/Dockerfile - name: Upload result to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: snyk.sarif diff --git a/.github/workflows/tests-indy.yml b/.github/workflows/tests-indy.yml index 7e69e76b30..8b7651a39f 100644 --- a/.github/workflows/tests-indy.yml +++ b/.github/workflows/tests-indy.yml @@ -18,10 +18,10 @@ jobs: name: Test Python ${{ inputs.python-version }} on Indy ${{ inputs.indy-version }} runs-on: ${{ inputs.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache image layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-test key: ${{ runner.os }}-buildx-test-${{ github.sha }} @@ -29,10 +29,10 @@ jobs: ${{ runner.os }}-buildx-test- - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build test image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: load: true context: . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5fb610580b..62699408a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,9 +15,9 @@ jobs: name: Test Python ${{ inputs.python-version }} runs-on: ${{ inputs.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} cache: 'pip'