haiway 0.10.11__py3-none-any.whl → 0.10.13__py3-none-any.whl

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/helpers/tracing.py CHANGED
@@ -74,6 +74,7 @@ def traced[**Args, Result](
74
74
  label=function.__name__,
75
75
  ),
76
76
  )
77
+
77
78
  else:
78
79
  return _traced_sync(
79
80
  function,
@@ -101,7 +102,7 @@ def _traced_sync[**Args, Result](
101
102
  return result
102
103
 
103
104
  except BaseException as exc:
104
- ctx.record(ResultTrace.of(exc))
105
+ ctx.record(ResultTrace.of(f"{type(exc)}: {exc}"))
105
106
  raise exc
106
107
 
107
108
  return mimic_function(
@@ -127,7 +128,7 @@ def _traced_async[**Args, Result](
127
128
  return result
128
129
 
129
130
  except BaseException as exc:
130
- ctx.record(ResultTrace.of(exc))
131
+ ctx.record(ResultTrace.of(f"{type(exc)}: {exc}"))
131
132
  raise exc
132
133
 
133
134
  return mimic_function(
@@ -66,6 +66,9 @@ class AttributeAnnotation:
66
66
  return self
67
67
 
68
68
  def __str__(self) -> str:
69
+ if alias := self.extra.get("TYPE_ALIAS"):
70
+ return alias
71
+
69
72
  origin_str: str = getattr(self.origin, "__name__", str(self.origin))
70
73
  arguments_str: str
71
74
  if self.arguments:
@@ -337,7 +340,10 @@ def _resolve_type_alias(
337
340
 
338
341
  resolved_attribute.origin = resolved.origin
339
342
  resolved_attribute.arguments = resolved.arguments
340
- resolved_attribute.extra = resolved.extra
343
+ resolved_attribute.extra = {
344
+ **resolved.extra,
345
+ "TYPE_ALIAS": annotation.__name__,
346
+ }
341
347
  resolved_attribute.required = resolved.required
342
348
 
343
349
  return resolved_attribute
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haiway
3
- Version: 0.10.11
3
+ Version: 0.10.13
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
@@ -16,9 +16,9 @@ haiway/helpers/metrics.py,sha256=0oFBiO-hAzihyC5jvXevNrYOoTcUGc2yGhE1A_866Mc,133
16
16
  haiway/helpers/retries.py,sha256=gIkyUlqJLDYaxIZd3qzeqGFY9y5Gp8dgZLlZ6hs8hoc,7538
17
17
  haiway/helpers/throttling.py,sha256=zo0OwFq64si5KUwhd58cFHLmGAmYwRbFRJMbv9suhPs,3844
18
18
  haiway/helpers/timeouted.py,sha256=1xU09hQnFdj6p48BwZl5xUvtIr3zC0ZUXehkdrduCjs,3074
19
- haiway/helpers/tracing.py,sha256=eQpkIoGSB51jRF8RcLaihvHX3VzJIRdyRxTx3I14Pzg,3346
19
+ haiway/helpers/tracing.py,sha256=VDOAhdVELaYs92HxHreEo_ZV8b7e6ZQs10lTNn8xOtQ,3383
20
20
  haiway/state/__init__.py,sha256=emTuwGFn7HyjyTJ_ass69J5jQIA7_WHO4teZz_dR05Y,355
21
- haiway/state/attributes.py,sha256=0gJbgOKiH79RNM9IW66NNWSWM29037yGTTpoln6vPvU,22984
21
+ haiway/state/attributes.py,sha256=plCcYGE5LVU1Nvo0GHkhThqFG96uLR3tFsisQyK1jK0,23122
22
22
  haiway/state/path.py,sha256=4vh-fYQv8_xRWjS0ErMQslKDWRI6-KVECAr8JhYk0UY,17503
23
23
  haiway/state/requirement.py,sha256=3iQqzp5Q7w6y5uClamJGH7S5Hib9pciuTAV27PP5lS8,6161
24
24
  haiway/state/structure.py,sha256=bSIj0S_HG-F1Z5GxSlY6VpGtrtiwG82-AIL_PL1lRLo,12465
@@ -36,7 +36,7 @@ haiway/utils/logs.py,sha256=oDsc1ZdqKDjlTlctLbDcp9iX98Acr-1tdw-Pyg3DElo,1577
36
36
  haiway/utils/mimic.py,sha256=BkVjTVP2TxxC8GChPGyDV6UXVwJmiRiSWeOYZNZFHxs,1828
37
37
  haiway/utils/noop.py,sha256=qgbZlOKWY6_23Zs43OLukK2HagIQKRyR04zrFVm5rWI,344
38
38
  haiway/utils/queue.py,sha256=oQ3GXCJ-PGNtMEr6EPdgqAvYZoj8lAa7Z2drBKBEoBM,2345
39
- haiway-0.10.11.dist-info/METADATA,sha256=Xz9EVwzVcqiYBNaDv0QZQ4gXv3482M9eV9n82ba6kJo,3858
40
- haiway-0.10.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- haiway-0.10.11.dist-info/licenses/LICENSE,sha256=GehQEW_I1pkmxkkj3NEa7rCTQKYBn7vTPabpDYJlRuo,1063
42
- haiway-0.10.11.dist-info/RECORD,,
39
+ haiway-0.10.13.dist-info/METADATA,sha256=QyxvFJSNQ9BQON9joaMqHB8DRsoexEfcAwQXmESkljU,3858
40
+ haiway-0.10.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ haiway-0.10.13.dist-info/licenses/LICENSE,sha256=GehQEW_I1pkmxkkj3NEa7rCTQKYBn7vTPabpDYJlRuo,1063
42
+ haiway-0.10.13.dist-info/RECORD,,