From eff4b6c9093778a0527ff0224d2dc17c2913b110 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 08:31:44 -0700 Subject: [PATCH 1/4] chore(deps-dev): Bump ruff from 0.6.3 to 0.6.4 (#3221) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.3 to 0.6.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.6.3...0.6.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 40 ++++++++++++++++++++-------------------- pyproject.toml | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/poetry.lock b/poetry.lock index 290647dd37..ff524c1c63 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2364,29 +2364,29 @@ test = ["hypothesis (==5.19.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "ruff" -version = "0.6.3" +version = "0.6.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.6.3-py3-none-linux_armv6l.whl", hash = "sha256:97f58fda4e309382ad30ede7f30e2791d70dd29ea17f41970119f55bdb7a45c3"}, - {file = "ruff-0.6.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3b061e49b5cf3a297b4d1c27ac5587954ccb4ff601160d3d6b2f70b1622194dc"}, - {file = "ruff-0.6.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:34e2824a13bb8c668c71c1760a6ac7d795ccbd8d38ff4a0d8471fdb15de910b1"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bddfbb8d63c460f4b4128b6a506e7052bad4d6f3ff607ebbb41b0aa19c2770d1"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ced3eeb44df75353e08ab3b6a9e113b5f3f996bea48d4f7c027bc528ba87b672"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47021dff5445d549be954eb275156dfd7c37222acc1e8014311badcb9b4ec8c1"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7d7bd20dc07cebd68cc8bc7b3f5ada6d637f42d947c85264f94b0d1cd9d87384"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:500f166d03fc6d0e61c8e40a3ff853fa8a43d938f5d14c183c612df1b0d6c58a"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42844ff678f9b976366b262fa2d1d1a3fe76f6e145bd92c84e27d172e3c34500"}, - {file = "ruff-0.6.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70452a10eb2d66549de8e75f89ae82462159855e983ddff91bc0bce6511d0470"}, - {file = "ruff-0.6.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:65a533235ed55f767d1fc62193a21cbf9e3329cf26d427b800fdeacfb77d296f"}, - {file = "ruff-0.6.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d2e2c23cef30dc3cbe9cc5d04f2899e7f5e478c40d2e0a633513ad081f7361b5"}, - {file = "ruff-0.6.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8a136aa7d228975a6aee3dd8bea9b28e2b43e9444aa678fb62aeb1956ff2351"}, - {file = "ruff-0.6.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:f92fe93bc72e262b7b3f2bba9879897e2d58a989b4714ba6a5a7273e842ad2f8"}, - {file = "ruff-0.6.3-py3-none-win32.whl", hash = "sha256:7a62d3b5b0d7f9143d94893f8ba43aa5a5c51a0ffc4a401aa97a81ed76930521"}, - {file = "ruff-0.6.3-py3-none-win_amd64.whl", hash = "sha256:746af39356fee2b89aada06c7376e1aa274a23493d7016059c3a72e3b296befb"}, - {file = "ruff-0.6.3-py3-none-win_arm64.whl", hash = "sha256:14a9528a8b70ccc7a847637c29e56fd1f9183a9db743bbc5b8e0c4ad60592a82"}, - {file = "ruff-0.6.3.tar.gz", hash = "sha256:183b99e9edd1ef63be34a3b51fee0a9f4ab95add123dbf89a71f7b1f0c991983"}, + {file = "ruff-0.6.4-py3-none-linux_armv6l.whl", hash = "sha256:c4b153fc152af51855458e79e835fb6b933032921756cec9af7d0ba2aa01a258"}, + {file = "ruff-0.6.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:bedff9e4f004dad5f7f76a9d39c4ca98af526c9b1695068198b3bda8c085ef60"}, + {file = "ruff-0.6.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d02a4127a86de23002e694d7ff19f905c51e338c72d8e09b56bfb60e1681724f"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7862f42fc1a4aca1ea3ffe8a11f67819d183a5693b228f0bb3a531f5e40336fc"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eebe4ff1967c838a1a9618a5a59a3b0a00406f8d7eefee97c70411fefc353617"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:932063a03bac394866683e15710c25b8690ccdca1cf192b9a98260332ca93408"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:50e30b437cebef547bd5c3edf9ce81343e5dd7c737cb36ccb4fe83573f3d392e"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c44536df7b93a587de690e124b89bd47306fddd59398a0fb12afd6133c7b3818"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ea086601b22dc5e7693a78f3fcfc460cceabfdf3bdc36dc898792aba48fbad6"}, + {file = "ruff-0.6.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b52387d3289ccd227b62102c24714ed75fbba0b16ecc69a923a37e3b5e0aaaa"}, + {file = "ruff-0.6.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0308610470fcc82969082fc83c76c0d362f562e2f0cdab0586516f03a4e06ec6"}, + {file = "ruff-0.6.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:803b96dea21795a6c9d5bfa9e96127cc9c31a1987802ca68f35e5c95aed3fc0d"}, + {file = "ruff-0.6.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:66dbfea86b663baab8fcae56c59f190caba9398df1488164e2df53e216248baa"}, + {file = "ruff-0.6.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:34d5efad480193c046c86608dbba2bccdc1c5fd11950fb271f8086e0c763a5d1"}, + {file = "ruff-0.6.4-py3-none-win32.whl", hash = "sha256:f0f8968feea5ce3777c0d8365653d5e91c40c31a81d95824ba61d871a11b8523"}, + {file = "ruff-0.6.4-py3-none-win_amd64.whl", hash = "sha256:549daccee5227282289390b0222d0fbee0275d1db6d514550d65420053021a58"}, + {file = "ruff-0.6.4-py3-none-win_arm64.whl", hash = "sha256:ac4b75e898ed189b3708c9ab3fc70b79a433219e1e87193b4f2b77251d058d14"}, + {file = "ruff-0.6.4.tar.gz", hash = "sha256:ac3b5bfbee99973f80aa1b7cbd1c9cbce200883bdd067300c22a6cc1c7fba212"}, ] [[package]] @@ -2898,4 +2898,4 @@ didcommv2 = ["didcomm-messaging"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "2b4c41adbcc170f5c9bdd750f7a7c285de09a8f6b8223b0204b4fe91765703fc" +content-hash = "036c571c808952dc6bd3b31a40358d127594b3cf14fe19afb62e5564b4d8b63c" diff --git a/pyproject.toml b/pyproject.toml index a02c58c494..c1bf5d5f2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ didcomm-messaging = {version = "^0.1.1a0", optional = true } [tool.poetry.group.dev.dependencies] pre-commit = "~3.8.0" # Sync with version in .pre-commit-config.yaml -ruff = "0.6.3" +ruff = "0.6.4" sphinx="^5.3.0" sphinx-rtd-theme=">=0.4.3" From 94a91c1a3a20c0d1d5b1f1617f4421a4de0cb1d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 08:59:59 -0700 Subject: [PATCH 2/4] chore(deps): Bump unflatten from 0.1.1 to 0.2.0 (#3222) Bumps [unflatten](https://github.com/dairiki/unflatten) from 0.1.1 to 0.2.0. - [Changelog](https://github.com/dairiki/unflatten/blob/master/CHANGES.md) - [Commits](https://github.com/dairiki/unflatten/compare/0.1.1...v0.2.0) --- updated-dependencies: - dependency-name: unflatten dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index ff524c1c63..deecd4c97e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2611,13 +2611,13 @@ files = [ [[package]] name = "unflatten" -version = "0.1.1" +version = "0.2.0" description = "Unflatten dict to dict with nested dict/arrays" optional = false python-versions = "*" files = [ - {file = "unflatten-0.1.1-py2.py3-none-any.whl", hash = "sha256:42de0eae963f34cbb8d80a35cdab962f723b879a3e93c603fac9ca6062e96de3"}, - {file = "unflatten-0.1.1.tar.gz", hash = "sha256:5d695d6b0a70ff7aca5d63474b79cd397ed5f7d87de0e990aaf0b04db77784a5"}, + {file = "unflatten-0.2.0-py2.py3-none-any.whl", hash = "sha256:a0afa7ff22313dcc60ff45110b796ed5b4e908614826e8672a9f76d3a20c1f54"}, + {file = "unflatten-0.2.0.tar.gz", hash = "sha256:9710bc558882f697bc36a95a97614be296f07c8f8df1bc2b4ef96c189ce5cf84"}, ] [[package]] @@ -2898,4 +2898,4 @@ didcommv2 = ["didcomm-messaging"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "036c571c808952dc6bd3b31a40358d127594b3cf14fe19afb62e5564b4d8b63c" +content-hash = "d59d92949e412ba574e2b5cbe5f0b193365f76cc2081bb31a2bb7e248759f489" diff --git a/pyproject.toml b/pyproject.toml index c1bf5d5f2f..6d9df32eec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ pyyaml="~6.0.2" qrcode = {version = ">=6.1,<7.0", extras = ["pil"]} requests="~2.32.3" rlp="4.0.1" -unflatten="~0.1" +unflatten="~0.2" sd-jwt = "^0.10.3" did-peer-2 = "^0.1.2" did-peer-4 = "^0.1.4" From e12fc05076cd2fa0ff9a4ca3bb2826be2717a56f Mon Sep 17 00:00:00 2001 From: Thiago Romano <112953503+thiagoromanos@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:40:55 -0300 Subject: [PATCH 3/4] fix: anoncreds revocation notification when revoking (#3226) Signed-off-by: Thiago Romano --- .../revocation_anoncreds/manager.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/aries_cloudagent/revocation_anoncreds/manager.py b/aries_cloudagent/revocation_anoncreds/manager.py index 11d67f697b..c7adfe4a49 100644 --- a/aries_cloudagent/revocation_anoncreds/manager.py +++ b/aries_cloudagent/revocation_anoncreds/manager.py @@ -145,6 +145,18 @@ async def revoke_credential( f"No revocation registry record found for id: {rev_reg_id}" ) + if notify: + thread_id = thread_id or f"indy::{rev_reg_id}::{cred_rev_id}" + rev_notify_rec = RevNotificationRecord( + rev_reg_id=rev_reg_id, + cred_rev_id=cred_rev_id, + thread_id=thread_id, + connection_id=connection_id, + comment=comment, + version=notify_version, + ) + async with self._profile.session() as session: + await rev_notify_rec.save(session, reason="New revocation notification") if publish: await revoc.get_or_fetch_local_tails_path(rev_reg_def) result = await revoc.revoke_pending_credentials( @@ -164,18 +176,6 @@ async def revoke_credential( else: await revoc.mark_pending_revocations(rev_reg_id, int(cred_rev_id)) - if notify: - thread_id = thread_id or f"indy::{rev_reg_id}::{cred_rev_id}" - rev_notify_rec = RevNotificationRecord( - rev_reg_id=rev_reg_id, - cred_rev_id=cred_rev_id, - thread_id=thread_id, - connection_id=connection_id, - comment=comment, - version=notify_version, - ) - async with self._profile.session() as session: - await rev_notify_rec.save(session, reason="New revocation notification") async def update_rev_reg_revoked_state( self, From 2d2106ed4253f3ad84148c6fb72fba5833154455 Mon Sep 17 00:00:00 2001 From: jamshale <31809382+jamshale@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:03:05 -0700 Subject: [PATCH 4/4] Fix scenario tests (#3231) Signed-off-by: Jamie Hale --- scenarios/README.md | 4 ++-- scenarios/examples/connectionless/example.py | 3 +-- scenarios/examples/json_ld/example.py | 3 +-- scenarios/examples/multitenancy/example.py | 3 +-- scenarios/examples/presenting_revoked_credential/example.py | 3 +-- scenarios/examples/self_attested/example.py | 3 +-- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/scenarios/README.md b/scenarios/README.md index 1cf161c706..549531da36 100644 --- a/scenarios/README.md +++ b/scenarios/README.md @@ -10,7 +10,7 @@ Every test example will have a docker-compose.yml file for all the agents and se - From the scenarios directory. - Make sure the local acapy image is up to date. - `cd ..` - - `docker build -t acapy-test -f ../docker/Dockerfile.run .` + - `docker build -t acapy-test -f ./docker/Dockerfile.run .` - `cd scenarios` - Navigate to the base example. `cd examples/simple` - `docker compose up` @@ -19,7 +19,7 @@ To run all the tests with pytest: - From the scenarios directory. - Make sure the local acapy image is up to date. - `cd ..` - - `docker build -t acapy-test -f ../docker/Dockerfile.run .` + - `docker build -t acapy-test -f ./docker/Dockerfile.run .` - `cd scenarios` - `poetry run pytest -m examples` - TODO: easily run individual tests with pytest. diff --git a/scenarios/examples/connectionless/example.py b/scenarios/examples/connectionless/example.py index 1ee899cab9..7c0d867461 100644 --- a/scenarios/examples/connectionless/example.py +++ b/scenarios/examples/connectionless/example.py @@ -59,8 +59,7 @@ async def icv2(): "role": "ENDORSER", }, ) as resp: - if resp.ok: - return await resp.json() + assert resp.ok await alice.post("/wallet/did/public", params=params(did=public_did.did)) diff --git a/scenarios/examples/json_ld/example.py b/scenarios/examples/json_ld/example.py index 92c3f62093..e1496256fd 100644 --- a/scenarios/examples/json_ld/example.py +++ b/scenarios/examples/json_ld/example.py @@ -77,8 +77,7 @@ async def main(): "role": "ENDORSER", }, ) as resp: - if resp.ok: - return await resp.json() + assert resp.ok await alice.post( "/wallet/did/public", params=params(did=public_did.did) diff --git a/scenarios/examples/multitenancy/example.py b/scenarios/examples/multitenancy/example.py index 55eae4bef1..097fc69352 100644 --- a/scenarios/examples/multitenancy/example.py +++ b/scenarios/examples/multitenancy/example.py @@ -72,8 +72,7 @@ async def main(): "role": "ENDORSER", }, ) as resp: - if resp.ok: - return await resp.json() + assert resp.ok await alice.post("/wallet/did/public", params=params(did=public_did.did)) _, cred_def = await indy_anoncred_credential_artifacts( diff --git a/scenarios/examples/presenting_revoked_credential/example.py b/scenarios/examples/presenting_revoked_credential/example.py index 65f9a6842e..2e3cdd80b4 100644 --- a/scenarios/examples/presenting_revoked_credential/example.py +++ b/scenarios/examples/presenting_revoked_credential/example.py @@ -72,8 +72,7 @@ async def main(): "role": "ENDORSER", }, ) as resp: - if resp.ok: - return await resp.json() + assert resp.ok await alice.post("/wallet/did/public", params=params(did=public_did.did)) schema, cred_def = await indy_anoncred_credential_artifacts( diff --git a/scenarios/examples/self_attested/example.py b/scenarios/examples/self_attested/example.py index a081b3afa6..f97e53e1be 100644 --- a/scenarios/examples/self_attested/example.py +++ b/scenarios/examples/self_attested/example.py @@ -58,8 +58,7 @@ async def main(): "role": "ENDORSER", }, ) as resp: - if resp.ok: - return await resp.json() + assert resp.ok await alice.post("/wallet/did/public", params=params(did=public_did.did)) schema, cred_def = await indy_anoncred_credential_artifacts(