diff --git a/aries_cloudagent/messaging/models/base_record.py b/aries_cloudagent/messaging/models/base_record.py index c7ee98c84c..fdabf91933 100644 --- a/aries_cloudagent/messaging/models/base_record.py +++ b/aries_cloudagent/messaging/models/base_record.py @@ -293,6 +293,8 @@ async def query( *, limit: Optional[int] = None, offset: Optional[int] = None, + order_by: Optional[str] = None, + descending: bool = False, post_filter_positive: dict = None, post_filter_negative: dict = None, alt: bool = False, @@ -304,6 +306,8 @@ async def query( tag_filter: An optional dictionary of tag filter clauses limit: The maximum number of records to retrieve offset: The offset to start retrieving records from + order_by: An optional field by which to order the records. + descending: Whether to order the records in descending order. post_filter_positive: Additional value filters to apply matching positively post_filter_negative: Additional value filters to apply matching negatively alt: set to match any (positive=True) value or miss all (positive=False) @@ -327,11 +331,15 @@ async def query( tag_query=tag_query, limit=limit, offset=offset, + order_by=order_by, + descending=descending, ) else: rows = await storage.find_all_records( type_filter=cls.RECORD_TYPE, tag_query=tag_query, + order_by=order_by, + descending=descending, ) num_results_post_filter = 0 # used if applying pagination post-filter diff --git a/aries_cloudagent/messaging/models/paginated_query.py b/aries_cloudagent/messaging/models/paginated_query.py index c6e6e99795..b938af772d 100644 --- a/aries_cloudagent/messaging/models/paginated_query.py +++ b/aries_cloudagent/messaging/models/paginated_query.py @@ -4,6 +4,7 @@ from aiohttp.web import BaseRequest from marshmallow import fields +from marshmallow.validate import OneOf from ...messaging.models.openapi import OpenAPISchema from ...storage.base import DEFAULT_PAGE_SIZE, MAXIMUM_PAGE_SIZE @@ -31,18 +32,40 @@ class PaginatedQuerySchema(OpenAPISchema): metadata={"description": "Offset for pagination", "example": 0}, error_messages={"validator_failed": "Value must be 0 or greater"}, ) + order_by = fields.Str( + required=False, + load_default="id", + validate=OneOf(["id"]), # only one possible column supported in askar + metadata={ + "description": ( + 'The column to order results by. Only "id" is currently supported.' + ) + }, + error_messages={"validator_failed": '`order_by` only supports column "id"'}, + ) + descending = fields.Bool( + required=False, + load_default=False, + metadata={"description": "Order results in descending order if true"}, + ) -def get_limit_offset(request: BaseRequest) -> Tuple[int, int]: - """Read the limit and offset query parameters from a request as ints, with defaults. +def get_paginated_query_params(request: BaseRequest) -> Tuple[int, int, str, bool]: + """Read the limit, offset, order_by, and descending query parameters from a request. Args: - request: aiohttp request object + request: aiohttp request object. Returns: - A tuple of the limit and offset values + A tuple containing: + - limit (int): The number of results to return, defaulting to DEFAULT_PAGE_SIZE. + - offset (int): The offset for pagination, defaulting to 0. + - order_by (str): The field by which to order results, defaulting to "id". + - descending (bool): Order results in descending order; defaults to False. """ limit = int(request.query.get("limit", DEFAULT_PAGE_SIZE)) offset = int(request.query.get("offset", 0)) - return limit, offset + order_by = request.query.get("order_by", "id") + descending = bool(request.query.get("descending", False)) + return limit, offset, order_by, descending diff --git a/aries_cloudagent/messaging/models/tests/test_base_record.py b/aries_cloudagent/messaging/models/tests/test_base_record.py index 06fb281a9d..fc71e7be3f 100644 --- a/aries_cloudagent/messaging/models/tests/test_base_record.py +++ b/aries_cloudagent/messaging/models/tests/test_base_record.py @@ -169,6 +169,8 @@ async def test_query(self): result = await BaseRecordImpl.query(session, tag_filter) mock_storage.find_all_records.assert_awaited_once_with( type_filter=BaseRecordImpl.RECORD_TYPE, + order_by=None, + descending=False, tag_query=tag_filter, ) assert result and isinstance(result[0], BaseRecordImpl) @@ -221,6 +223,8 @@ async def test_query_post_filter(self): mock_storage.find_all_records.assert_awaited_once_with( type_filter=ARecordImpl.RECORD_TYPE, tag_query=tag_filter, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -344,6 +348,8 @@ async def test_query_with_limit(self): tag_query=tag_filter, limit=10, offset=0, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -374,6 +380,8 @@ async def test_query_with_offset(self): tag_query=tag_filter, limit=DEFAULT_PAGE_SIZE, offset=10, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -404,6 +412,8 @@ async def test_query_with_limit_and_offset(self): tag_query=tag_filter, limit=10, offset=5, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -436,7 +446,10 @@ async def test_query_with_limit_and_offset_and_post_filter(self): post_filter_positive={"a": "one"}, ) mock_storage.find_all_records.assert_awaited_once_with( - type_filter=ARecordImpl.RECORD_TYPE, tag_query=tag_filter + type_filter=ARecordImpl.RECORD_TYPE, + tag_query=tag_filter, + order_by=None, + descending=False, ) assert len(result) == 10 assert result and isinstance(result[0], ARecordImpl) diff --git a/aries_cloudagent/multitenant/admin/routes.py b/aries_cloudagent/multitenant/admin/routes.py index 36e6e0a88a..f3a33bc88d 100644 --- a/aries_cloudagent/multitenant/admin/routes.py +++ b/aries_cloudagent/multitenant/admin/routes.py @@ -16,7 +16,10 @@ from ...core.profile import ProfileManagerProvider from ...messaging.models.base import BaseModelError from ...messaging.models.openapi import OpenAPISchema -from ...messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ...messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ...messaging.valid import UUID4_EXAMPLE, JSONWebToken from ...multitenant.base import BaseMultitenantManager from ...storage.error import StorageError, StorageNotFoundError @@ -382,7 +385,7 @@ async def wallets_list(request: web.BaseRequest): if wallet_name: query["wallet_name"] = wallet_name - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) try: async with profile.session() as session: @@ -391,6 +394,8 @@ async def wallets_list(request: web.BaseRequest): tag_filter=query, limit=limit, offset=offset, + order_by=order_by, + descending=descending, ) results = [format_wallet_record(record) for record in records] results.sort(key=lambda w: w["created_at"]) diff --git a/aries_cloudagent/protocols/connections/v1_0/routes.py b/aries_cloudagent/protocols/connections/v1_0/routes.py index c6cbe47ecd..bafe178ede 100644 --- a/aries_cloudagent/protocols/connections/v1_0/routes.py +++ b/aries_cloudagent/protocols/connections/v1_0/routes.py @@ -19,7 +19,10 @@ from ....connections.models.conn_record import ConnRecord, ConnRecordSchema from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema -from ....messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ....messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ....messaging.valid import ( ENDPOINT_EXAMPLE, ENDPOINT_VALIDATE, @@ -469,7 +472,7 @@ async def connections_list(request: web.BaseRequest): if request.query.get("connection_protocol"): post_filter["connection_protocol"] = request.query["connection_protocol"] - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) profile = context.profile try: @@ -479,6 +482,8 @@ async def connections_list(request: web.BaseRequest): tag_filter, limit=limit, offset=offset, + order_by=order_by, + descending=descending, post_filter_positive=post_filter, alt=True, ) diff --git a/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py b/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py index 83fdaf10b9..f969edb602 100644 --- a/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py +++ b/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py @@ -103,6 +103,8 @@ async def test_connections_list(self): }, limit=100, offset=0, + order_by="id", + descending=False, post_filter_positive={ "their_role": list(ConnRecord.Role.REQUESTER.value), "connection_protocol": "connections/1.0", diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py index d77682b55f..7c9ce427c9 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py @@ -22,7 +22,10 @@ from ....messaging.credential_definitions.util import CRED_DEF_TAGS from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema -from ....messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ....messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ....messaging.valid import ( INDY_CRED_DEF_ID_EXAMPLE, INDY_CRED_DEF_ID_VALIDATE, @@ -404,7 +407,7 @@ async def credential_exchange_list(request: web.BaseRequest): if request.query.get(k, "") != "" } - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) try: async with context.profile.session() as session: @@ -413,6 +416,8 @@ async def credential_exchange_list(request: web.BaseRequest): tag_filter=tag_filter, limit=limit, offset=offset, + order_by=order_by, + descending=descending, post_filter_positive=post_filter, ) results = [record.serialize() for record in records] diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/routes.py b/aries_cloudagent/protocols/issue_credential/v2_0/routes.py index 9c5bdc85e0..42b89514af 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/routes.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/routes.py @@ -26,7 +26,10 @@ from ....messaging.decorators.attach_decorator import AttachDecorator from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema -from ....messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ....messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ....messaging.valid import ( INDY_CRED_DEF_ID_EXAMPLE, INDY_CRED_DEF_ID_VALIDATE, @@ -568,7 +571,7 @@ async def credential_exchange_list(request: web.BaseRequest): if request.query.get(k, "") != "" } - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) try: async with profile.session() as session: @@ -577,6 +580,8 @@ async def credential_exchange_list(request: web.BaseRequest): tag_filter=tag_filter, limit=limit, offset=offset, + order_by=order_by, + descending=descending, post_filter_positive=post_filter, ) diff --git a/aries_cloudagent/protocols/present_proof/v1_0/routes.py b/aries_cloudagent/protocols/present_proof/v1_0/routes.py index 97459a687e..ef9cad6a2d 100644 --- a/aries_cloudagent/protocols/present_proof/v1_0/routes.py +++ b/aries_cloudagent/protocols/present_proof/v1_0/routes.py @@ -25,7 +25,10 @@ from ....messaging.decorators.attach_decorator import AttachDecorator from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema -from ....messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ....messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ....messaging.valid import ( INDY_EXTRA_WQL_EXAMPLE, INDY_EXTRA_WQL_VALIDATE, @@ -309,7 +312,7 @@ async def presentation_exchange_list(request: web.BaseRequest): if request.query.get(k, "") != "" } - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) try: async with context.profile.session() as session: @@ -318,6 +321,8 @@ async def presentation_exchange_list(request: web.BaseRequest): tag_filter=tag_filter, limit=limit, offset=offset, + order_by=order_by, + descending=descending, post_filter_positive=post_filter, ) results = [record.serialize() for record in records] diff --git a/aries_cloudagent/protocols/present_proof/v2_0/routes.py b/aries_cloudagent/protocols/present_proof/v2_0/routes.py index 2edb0e4c08..55b4b7d69f 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/routes.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/routes.py @@ -26,7 +26,10 @@ from ....messaging.decorators.attach_decorator import AttachDecorator from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema -from ....messaging.models.paginated_query import PaginatedQuerySchema, get_limit_offset +from ....messaging.models.paginated_query import ( + PaginatedQuerySchema, + get_paginated_query_params, +) from ....messaging.valid import ( INDY_EXTRA_WQL_EXAMPLE, INDY_EXTRA_WQL_VALIDATE, @@ -448,7 +451,7 @@ async def present_proof_list(request: web.BaseRequest): if request.query.get(k, "") != "" } - limit, offset = get_limit_offset(request) + limit, offset, order_by, descending = get_paginated_query_params(request) try: async with profile.session() as session: @@ -457,6 +460,8 @@ async def present_proof_list(request: web.BaseRequest): tag_filter=tag_filter, limit=limit, offset=offset, + order_by=order_by, + descending=descending, post_filter_positive=post_filter, ) results = [record.serialize() for record in records] diff --git a/aries_cloudagent/storage/askar.py b/aries_cloudagent/storage/askar.py index 03061cca32..afbe35ccad 100644 --- a/aries_cloudagent/storage/askar.py +++ b/aries_cloudagent/storage/askar.py @@ -174,6 +174,8 @@ async def find_paginated_records( tag_query: Mapping = None, limit: int = DEFAULT_PAGE_SIZE, offset: int = 0, + order_by: Optional[str] = None, + descending: bool = False, ) -> Sequence[StorageRecord]: """Retrieve a page of records matching a particular type filter and tag query. @@ -182,6 +184,11 @@ async def find_paginated_records( tag_query: An optional dictionary of tag filter clauses limit: The maximum number of records to retrieve offset: The offset to start retrieving records from + order_by: An optional field by which to order the records. + descending: Whether to order the records in descending order. + + Returns: + A sequence of StorageRecord matching the filter and query parameters. """ results = [] @@ -190,6 +197,8 @@ async def find_paginated_records( tag_filter=tag_query, limit=limit, offset=offset, + order_by=order_by, + descending=descending, profile=self._session.profile.settings.get("wallet.askar_profile"), ): results += ( @@ -206,13 +215,19 @@ async def find_all_records( self, type_filter: str, tag_query: Mapping = None, + order_by: Optional[str] = None, + descending: bool = False, options: Mapping = None, ): """Retrieve all records matching a particular type filter and tag query.""" for_update = bool(options and options.get("forUpdate")) results = [] for row in await self._session.handle.fetch_all( - type_filter, tag_query, for_update=for_update + category=type_filter, + tag_filter=tag_query, + order_by=order_by, + descending=descending, + for_update=for_update, ): results.append( StorageRecord( diff --git a/aries_cloudagent/storage/base.py b/aries_cloudagent/storage/base.py index 2035e071e0..36ca84b9f2 100644 --- a/aries_cloudagent/storage/base.py +++ b/aries_cloudagent/storage/base.py @@ -1,7 +1,7 @@ """Abstract base classes for non-secrets storage.""" from abc import ABC, abstractmethod -from typing import Mapping, Sequence +from typing import Mapping, Optional, Sequence from .error import StorageDuplicateError, StorageError, StorageNotFoundError from .record import StorageRecord @@ -96,6 +96,8 @@ async def find_paginated_records( tag_query: Mapping = None, limit: int = DEFAULT_PAGE_SIZE, offset: int = 0, + order_by: Optional[str] = None, + descending: bool = False, ) -> Sequence[StorageRecord]: """Retrieve a page of records matching a particular type filter and tag query. @@ -104,6 +106,11 @@ async def find_paginated_records( tag_query: An optional dictionary of tag filter clauses limit: The maximum number of records to retrieve offset: The offset to start retrieving records from + order_by: An optional field by which to order the records. + descending: Whether to order the records in descending order. + + Returns: + A sequence of StorageRecord matching the filter and query parameters. """ @abstractmethod @@ -111,6 +118,8 @@ async def find_all_records( self, type_filter: str, tag_query: Mapping = None, + order_by: Optional[str] = None, + descending: bool = False, options: Mapping = None, ) -> Sequence[StorageRecord]: """Retrieve all records matching a particular type filter and tag query. @@ -118,6 +127,8 @@ async def find_all_records( Args: type_filter: The type of records to filter by. tag_query: An optional dictionary of tag filter clauses. + order_by: An optional field by which to order the records. + descending: Whether to order the records in descending order. options: Additional options for the query. """ diff --git a/aries_cloudagent/storage/in_memory.py b/aries_cloudagent/storage/in_memory.py index f8d1f8f844..c891539ac2 100644 --- a/aries_cloudagent/storage/in_memory.py +++ b/aries_cloudagent/storage/in_memory.py @@ -1,6 +1,7 @@ """Basic in-memory storage implementation (non-wallet).""" -from typing import Mapping, Sequence +from operator import attrgetter +from typing import Mapping, Optional, Sequence from ..core.in_memory import InMemoryProfile from .base import ( @@ -103,6 +104,8 @@ async def find_paginated_records( tag_query: Mapping = None, limit: int = DEFAULT_PAGE_SIZE, offset: int = 0, + order_by: Optional[str] = None, + descending: bool = False, ) -> Sequence[StorageRecord]: """Retrieve a page of records matching a particular type filter and tag query. @@ -111,26 +114,37 @@ async def find_paginated_records( tag_query: An optional dictionary of tag filter clauses limit: The maximum number of records to retrieve offset: The offset to start retrieving records from + order_by: An optional field by which to order the records. + descending: Whether to order the records in descending order. + + Returns: + A sequence of StorageRecord matching the filter and query parameters. """ - results = [] - skipped = 0 - collected = 0 - for record in self.profile.records.values(): - if record.type == type_filter and tag_query_match(record.tags, tag_query): - if skipped < offset: - skipped += 1 - continue - if collected < limit: - collected += 1 - results.append(record) - else: - break - return results + # Filter records based on type and tag_query + filtered_records = [ + record + for record in self.profile.records.values() + if record.type == type_filter and tag_query_match(record.tags, tag_query) + ] + + # Sort records if order_by is specified + if order_by: + try: + filtered_records.sort(key=attrgetter(order_by), reverse=descending) + except AttributeError: + raise ValueError(f"Invalid order_by field: {order_by}") + + # Apply pagination (offset and limit) + paginated_records = filtered_records[offset : offset + limit] + + return paginated_records async def find_all_records( self, type_filter: str, tag_query: Mapping = None, + order_by: Optional[str] = None, + descending: bool = False, options: Mapping = None, ): """Retrieve all records matching a particular type filter and tag query.""" @@ -138,6 +152,14 @@ async def find_all_records( for record in self.profile.records.values(): if record.type == type_filter and tag_query_match(record.tags, tag_query): results.append(record) + + # Sort records if order_by is specified + if order_by: + try: + results.sort(key=attrgetter(order_by), reverse=descending) + except AttributeError: + raise ValueError(f"Invalid order_by field: {order_by}") + return results async def delete_all_records( diff --git a/docker/Dockerfile b/docker/Dockerfile index a76fb21266..b3d9a5c94d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,8 +16,8 @@ ARG acapy_name="aries-cloudagent" ARG acapy_version ARG acapy_reqs=[askar,didcommv2] -ENV HOME="/home/$user" \ - APP_ROOT="$HOME" \ +ENV HOME="/home/$user" +ENV APP_ROOT="$HOME" \ LC_ALL=C.UTF-8 \ LANG=C.UTF-8 \ PIP_NO_CACHE_DIR=off \ @@ -96,7 +96,9 @@ USER $user COPY --from=build /src/dist/aries_cloudagent*.whl . RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1) && \ echo "Installing ${aries_cloudagent_package} ..." && \ - pip install --no-cache-dir --find-links=. ${aries_cloudagent_package}${acapy_reqs} && \ + pip install --no-cache-dir --find-links=. \ + --extra-index-url https://test.pypi.org/simple/ \ + ${aries_cloudagent_package}${acapy_reqs} && \ rm aries_cloudagent*.whl && \ chmod +rx $(python -m site --user-site) $HOME/.local diff --git a/poetry.lock b/poetry.lock index 9d46122ba0..4089024350 100644 --- a/poetry.lock +++ b/poetry.lock @@ -224,21 +224,26 @@ tests = ["apispec[marshmallow,yaml]", "openapi-spec-validator (==0.7.1)", "pytes yaml = ["PyYAML (>=3.10)"] [[package]] -name = "aries-askar" -version = "0.3.2" -description = "" +name = "aries-askar-ff137" +version = "0.3.3b0" +description = "UNKNOWN" optional = true python-versions = ">=3.6.3" files = [ - {file = "aries_askar-0.3.2-py3-none-macosx_10_9_universal2.whl", hash = "sha256:02ddbe1773ce72c57edafff5777a1337d4a678da7484596712949170fb3ca1dc"}, - {file = "aries_askar-0.3.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:176eebcf833bb9974a162fd931c8d67669e4f0145b351ce9cb1289fd2d5a345c"}, - {file = "aries_askar-0.3.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:63f9ab97db4778ced830a6d1135e1f8bd1ca564de27218bd114f1cffbd31b04c"}, - {file = "aries_askar-0.3.2-py3-none-win_amd64.whl", hash = "sha256:6b4253377d5ed167ed94790e49c58584b68f897d2541ac4bb18fd37e9264164b"}, + {file = "aries_askar_ff137-0.3.3b0-py3-none-macosx_10_9_universal2.whl", hash = "sha256:32d6ed2366527b733a6025c19fb6f52f4547a3b2693cc11a1175b0ca3bfc8792"}, + {file = "aries_askar_ff137-0.3.3b0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:54214ac04c3f06d7dc302c0592787f9a998c8e104f8f2ee382fc2645efef6e41"}, + {file = "aries_askar_ff137-0.3.3b0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c7f5517c3c910aa34cee9359e184388f320d14bac7296b37d9dca4026c254bba"}, + {file = "aries_askar_ff137-0.3.3b0-py3-none-win_amd64.whl", hash = "sha256:5bdf83bdaacd4dc43a34a3a58c43e165a0b66303c9bddded64cdf6f84e015ee0"}, ] [package.dependencies] cached-property = ">=1.5.2,<1.6.0" +[package.source] +type = "legacy" +url = "https://test.pypi.org/simple" +reference = "testpypi" + [[package]] name = "async-timeout" version = "4.0.3" @@ -1041,8 +1046,6 @@ files = [ {file = "frozendict-2.4.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d13b4310db337f4d2103867c5a05090b22bc4d50ca842093779ef541ea9c9eea"}, {file = "frozendict-2.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:b3b967d5065872e27b06f785a80c0ed0a45d1f7c9b85223da05358e734d858ca"}, {file = "frozendict-2.4.4-cp39-cp39-win_arm64.whl", hash = "sha256:4ae8d05c8d0b6134bfb6bfb369d5fa0c4df21eabb5ca7f645af95fdc6689678e"}, - {file = "frozendict-2.4.4-py311-none-any.whl", hash = "sha256:705efca8d74d3facbb6ace80ab3afdd28eb8a237bfb4063ed89996b024bc443d"}, - {file = "frozendict-2.4.4-py312-none-any.whl", hash = "sha256:d9647563e76adb05b7cde2172403123380871360a114f546b4ae1704510801e5"}, {file = "frozendict-2.4.4.tar.gz", hash = "sha256:3f7c031b26e4ee6a3f786ceb5e3abf1181c4ade92dce1f847da26ea2c96008c7"}, ] @@ -1164,13 +1167,13 @@ license = ["ukkonen"] [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] @@ -2891,11 +2894,11 @@ idna = ">=2.0" multidict = ">=4.0" [extras] -askar = ["anoncreds", "aries-askar", "indy-credx", "indy-vdr"] +askar = ["anoncreds", "aries-askar-ff137", "indy-credx", "indy-vdr"] bbs = ["ursa-bbs-signatures"] didcommv2 = ["didcomm-messaging"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "dc5285058e717aa141d57330e8fed94a0eb55135df1b6af7b3986893e5a0da14" +content-hash = "921b2996c4f3460829df1358d5e09aecd3f078d66de87cf6b691d5df3f0b14c9" diff --git a/pyproject.toml b/pyproject.toml index 5b893a82c9..02ba47fd43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ did-peer-4 = "^0.1.4" uuid_utils = "^0.9.0" # askar -aries-askar= { version = "~0.3.2", optional = true } +aries-askar-ff137 = {version = "==0.3.3b0", source = "testpypi", optional = true} indy-credx= { version = "~1.1.1", optional = true } indy-vdr= { version = "~0.4.0", optional = true } anoncreds= { version = "0.2.0", optional = true } @@ -82,7 +82,7 @@ debugpy = "^1.8.5" [tool.poetry.extras] askar = [ - "aries-askar", + "aries-askar-ff137", "indy-credx", "indy-vdr", "anoncreds" @@ -97,6 +97,11 @@ didcommv2 = [ [tool.poetry.scripts] aca-py = "aries_cloudagent.__main__:script_main" +[[tool.poetry.source]] +name = "testpypi" +url = "https://test.pypi.org/simple/" +priority = "supplemental" + [tool.ruff] lint.select = ["B006", "C", "D", "E", "F"]