haiway 0.21.1__py3-none-any.whl → 0.21.2__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
@@ -302,7 +302,7 @@ class ctx:
302
302
  def scope(
303
303
  label: str,
304
304
  /,
305
- *state: State,
305
+ *state: State | None,
306
306
  disposables: Disposables | Iterable[Disposable] | None = None,
307
307
  task_group: TaskGroup | None = None,
308
308
  observability: Observability | Logger | None = None,
@@ -316,7 +316,7 @@ class ctx:
316
316
  label: str
317
317
  name of the scope context
318
318
 
319
- *state: State | Disposable
319
+ *state: State | None
320
320
  state propagated within the scope context, will be merged with current state by\
321
321
  replacing current with provided on conflict.
322
322
 
@@ -355,14 +355,14 @@ class ctx:
355
355
  return ScopeContext(
356
356
  label=label,
357
357
  task_group=task_group,
358
- state=state,
358
+ state=tuple(element for element in state if element is not None),
359
359
  disposables=resolved_disposables,
360
360
  observability=observability,
361
361
  )
362
362
 
363
363
  @staticmethod
364
364
  def updated(
365
- *state: State,
365
+ *state: State | None,
366
366
  ) -> StateContext:
367
367
  """
368
368
  Update scope context with given state. When called within an existing context\
@@ -370,7 +370,7 @@ class ctx:
370
370
 
371
371
  Parameters
372
372
  ----------
373
- *state: State
373
+ *state: State | None
374
374
  state propagated within the updated scope context, will be merged with current if any\
375
375
  by replacing current with provided on conflict
376
376
 
@@ -380,7 +380,7 @@ class ctx:
380
380
  state part of context object intended to enter context manager with it
381
381
  """
382
382
 
383
- return StateContext.updated(state)
383
+ return StateContext.updated(element for element in state if element is not None)
384
384
 
385
385
  @staticmethod
386
386
  def spawn[Result, **Arguments](
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haiway
3
- Version: 0.21.1
3
+ Version: 0.21.2
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=keuz9FN8VqLamqrzvjK2IAjkdyyFcnboDrB9xkFPgXk,1861
2
2
  haiway/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  haiway/context/__init__.py,sha256=1N_SvdPkTfIZDZybm3y0rY2dGrDLWTm0ryzUz2XD4f8,1174
4
- haiway/context/access.py,sha256=lDvkMoqUOwzBt-P8mI-VggS2wrP_BJLmYrArdj8z4SE,21644
4
+ haiway/context/access.py,sha256=60guObLq5lYjBxSnT9iaEZI5x35Xen_doxY4oCrbn9Q,21758
5
5
  haiway/context/disposables.py,sha256=0vf6kOZ80o6oa8IuU4xQttqtzMT4ODh33XuDh4SGOnc,4742
6
6
  haiway/context/identifier.py,sha256=dCCwLneXJzH__ZWFlGRUHvoCmbT4lM0QVbyokYIbUHg,5255
7
7
  haiway/context/observability.py,sha256=gLKbMPNvt5ozrfyc4TGahN8A_dFFtyCjUIMZu9_wZHA,23722
@@ -39,7 +39,7 @@ haiway/utils/mimic.py,sha256=xaZiUKp096QFfdSw7cNIKEWt2UIS7vf880KF54gny38,1831
39
39
  haiway/utils/noop.py,sha256=U8ocfoCgt-pY0owJDPtrRrj53cabeIXH9qCKWMQnoRk,1336
40
40
  haiway/utils/queue.py,sha256=6v2u3pA6A44IuCCTOjmCt3yLyOcm7PCRnrIGo25j-1o,6402
41
41
  haiway/utils/stream.py,sha256=lXaeveTY0-AYG5xVzcQYaiC6SUD5fUtHoMXiQcrQAAM,5723
42
- haiway-0.21.1.dist-info/METADATA,sha256=LdHoQk1LAFTONT6SFzeZ07x9hKvRqNZP4a7hGdhWdiE,4919
43
- haiway-0.21.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- haiway-0.21.1.dist-info/licenses/LICENSE,sha256=3phcpHVNBP8jsi77gOO0E7rgKeDeu99Pi7DSnK9YHoQ,1069
45
- haiway-0.21.1.dist-info/RECORD,,
42
+ haiway-0.21.2.dist-info/METADATA,sha256=9mHlQYan6RnsCcixkZBb8lt2v4SSNTV3q6_8u_X5uFE,4919
43
+ haiway-0.21.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ haiway-0.21.2.dist-info/licenses/LICENSE,sha256=3phcpHVNBP8jsi77gOO0E7rgKeDeu99Pi7DSnK9YHoQ,1069
45
+ haiway-0.21.2.dist-info/RECORD,,