haiway 0.10.16__tar.gz → 0.10.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {haiway-0.10.16 → haiway-0.10.17}/PKG-INFO +1 -1
- haiway-0.10.17/junit/test-results.xml +1 -0
- {haiway-0.10.16 → haiway-0.10.17}/pyproject.toml +1 -1
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/path.py +32 -14
- {haiway-0.10.16 → haiway-0.10.17}/uv.lock +1 -1
- haiway-0.10.16/junit/test-results.xml +0 -1
- {haiway-0.10.16 → haiway-0.10.17}/.github/workflows/ci.yml +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/.github/workflows/publish.yml +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/.gitignore +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/LICENSE +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/Makefile +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/README.md +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/config/pre-push +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/.dockerignore +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/Dockerfile +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/Makefile +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/README.md +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/config/.env.example +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/config/unit.json +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/docker-compose.yml +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/pyproject.toml +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/__int__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/calls.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/config.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/state.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/types.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/features/todos/user_tasks.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/postgres/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/postgres/client.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/postgres/config.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/postgres/state.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/integrations/postgres/types.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/__main__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/application.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/config.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/middlewares/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/middlewares/context.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/routes/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/routes/technical.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/server/routes/todos.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/calls.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/config.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/postgres.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/state.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/src/solutions/user_tasks/types.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/examples/fastAPI/uv.lock +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/guidelines/functionalities.md +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/guidelines/packages.md +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/access.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/disposables.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/identifier.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/logging.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/metrics.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/state.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/tasks.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/context/types.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/asynchrony.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/caching.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/metrics.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/retries.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/throttling.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/timeouted.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/helpers/tracing.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/py.typed +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/attributes.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/requirement.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/structure.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/state/validation.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/types/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/types/default.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/types/frozen.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/types/missing.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/always.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/collections.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/env.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/freezing.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/logs.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/mimic.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/noop.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/src/haiway/utils/queue.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/__init__.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_async_queue.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_attribute_path.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_auto_retry.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_cache.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_context.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_state.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_streaming.py +0 -0
- {haiway-0.10.16 → haiway-0.10.17}/tests/test_timeout.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: haiway
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.17
|
4
4
|
Summary: Framework for dependency injection and state management within structured concurrency model.
|
5
5
|
Project-URL: Homepage, https://miquido.com
|
6
6
|
Project-URL: Repository, https://github.com/miquido/haiway.git
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="79" time="1.133" timestamp="2025-03-10T08:19:43.409896" hostname="fv-az2027-73"><testcase classname="tests.test_async_queue" name="test_fails_when_stream_fails" time="0.001" /><testcase classname="tests.test_async_queue" name="test_cancels_when_iteration_cancels" time="0.001" /><testcase classname="tests.test_async_queue" name="test_ends_when_stream_ends" time="0.001" /><testcase classname="tests.test_async_queue" name="test_buffers_values_when_not_reading" time="0.001" /><testcase classname="tests.test_async_queue" name="test_delivers_buffer_when_streaming_fails" time="0.001" /><testcase classname="tests.test_async_queue" name="test_delivers_updates_when_sending" time="0.001" /><testcase classname="tests.test_async_queue" name="test_fails_when_sending_to_finished" time="0.001" /><testcase classname="tests.test_async_queue" name="test_ignores_when_finishing_when_finished" time="0.001" /><testcase classname="tests.test_attribute_path" name="test_id_path_points_to_self" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_attribute_path_points_to_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_nested_attribute_path_points_to_nested_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_recursive_attribute_path_points_to_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_list_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_tuple_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_mixed_tuple_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_dict_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_id_path_set_updates_self" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_attribute_path_set_updates_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_nested_attribute_path_set_updates_nested_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_recursive_attribute_set_updates_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_list_item_path_set_updates_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_tuple_item_path_set_updates_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_mixed_tuple_item_set_updates_item" time="0.001" /><testcase classname="tests.test_attribute_path" name="test_dict_item_path_set_updates_item" time="0.000" /><testcase classname="tests.test_auto_retry" name="test_returns_value_without_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_retries_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_logs_issue_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_fails_with_exceeding_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_fails_with_cancellation" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_retries_with_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_fails_with_not_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_returns_value_without_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_retries_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_exceeding_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_cancellation" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_when_cancelled" time="0.021" /><testcase classname="tests.test_auto_retry" name="test_async_uses_delay_with_errors" time="0.102" /><testcase classname="tests.test_auto_retry" name="test_async_uses_computed_delay_with_errors" time="0.107" /><testcase classname="tests.test_auto_retry" name="test_async_logs_issue_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_retries_with_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_not_selected_errors" time="0.001" /><testcase classname="tests.test_cache" name="test_returns_cache_value_with_same_argument" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_different_argument" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_limit_exceed" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_same_value_with_repeating_argument" time="0.000" /><testcase classname="tests.test_cache" name="test_fails_with_error" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_expiration_time_exceed" time="0.021" /><testcase classname="tests.test_cache" name="test_async_returns_cache_value_with_same_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_different_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_limit_exceed" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_same_value_with_repeating_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_expiration_time_exceed" time="0.021" /><testcase classname="tests.test_cache" name="test_async_cancel_waiting_does_not_cancel_task" time="0.502" /><testcase classname="tests.test_cache" name="test_async_expiration_does_not_cancel_task" time="0.021" /><testcase classname="tests.test_cache" name="test_async_expiration_creates_new_task" time="0.041" /><testcase classname="tests.test_cache" name="test_async_fails_with_error" time="0.001" /><testcase classname="tests.test_context" name="test_state_is_available_according_to_context" time="0.001" /><testcase classname="tests.test_context" name="test_state_update_updates_local_context" time="0.001" /><testcase classname="tests.test_context" name="test_exceptions_are_propagated" time="0.001" /><testcase classname="tests.test_state" name="test_basic_initializes_with_arguments" time="0.002" /><testcase classname="tests.test_state" name="test_basic_initializes_with_defaults" time="0.001" /><testcase classname="tests.test_state" name="test_basic_equals_checks_properties" time="0.000" /><testcase classname="tests.test_state" name="test_basic_initializes_with_arguments_and_defaults" time="0.001" /><testcase classname="tests.test_state" name="test_parametrized_initializes_with_proper_parameters" time="0.000" /><testcase classname="tests.test_state" name="test_nested_initializes_with_proper_arguments" time="0.001" /><testcase classname="tests.test_state" name="test_dict_skips_missing_properties" time="0.000" /><testcase classname="tests.test_state" name="test_initialization_allows_missing_properties" time="0.000" /><testcase classname="tests.test_state" name="test_generic_subtypes_validation" time="0.002" /><testcase classname="tests.test_state" name="test_copying_leaves_same_object" time="0.001" /><testcase classname="tests.test_streaming" name="test_fails_when_generator_fails" time="0.001" /><testcase classname="tests.test_streaming" name="test_cancels_when_iteration_cancels" time="0.001" /><testcase classname="tests.test_streaming" name="test_ends_when_generator_ends" time="0.001" /><testcase classname="tests.test_streaming" name="test_delivers_updates_when_generating" time="0.001" /><testcase classname="tests.test_streaming" name="test_streaming_context_variables_access_is_preserved" time="0.001" /><testcase classname="tests.test_streaming" name="test_nested_streaming_streams_correctly" time="0.001" /><testcase classname="tests.test_timeout" name="test_returns_result_when_returning_value" time="0.001" /><testcase classname="tests.test_timeout" name="test_raises_with_error" time="0.001" /><testcase classname="tests.test_timeout" name="test_raises_with_cancel" time="0.011" /><testcase classname="tests.test_timeout" name="test_raises_with_timeout" time="0.011" /></testsuite></testsuites>
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
|
|
5
5
|
[project]
|
6
6
|
name = "haiway"
|
7
7
|
description = "Framework for dependency injection and state management within structured concurrency model."
|
8
|
-
version = "0.10.
|
8
|
+
version = "0.10.17"
|
9
9
|
readme = "README.md"
|
10
10
|
maintainers = [
|
11
11
|
{ name = "Kacper Kaliński", email = "kacper.kalinski@miquido.com" },
|
@@ -6,7 +6,7 @@ from collections import abc as collections_abc
|
|
6
6
|
from collections import deque
|
7
7
|
from collections.abc import Callable, Mapping, Sequence
|
8
8
|
from copy import copy
|
9
|
-
from typing import Any, final, get_args, get_origin, overload
|
9
|
+
from typing import Any, TypeAliasType, final, get_args, get_origin, overload
|
10
10
|
|
11
11
|
from haiway.types import MISSING, Missing, not_missing
|
12
12
|
|
@@ -48,8 +48,8 @@ class PropertyAttributePathComponent(AttributePathComponent):
|
|
48
48
|
attribute: type[Attribute],
|
49
49
|
name: str,
|
50
50
|
) -> None:
|
51
|
-
root_origin: Any =
|
52
|
-
attribute_origin: Any =
|
51
|
+
root_origin: Any = _unaliased_origin(root)
|
52
|
+
attribute_origin: Any = _unaliased_origin(attribute)
|
53
53
|
|
54
54
|
def access(
|
55
55
|
subject: Root,
|
@@ -144,8 +144,8 @@ class SequenceItemAttributePathComponent(AttributePathComponent):
|
|
144
144
|
attribute: type[Attribute],
|
145
145
|
index: int,
|
146
146
|
) -> None:
|
147
|
-
root_origin: Any =
|
148
|
-
attribute_origin: Any =
|
147
|
+
root_origin: Any = _unaliased_origin(root)
|
148
|
+
attribute_origin: Any = _unaliased_origin(attribute)
|
149
149
|
|
150
150
|
def access(
|
151
151
|
subject: Root,
|
@@ -218,8 +218,8 @@ class MappingItemAttributePathComponent(AttributePathComponent):
|
|
218
218
|
attribute: type[Attribute],
|
219
219
|
key: str | int,
|
220
220
|
) -> None:
|
221
|
-
root_origin: Any =
|
222
|
-
attribute_origin: Any =
|
221
|
+
root_origin: Any = _unaliased_origin(root)
|
222
|
+
attribute_origin: Any = _unaliased_origin(attribute)
|
223
223
|
|
224
224
|
def access(
|
225
225
|
subject: Root,
|
@@ -373,9 +373,9 @@ class AttributePath[Root, Attribute]:
|
|
373
373
|
self,
|
374
374
|
key: str | int,
|
375
375
|
) -> Any:
|
376
|
-
match
|
376
|
+
match _unaliased_origin(self.__attribute__):
|
377
377
|
case collections_abc.Mapping | typing.Mapping | builtins.dict:
|
378
|
-
match get_args(self.__attribute__):
|
378
|
+
match get_args(_unaliased(self.__attribute__)):
|
379
379
|
case (builtins.str | builtins.int, element_annotation):
|
380
380
|
return AttributePath[Root, Any](
|
381
381
|
self.__root__,
|
@@ -403,7 +403,7 @@ class AttributePath[Root, Attribute]:
|
|
403
403
|
self.__attribute__.__name__,
|
404
404
|
)
|
405
405
|
|
406
|
-
match get_args(self.__attribute__):
|
406
|
+
match get_args(_unaliased(self.__attribute__)):
|
407
407
|
case (element_annotation, builtins.Ellipsis | types.EllipsisType):
|
408
408
|
return AttributePath[Root, Any](
|
409
409
|
self.__root__,
|
@@ -439,7 +439,7 @@ class AttributePath[Root, Attribute]:
|
|
439
439
|
self.__attribute__.__name__,
|
440
440
|
)
|
441
441
|
|
442
|
-
match get_args(self.__attribute__):
|
442
|
+
match get_args(_unaliased(self.__attribute__)):
|
443
443
|
case (element_annotation,):
|
444
444
|
return AttributePath[Root, Any](
|
445
445
|
self.__root__,
|
@@ -484,13 +484,13 @@ class AttributePath[Root, Attribute]:
|
|
484
484
|
/,
|
485
485
|
updated: Attribute | Missing = MISSING,
|
486
486
|
) -> Root | Attribute:
|
487
|
-
assert isinstance(root,
|
487
|
+
assert isinstance(root, _unaliased_origin(self.__root__)), ( # nosec: B101
|
488
488
|
f"AttributePath '{self.__repr__()}' used on unexpected root of "
|
489
489
|
f"'{type(root).__name__}' instead of '{self.__root__.__name__}'"
|
490
490
|
)
|
491
491
|
|
492
492
|
if not_missing(updated):
|
493
|
-
assert isinstance(updated,
|
493
|
+
assert isinstance(updated, _unaliased_origin(self.__attribute__)), ( # nosec: B101
|
494
494
|
f"AttributePath '{self.__repr__()}' assigning to unexpected value of "
|
495
495
|
f"'{type(updated).__name__}' instead of '{self.__attribute__.__name__}'"
|
496
496
|
)
|
@@ -516,9 +516,27 @@ class AttributePath[Root, Attribute]:
|
|
516
516
|
for component in self.__components__:
|
517
517
|
resolved = component.access(resolved)
|
518
518
|
|
519
|
-
assert isinstance(resolved,
|
519
|
+
assert isinstance(resolved, _unaliased_origin(self.__attribute__)), ( # nosec: B101
|
520
520
|
f"AttributePath '{self.__repr__()}' pointing to unexpected value of "
|
521
521
|
f"'{type(resolved).__name__}' instead of '{self.__attribute__.__name__}'"
|
522
522
|
)
|
523
523
|
|
524
524
|
return resolved
|
525
|
+
|
526
|
+
|
527
|
+
def _unaliased_origin(base: type[Any]) -> type[Any]:
|
528
|
+
match base:
|
529
|
+
case TypeAliasType() as aliased:
|
530
|
+
return get_origin(aliased.__value__) or aliased.__value__
|
531
|
+
|
532
|
+
case concrete:
|
533
|
+
return get_origin(concrete) or concrete
|
534
|
+
|
535
|
+
|
536
|
+
def _unaliased(base: type[Any]) -> type[Any]:
|
537
|
+
match base:
|
538
|
+
case TypeAliasType() as aliased:
|
539
|
+
return aliased.__value__
|
540
|
+
|
541
|
+
case concrete:
|
542
|
+
return concrete
|
@@ -1 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="79" time="1.148" timestamp="2025-03-04T15:59:15.242957" hostname="fv-az1695-875"><testcase classname="tests.test_async_queue" name="test_fails_when_stream_fails" time="0.001" /><testcase classname="tests.test_async_queue" name="test_cancels_when_iteration_cancels" time="0.001" /><testcase classname="tests.test_async_queue" name="test_ends_when_stream_ends" time="0.001" /><testcase classname="tests.test_async_queue" name="test_buffers_values_when_not_reading" time="0.001" /><testcase classname="tests.test_async_queue" name="test_delivers_buffer_when_streaming_fails" time="0.001" /><testcase classname="tests.test_async_queue" name="test_delivers_updates_when_sending" time="0.001" /><testcase classname="tests.test_async_queue" name="test_fails_when_sending_to_finished" time="0.001" /><testcase classname="tests.test_async_queue" name="test_ignores_when_finishing_when_finished" time="0.001" /><testcase classname="tests.test_attribute_path" name="test_id_path_points_to_self" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_attribute_path_points_to_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_nested_attribute_path_points_to_nested_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_recursive_attribute_path_points_to_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_list_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_tuple_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_mixed_tuple_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_dict_item_path_points_to_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_id_path_set_updates_self" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_attribute_path_set_updates_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_nested_attribute_path_set_updates_nested_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_recursive_attribute_set_updates_attribute" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_list_item_path_set_updates_item" time="0.001" /><testcase classname="tests.test_attribute_path" name="test_tuple_item_path_set_updates_item" time="0.000" /><testcase classname="tests.test_attribute_path" name="test_mixed_tuple_item_set_updates_item" time="0.001" /><testcase classname="tests.test_attribute_path" name="test_dict_item_path_set_updates_item" time="0.000" /><testcase classname="tests.test_auto_retry" name="test_returns_value_without_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_retries_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_logs_issue_with_errors" time="0.005" /><testcase classname="tests.test_auto_retry" name="test_fails_with_exceeding_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_fails_with_cancellation" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_retries_with_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_fails_with_not_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_returns_value_without_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_retries_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_exceeding_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_cancellation" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_when_cancelled" time="0.021" /><testcase classname="tests.test_auto_retry" name="test_async_uses_delay_with_errors" time="0.102" /><testcase classname="tests.test_auto_retry" name="test_async_uses_computed_delay_with_errors" time="0.107" /><testcase classname="tests.test_auto_retry" name="test_async_logs_issue_with_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_retries_with_selected_errors" time="0.001" /><testcase classname="tests.test_auto_retry" name="test_async_fails_with_not_selected_errors" time="0.001" /><testcase classname="tests.test_cache" name="test_returns_cache_value_with_same_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_different_argument" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_limit_exceed" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_same_value_with_repeating_argument" time="0.000" /><testcase classname="tests.test_cache" name="test_fails_with_error" time="0.000" /><testcase classname="tests.test_cache" name="test_returns_fresh_value_with_expiration_time_exceed" time="0.021" /><testcase classname="tests.test_cache" name="test_async_returns_cache_value_with_same_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_different_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_limit_exceed" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_same_value_with_repeating_argument" time="0.001" /><testcase classname="tests.test_cache" name="test_async_returns_fresh_value_with_expiration_time_exceed" time="0.021" /><testcase classname="tests.test_cache" name="test_async_cancel_waiting_does_not_cancel_task" time="0.502" /><testcase classname="tests.test_cache" name="test_async_expiration_does_not_cancel_task" time="0.021" /><testcase classname="tests.test_cache" name="test_async_expiration_creates_new_task" time="0.041" /><testcase classname="tests.test_cache" name="test_async_fails_with_error" time="0.001" /><testcase classname="tests.test_context" name="test_state_is_available_according_to_context" time="0.001" /><testcase classname="tests.test_context" name="test_state_update_updates_local_context" time="0.001" /><testcase classname="tests.test_context" name="test_exceptions_are_propagated" time="0.001" /><testcase classname="tests.test_state" name="test_basic_initializes_with_arguments" time="0.002" /><testcase classname="tests.test_state" name="test_basic_initializes_with_defaults" time="0.001" /><testcase classname="tests.test_state" name="test_basic_equals_checks_properties" time="0.000" /><testcase classname="tests.test_state" name="test_basic_initializes_with_arguments_and_defaults" time="0.001" /><testcase classname="tests.test_state" name="test_parametrized_initializes_with_proper_parameters" time="0.000" /><testcase classname="tests.test_state" name="test_nested_initializes_with_proper_arguments" time="0.001" /><testcase classname="tests.test_state" name="test_dict_skips_missing_properties" time="0.000" /><testcase classname="tests.test_state" name="test_initialization_allows_missing_properties" time="0.001" /><testcase classname="tests.test_state" name="test_generic_subtypes_validation" time="0.002" /><testcase classname="tests.test_state" name="test_copying_leaves_same_object" time="0.001" /><testcase classname="tests.test_streaming" name="test_fails_when_generator_fails" time="0.001" /><testcase classname="tests.test_streaming" name="test_cancels_when_iteration_cancels" time="0.001" /><testcase classname="tests.test_streaming" name="test_ends_when_generator_ends" time="0.001" /><testcase classname="tests.test_streaming" name="test_delivers_updates_when_generating" time="0.001" /><testcase classname="tests.test_streaming" name="test_streaming_context_variables_access_is_preserved" time="0.001" /><testcase classname="tests.test_streaming" name="test_nested_streaming_streams_correctly" time="0.001" /><testcase classname="tests.test_timeout" name="test_returns_result_when_returning_value" time="0.001" /><testcase classname="tests.test_timeout" name="test_raises_with_error" time="0.001" /><testcase classname="tests.test_timeout" name="test_raises_with_cancel" time="0.011" /><testcase classname="tests.test_timeout" name="test_raises_with_timeout" time="0.011" /></testsuite></testsuites>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|