haiway 0.10.17__tar.gz → 0.11.0__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.
Files changed (98) hide show
  1. {haiway-0.10.17 → haiway-0.11.0}/Makefile +1 -1
  2. {haiway-0.10.17 → haiway-0.11.0}/PKG-INFO +1 -1
  3. {haiway-0.10.17 → haiway-0.11.0}/junit/test-results.xml +1 -1
  4. {haiway-0.10.17 → haiway-0.11.0}/pyproject.toml +1 -1
  5. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/__init__.py +4 -0
  6. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/__init__.py +4 -1
  7. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/access.py +6 -1
  8. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/queue.py +11 -7
  9. {haiway-0.10.17 → haiway-0.11.0}/uv.lock +23 -23
  10. {haiway-0.10.17 → haiway-0.11.0}/.github/workflows/ci.yml +0 -0
  11. {haiway-0.10.17 → haiway-0.11.0}/.github/workflows/publish.yml +0 -0
  12. {haiway-0.10.17 → haiway-0.11.0}/.gitignore +0 -0
  13. {haiway-0.10.17 → haiway-0.11.0}/LICENSE +0 -0
  14. {haiway-0.10.17 → haiway-0.11.0}/README.md +0 -0
  15. {haiway-0.10.17 → haiway-0.11.0}/config/pre-push +0 -0
  16. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/.dockerignore +0 -0
  17. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/Dockerfile +0 -0
  18. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/Makefile +0 -0
  19. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/README.md +0 -0
  20. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/config/.env.example +0 -0
  21. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/config/unit.json +0 -0
  22. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/docker-compose.yml +0 -0
  23. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/pyproject.toml +0 -0
  24. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/__int__.py +0 -0
  25. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/__init__.py +0 -0
  26. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/calls.py +0 -0
  27. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/config.py +0 -0
  28. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/state.py +0 -0
  29. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/types.py +0 -0
  30. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/features/todos/user_tasks.py +0 -0
  31. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/__init__.py +0 -0
  32. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/postgres/__init__.py +0 -0
  33. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/postgres/client.py +0 -0
  34. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/postgres/config.py +0 -0
  35. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/postgres/state.py +0 -0
  36. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/integrations/postgres/types.py +0 -0
  37. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/__init__.py +0 -0
  38. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/__main__.py +0 -0
  39. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/application.py +0 -0
  40. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/config.py +0 -0
  41. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/middlewares/__init__.py +0 -0
  42. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/middlewares/context.py +0 -0
  43. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/routes/__init__.py +0 -0
  44. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/routes/technical.py +0 -0
  45. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/server/routes/todos.py +0 -0
  46. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/__init__.py +0 -0
  47. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/__init__.py +0 -0
  48. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/calls.py +0 -0
  49. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/config.py +0 -0
  50. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/postgres.py +0 -0
  51. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/state.py +0 -0
  52. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/src/solutions/user_tasks/types.py +0 -0
  53. {haiway-0.10.17 → haiway-0.11.0}/examples/fastAPI/uv.lock +0 -0
  54. {haiway-0.10.17 → haiway-0.11.0}/guidelines/functionalities.md +0 -0
  55. {haiway-0.10.17 → haiway-0.11.0}/guidelines/packages.md +0 -0
  56. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/disposables.py +0 -0
  57. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/identifier.py +0 -0
  58. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/logging.py +0 -0
  59. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/metrics.py +0 -0
  60. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/state.py +0 -0
  61. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/tasks.py +0 -0
  62. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/context/types.py +0 -0
  63. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/__init__.py +0 -0
  64. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/asynchrony.py +0 -0
  65. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/caching.py +0 -0
  66. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/metrics.py +0 -0
  67. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/retries.py +0 -0
  68. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/throttling.py +0 -0
  69. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/timeouted.py +0 -0
  70. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/helpers/tracing.py +0 -0
  71. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/py.typed +0 -0
  72. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/__init__.py +0 -0
  73. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/attributes.py +0 -0
  74. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/path.py +0 -0
  75. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/requirement.py +0 -0
  76. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/structure.py +0 -0
  77. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/state/validation.py +0 -0
  78. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/types/__init__.py +0 -0
  79. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/types/default.py +0 -0
  80. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/types/frozen.py +0 -0
  81. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/types/missing.py +0 -0
  82. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/__init__.py +0 -0
  83. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/always.py +0 -0
  84. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/collections.py +0 -0
  85. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/env.py +0 -0
  86. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/freezing.py +0 -0
  87. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/logs.py +0 -0
  88. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/mimic.py +0 -0
  89. {haiway-0.10.17 → haiway-0.11.0}/src/haiway/utils/noop.py +0 -0
  90. {haiway-0.10.17 → haiway-0.11.0}/tests/__init__.py +0 -0
  91. {haiway-0.10.17 → haiway-0.11.0}/tests/test_async_queue.py +0 -0
  92. {haiway-0.10.17 → haiway-0.11.0}/tests/test_attribute_path.py +0 -0
  93. {haiway-0.10.17 → haiway-0.11.0}/tests/test_auto_retry.py +0 -0
  94. {haiway-0.10.17 → haiway-0.11.0}/tests/test_cache.py +0 -0
  95. {haiway-0.10.17 → haiway-0.11.0}/tests/test_context.py +0 -0
  96. {haiway-0.10.17 → haiway-0.11.0}/tests/test_state.py +0 -0
  97. {haiway-0.10.17 → haiway-0.11.0}/tests/test_streaming.py +0 -0
  98. {haiway-0.10.17 → haiway-0.11.0}/tests/test_timeout.py +0 -0
@@ -10,7 +10,7 @@ TESTS_PATH := tests
10
10
  -include .env
11
11
 
12
12
  ifndef UV_VERSION
13
- UV_VERSION := 0.6.4
13
+ UV_VERSION := 0.6.5
14
14
  endif
15
15
 
16
16
  .PHONY: uv_check venv sync update format lint test release
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haiway
3
- Version: 0.10.17
3
+ Version: 0.11.0
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
@@ -1 +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>
1
+ <?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="79" time="1.147" timestamp="2025-03-11T11:25:35.484537" hostname="fv-az790-267"><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.002" /><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.106" /><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.17"
8
+ version = "0.11.0"
9
9
  readme = "README.md"
10
10
  maintainers = [
11
11
  { name = "Kacper Kaliński", email = "kacper.kalinski@miquido.com" },
@@ -9,7 +9,9 @@ from haiway.context import (
9
9
  MetricsScopeExiting,
10
10
  MissingContext,
11
11
  MissingState,
12
+ ScopeContext,
12
13
  ScopeIdentifier,
14
+ StateContext,
13
15
  ctx,
14
16
  )
15
17
  from haiway.helpers import (
@@ -78,8 +80,10 @@ __all__ = [
78
80
  "MissingContext",
79
81
  "MissingState",
80
82
  "ResultTrace",
83
+ "ScopeContext",
81
84
  "ScopeIdentifier",
82
85
  "State",
86
+ "StateContext",
83
87
  "always",
84
88
  "as_dict",
85
89
  "as_list",
@@ -1,4 +1,4 @@
1
- from haiway.context.access import ctx
1
+ from haiway.context.access import ScopeContext, ctx
2
2
  from haiway.context.disposables import Disposable, Disposables
3
3
  from haiway.context.identifier import ScopeIdentifier
4
4
  from haiway.context.metrics import (
@@ -9,6 +9,7 @@ from haiway.context.metrics import (
9
9
  MetricsScopeEntering,
10
10
  MetricsScopeExiting,
11
11
  )
12
+ from haiway.context.state import StateContext
12
13
  from haiway.context.types import MissingContext, MissingState
13
14
 
14
15
  __all__ = [
@@ -22,6 +23,8 @@ __all__ = [
22
23
  "MetricsScopeExiting",
23
24
  "MissingContext",
24
25
  "MissingState",
26
+ "ScopeContext",
25
27
  "ScopeIdentifier",
28
+ "StateContext",
26
29
  "ctx",
27
30
  ]
@@ -1,4 +1,9 @@
1
- from asyncio import CancelledError, Task, current_task, iscoroutinefunction
1
+ from asyncio import (
2
+ CancelledError,
3
+ Task,
4
+ current_task,
5
+ iscoroutinefunction,
6
+ )
2
7
  from collections.abc import (
3
8
  AsyncGenerator,
4
9
  AsyncIterator,
@@ -23,9 +23,6 @@ class AsyncQueue[Element](AsyncIterator[Element]):
23
23
  self._waiting: Future[Element] | None = None
24
24
  self._finish_reason: BaseException | None = None
25
25
 
26
- def __del__(self) -> None:
27
- self.finish()
28
-
29
26
  @property
30
27
  def is_finished(self) -> bool:
31
28
  return self._finish_reason is not None
@@ -34,7 +31,6 @@ class AsyncQueue[Element](AsyncIterator[Element]):
34
31
  self,
35
32
  element: Element,
36
33
  /,
37
- *elements: Element,
38
34
  ) -> None:
39
35
  if self.is_finished:
40
36
  raise RuntimeError("AsyncQueue is already finished")
@@ -45,8 +41,6 @@ class AsyncQueue[Element](AsyncIterator[Element]):
45
41
  else:
46
42
  self._queue.append(element)
47
43
 
48
- self._queue.extend(elements)
49
-
50
44
  def finish(
51
45
  self,
52
46
  exception: BaseException | None = None,
@@ -57,7 +51,17 @@ class AsyncQueue[Element](AsyncIterator[Element]):
57
51
  self._finish_reason = exception or StopAsyncIteration()
58
52
 
59
53
  if self._waiting is not None and not self._waiting.done():
60
- self._waiting.set_exception(self._finish_reason)
54
+ # checking loop only on finish as the rest of operations
55
+ # should always have a valid loop in a typical environment
56
+ # and we are not supporting multithreading yet
57
+ if get_running_loop() is not self._loop:
58
+ self._loop.call_soon_threadsafe(
59
+ self._waiting.set_exception,
60
+ self._finish_reason,
61
+ )
62
+
63
+ else:
64
+ self._waiting.set_exception(self._finish_reason)
61
65
 
62
66
  def cancel(self) -> None:
63
67
  self.finish(exception=CancelledError())
@@ -67,7 +67,7 @@ wheels = [
67
67
 
68
68
  [[package]]
69
69
  name = "haiway"
70
- version = "0.10.17"
70
+ version = "0.11.0"
71
71
  source = { editable = "." }
72
72
 
73
73
  [package.optional-dependencies]
@@ -264,36 +264,36 @@ wheels = [
264
264
 
265
265
  [[package]]
266
266
  name = "ruff"
267
- version = "0.9.9"
267
+ version = "0.9.10"
268
268
  source = { registry = "https://pypi.org/simple" }
269
- sdist = { url = "https://files.pythonhosted.org/packages/6f/c3/418441a8170e8d53d05c0b9dad69760dbc7b8a12c10dbe6db1e1205d2377/ruff-0.9.9.tar.gz", hash = "sha256:0062ed13f22173e85f8f7056f9a24016e692efeea8704d1a5e8011b8aa850933", size = 3717448 }
269
+ sdist = { url = "https://files.pythonhosted.org/packages/20/8e/fafaa6f15c332e73425d9c44ada85360501045d5ab0b81400076aff27cf6/ruff-0.9.10.tar.gz", hash = "sha256:9bacb735d7bada9cfb0f2c227d3658fc443d90a727b47f206fb33f52f3c0eac7", size = 3759776 }
270
270
  wheels = [
271
- { url = "https://files.pythonhosted.org/packages/bc/c3/2c4afa9ba467555d074b146d9aed0633a56ccdb900839fb008295d037b89/ruff-0.9.9-py3-none-linux_armv6l.whl", hash = "sha256:628abb5ea10345e53dff55b167595a159d3e174d6720bf19761f5e467e68d367", size = 10027252 },
272
- { url = "https://files.pythonhosted.org/packages/33/d1/439e58487cf9eac26378332e25e7d5ade4b800ce1eec7dc2cfc9b0d7ca96/ruff-0.9.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b6cd1428e834b35d7493354723543b28cc11dc14d1ce19b685f6e68e07c05ec7", size = 10840721 },
273
- { url = "https://files.pythonhosted.org/packages/50/44/fead822c38281ba0122f1b76b460488a175a9bd48b130650a6fb6dbcbcf9/ruff-0.9.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5ee162652869120ad260670706f3cd36cd3f32b0c651f02b6da142652c54941d", size = 10161439 },
274
- { url = "https://files.pythonhosted.org/packages/11/ae/d404a2ab8e61ddf6342e09cc6b7f7846cce6b243e45c2007dbe0ca928a5d/ruff-0.9.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aa0f6b75082c9be1ec5a1db78c6d4b02e2375c3068438241dc19c7c306cc61a", size = 10336264 },
275
- { url = "https://files.pythonhosted.org/packages/6a/4e/7c268aa7d84cd709fb6f046b8972313142cffb40dfff1d2515c5e6288d54/ruff-0.9.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:584cc66e89fb5f80f84b05133dd677a17cdd86901d6479712c96597a3f28e7fe", size = 9908774 },
276
- { url = "https://files.pythonhosted.org/packages/cc/26/c618a878367ef1b76270fd027ca93692657d3f6122b84ba48911ef5f2edc/ruff-0.9.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:abf3369325761a35aba75cd5c55ba1b5eb17d772f12ab168fbfac54be85cf18c", size = 11428127 },
277
- { url = "https://files.pythonhosted.org/packages/d7/9a/c5588a93d9bfed29f565baf193fe802fa676a0c837938137ea6cf0576d8c/ruff-0.9.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:3403a53a32a90ce929aa2f758542aca9234befa133e29f4933dcef28a24317be", size = 12133187 },
278
- { url = "https://files.pythonhosted.org/packages/3e/ff/e7980a7704a60905ed7e156a8d73f604c846d9bd87deda9cabfa6cba073a/ruff-0.9.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:18454e7fa4e4d72cffe28a37cf6a73cb2594f81ec9f4eca31a0aaa9ccdfb1590", size = 11602937 },
279
- { url = "https://files.pythonhosted.org/packages/24/78/3690444ad9e3cab5c11abe56554c35f005b51d1d118b429765249095269f/ruff-0.9.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fadfe2c88724c9617339f62319ed40dcdadadf2888d5afb88bf3adee7b35bfb", size = 13771698 },
280
- { url = "https://files.pythonhosted.org/packages/6e/bf/e477c2faf86abe3988e0b5fd22a7f3520e820b2ee335131aca2e16120038/ruff-0.9.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6df104d08c442a1aabcfd254279b8cc1e2cbf41a605aa3e26610ba1ec4acf0b0", size = 11249026 },
281
- { url = "https://files.pythonhosted.org/packages/f7/82/cdaffd59e5a8cb5b14c408c73d7a555a577cf6645faaf83e52fe99521715/ruff-0.9.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d7c62939daf5b2a15af48abbd23bea1efdd38c312d6e7c4cedf5a24e03207e17", size = 10220432 },
282
- { url = "https://files.pythonhosted.org/packages/fe/a4/2507d0026225efa5d4412b6e294dfe54725a78652a5c7e29e6bd0fc492f3/ruff-0.9.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9494ba82a37a4b81b6a798076e4a3251c13243fc37967e998efe4cce58c8a8d1", size = 9874602 },
283
- { url = "https://files.pythonhosted.org/packages/d5/be/f3aab1813846b476c4bcffe052d232244979c3cd99d751c17afb530ca8e4/ruff-0.9.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4efd7a96ed6d36ef011ae798bf794c5501a514be369296c672dab7921087fa57", size = 10851212 },
284
- { url = "https://files.pythonhosted.org/packages/8b/45/8e5fd559bea0d2f57c4e12bf197a2fade2fac465aa518284f157dfbca92b/ruff-0.9.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ab90a7944c5a1296f3ecb08d1cbf8c2da34c7e68114b1271a431a3ad30cb660e", size = 11327490 },
285
- { url = "https://files.pythonhosted.org/packages/42/55/e6c90f13880aeef327746052907e7e930681f26a164fe130ddac28b08269/ruff-0.9.9-py3-none-win32.whl", hash = "sha256:6b4c376d929c25ecd6d87e182a230fa4377b8e5125a4ff52d506ee8c087153c1", size = 10227912 },
286
- { url = "https://files.pythonhosted.org/packages/35/b2/da925693cb82a1208aa34966c0f36cb222baca94e729dd22a587bc22d0f3/ruff-0.9.9-py3-none-win_amd64.whl", hash = "sha256:837982ea24091d4c1700ddb2f63b7070e5baec508e43b01de013dc7eff974ff1", size = 11355632 },
287
- { url = "https://files.pythonhosted.org/packages/31/d8/de873d1c1b020d668d8ec9855d390764cb90cf8f6486c0983da52be8b7b7/ruff-0.9.9-py3-none-win_arm64.whl", hash = "sha256:3ac78f127517209fe6d96ab00f3ba97cafe38718b23b1db3e96d8b2d39e37ddf", size = 10435860 },
271
+ { url = "https://files.pythonhosted.org/packages/73/b2/af7c2cc9e438cbc19fafeec4f20bfcd72165460fe75b2b6e9a0958c8c62b/ruff-0.9.10-py3-none-linux_armv6l.whl", hash = "sha256:eb4d25532cfd9fe461acc83498361ec2e2252795b4f40b17e80692814329e42d", size = 10049494 },
272
+ { url = "https://files.pythonhosted.org/packages/6d/12/03f6dfa1b95ddd47e6969f0225d60d9d7437c91938a310835feb27927ca0/ruff-0.9.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:188a6638dab1aa9bb6228a7302387b2c9954e455fb25d6b4470cb0641d16759d", size = 10853584 },
273
+ { url = "https://files.pythonhosted.org/packages/02/49/1c79e0906b6ff551fb0894168763f705bf980864739572b2815ecd3c9df0/ruff-0.9.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5284dcac6b9dbc2fcb71fdfc26a217b2ca4ede6ccd57476f52a587451ebe450d", size = 10155692 },
274
+ { url = "https://files.pythonhosted.org/packages/5b/01/85e8082e41585e0e1ceb11e41c054e9e36fed45f4b210991052d8a75089f/ruff-0.9.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47678f39fa2a3da62724851107f438c8229a3470f533894b5568a39b40029c0c", size = 10369760 },
275
+ { url = "https://files.pythonhosted.org/packages/a1/90/0bc60bd4e5db051f12445046d0c85cc2c617095c0904f1aa81067dc64aea/ruff-0.9.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99713a6e2766b7a17147b309e8c915b32b07a25c9efd12ada79f217c9c778b3e", size = 9912196 },
276
+ { url = "https://files.pythonhosted.org/packages/66/ea/0b7e8c42b1ec608033c4d5a02939c82097ddcb0b3e393e4238584b7054ab/ruff-0.9.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:524ee184d92f7c7304aa568e2db20f50c32d1d0caa235d8ddf10497566ea1a12", size = 11434985 },
277
+ { url = "https://files.pythonhosted.org/packages/d5/86/3171d1eff893db4f91755175a6e1163c5887be1f1e2f4f6c0c59527c2bfd/ruff-0.9.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:df92aeac30af821f9acf819fc01b4afc3dfb829d2782884f8739fb52a8119a16", size = 12155842 },
278
+ { url = "https://files.pythonhosted.org/packages/89/9e/700ca289f172a38eb0bca752056d0a42637fa17b81649b9331786cb791d7/ruff-0.9.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de42e4edc296f520bb84954eb992a07a0ec5a02fecb834498415908469854a52", size = 11613804 },
279
+ { url = "https://files.pythonhosted.org/packages/f2/92/648020b3b5db180f41a931a68b1c8575cca3e63cec86fd26807422a0dbad/ruff-0.9.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d257f95b65806104b6b1ffca0ea53f4ef98454036df65b1eda3693534813ecd1", size = 13823776 },
280
+ { url = "https://files.pythonhosted.org/packages/5e/a6/cc472161cd04d30a09d5c90698696b70c169eeba2c41030344194242db45/ruff-0.9.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60dec7201c0b10d6d11be00e8f2dbb6f40ef1828ee75ed739923799513db24c", size = 11302673 },
281
+ { url = "https://files.pythonhosted.org/packages/6c/db/d31c361c4025b1b9102b4d032c70a69adb9ee6fde093f6c3bf29f831c85c/ruff-0.9.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d838b60007da7a39c046fcdd317293d10b845001f38bcb55ba766c3875b01e43", size = 10235358 },
282
+ { url = "https://files.pythonhosted.org/packages/d1/86/d6374e24a14d4d93ebe120f45edd82ad7dcf3ef999ffc92b197d81cdc2a5/ruff-0.9.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ccaf903108b899beb8e09a63ffae5869057ab649c1e9231c05ae354ebc62066c", size = 9886177 },
283
+ { url = "https://files.pythonhosted.org/packages/00/62/a61691f6eaaac1e945a1f3f59f1eea9a218513139d5b6c2b8f88b43b5b8f/ruff-0.9.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f9567d135265d46e59d62dc60c0bfad10e9a6822e231f5b24032dba5a55be6b5", size = 10864747 },
284
+ { url = "https://files.pythonhosted.org/packages/ee/94/2c7065e1d92a8a8a46d46d9c3cf07b0aa7e0a1e0153d74baa5e6620b4102/ruff-0.9.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5f202f0d93738c28a89f8ed9eaba01b7be339e5d8d642c994347eaa81c6d75b8", size = 11360441 },
285
+ { url = "https://files.pythonhosted.org/packages/a7/8f/1f545ea6f9fcd7bf4368551fb91d2064d8f0577b3079bb3f0ae5779fb773/ruff-0.9.10-py3-none-win32.whl", hash = "sha256:bfb834e87c916521ce46b1788fbb8484966e5113c02df216680102e9eb960029", size = 10247401 },
286
+ { url = "https://files.pythonhosted.org/packages/4f/18/fb703603ab108e5c165f52f5b86ee2aa9be43bb781703ec87c66a5f5d604/ruff-0.9.10-py3-none-win_amd64.whl", hash = "sha256:f2160eeef3031bf4b17df74e307d4c5fb689a6f3a26a2de3f7ef4044e3c484f1", size = 11366360 },
287
+ { url = "https://files.pythonhosted.org/packages/35/85/338e603dc68e7d9994d5d84f24adbf69bae760ba5efd3e20f5ff2cec18da/ruff-0.9.10-py3-none-win_arm64.whl", hash = "sha256:5fd804c0327a5e5ea26615550e706942f348b197d5475ff34c19733aee4b2e69", size = 10436892 },
288
288
  ]
289
289
 
290
290
  [[package]]
291
291
  name = "setuptools"
292
- version = "75.8.2"
292
+ version = "76.0.0"
293
293
  source = { registry = "https://pypi.org/simple" }
294
- sdist = { url = "https://files.pythonhosted.org/packages/d1/53/43d99d7687e8cdef5ab5f9ec5eaf2c0423c2b35133a2b7e7bc276fc32b21/setuptools-75.8.2.tar.gz", hash = "sha256:4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2", size = 1344083 }
294
+ sdist = { url = "https://files.pythonhosted.org/packages/32/d2/7b171caf085ba0d40d8391f54e1c75a1cda9255f542becf84575cfd8a732/setuptools-76.0.0.tar.gz", hash = "sha256:43b4ee60e10b0d0ee98ad11918e114c70701bc6051662a9a675a0496c1a158f4", size = 1349387 }
295
295
  wheels = [
296
- { url = "https://files.pythonhosted.org/packages/a9/38/7d7362e031bd6dc121e5081d8cb6aa6f6fedf2b67bf889962134c6da4705/setuptools-75.8.2-py3-none-any.whl", hash = "sha256:558e47c15f1811c1fa7adbd0096669bf76c1d3f433f58324df69f3f5ecac4e8f", size = 1229385 },
296
+ { url = "https://files.pythonhosted.org/packages/37/66/d2d7e6ad554f3a7c7297c3f8ef6e22643ad3d35ef5c63bf488bc89f32f31/setuptools-76.0.0-py3-none-any.whl", hash = "sha256:199466a166ff664970d0ee145839f5582cb9bca7a0a3a2e795b6a9cb2308e9c6", size = 1236106 },
297
297
  ]
298
298
 
299
299
  [[package]]
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