haiway 0.15.2__py3-none-any.whl → 0.16.0__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/context/access.py CHANGED
@@ -20,7 +20,7 @@ from haiway.context.disposables import Disposable, Disposables
20
20
  from haiway.context.identifier import ScopeIdentifier
21
21
  from haiway.context.logging import LoggerContext
22
22
  from haiway.context.metrics import MetricsContext, MetricsHandler
23
- from haiway.context.state import StateContext
23
+ from haiway.context.state import ScopeState, StateContext
24
24
  from haiway.context.tasks import TaskGroupContext
25
25
  from haiway.state import State
26
26
  from haiway.utils import mimic_function
@@ -70,9 +70,7 @@ class ScopeContext:
70
70
  object.__setattr__(
71
71
  self,
72
72
  "_task_group_context",
73
- TaskGroupContext(
74
- task_group=task_group,
75
- )
73
+ TaskGroupContext(task_group=task_group)
76
74
  if task_group is not None or self._identifier.is_root
77
75
  else None,
78
76
  )
@@ -175,8 +173,11 @@ class ScopeContext:
175
173
  self,
176
174
  "_state_context",
177
175
  StateContext(
178
- state=self._state_context._state.updated(
179
- await disposables.__aenter__(),
176
+ state=ScopeState(
177
+ (
178
+ *await disposables.__aenter__(),
179
+ *self._state_context._state._state.values(),
180
+ )
180
181
  ),
181
182
  ),
182
183
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haiway
3
- Version: 0.15.2
3
+ Version: 0.16.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,7 +1,7 @@
1
1
  haiway/__init__.py,sha256=XahuBwbI7ZFBBkcbs5882Go7QrzLtEq9XylQzuR1AJY,2125
2
2
  haiway/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  haiway/context/__init__.py,sha256=feqd0eJnGQwh4B8BZXpS0fQRE-DqoFCFOHipF1jOY8A,762
4
- haiway/context/access.py,sha256=yW6GNZtSWaxtBRTViP3BiJJYEsLbKkS6Zyzrp1uKgvo,19122
4
+ haiway/context/access.py,sha256=yfQ65h37FF11-ZbhnjvYTTLnj9dhQx630mzpqcYt_Co,19209
5
5
  haiway/context/disposables.py,sha256=vcsh8jRaJ8Q1ob7oh5LsrSPw9f5AMTcaD_p_Gb7tXAI,2588
6
6
  haiway/context/identifier.py,sha256=lz-FuspOtsaEsfb7QPrEVWYfbcMJgd3A6BGG3kLbaV0,3914
7
7
  haiway/context/logging.py,sha256=F3dr6MLjodg3MX5WTInxn3r3JuihG-giBzumI0GGUQw,5590
@@ -37,7 +37,7 @@ haiway/utils/mimic.py,sha256=BkVjTVP2TxxC8GChPGyDV6UXVwJmiRiSWeOYZNZFHxs,1828
37
37
  haiway/utils/noop.py,sha256=qgbZlOKWY6_23Zs43OLukK2HagIQKRyR04zrFVm5rWI,344
38
38
  haiway/utils/queue.py,sha256=mF0wayKg6MegfBkgxghPDVCbX2rka6sX7KCzQCGl10s,4120
39
39
  haiway/utils/stream.py,sha256=Vqyi0EwcupkVyKQ7eple6z9DkcbSHkE-6yMw85mak9Q,2832
40
- haiway-0.15.2.dist-info/METADATA,sha256=7a2-GisdHxpclkxPfGlwN_ih9P4z0laUGNCz4HzlR4U,4299
41
- haiway-0.15.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
- haiway-0.15.2.dist-info/licenses/LICENSE,sha256=3phcpHVNBP8jsi77gOO0E7rgKeDeu99Pi7DSnK9YHoQ,1069
43
- haiway-0.15.2.dist-info/RECORD,,
40
+ haiway-0.16.0.dist-info/METADATA,sha256=n68Bb5H8FH_CE1uOvZ4u-eYfiuCCrHBOIFXRnPtmmtw,4299
41
+ haiway-0.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
42
+ haiway-0.16.0.dist-info/licenses/LICENSE,sha256=3phcpHVNBP8jsi77gOO0E7rgKeDeu99Pi7DSnK9YHoQ,1069
43
+ haiway-0.16.0.dist-info/RECORD,,