haiway 0.21.0__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 +6 -6
- haiway/helpers/asynchrony.py +3 -3
- haiway/utils/mimic.py +2 -2
- {haiway-0.21.0.dist-info → haiway-0.21.2.dist-info}/METADATA +1 -1
- {haiway-0.21.0.dist-info → haiway-0.21.2.dist-info}/RECORD +7 -7
- {haiway-0.21.0.dist-info → haiway-0.21.2.dist-info}/WHEEL +0 -0
- {haiway-0.21.0.dist-info → haiway-0.21.2.dist-info}/licenses/LICENSE +0 -0
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 |
|
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](
|
haiway/helpers/asynchrony.py
CHANGED
@@ -137,7 +137,7 @@ def _mimic_async[**Args, Result](
|
|
137
137
|
function,
|
138
138
|
"__annotations__",
|
139
139
|
)
|
140
|
-
|
140
|
+
object.__setattr__(
|
141
141
|
within,
|
142
142
|
"__annotations__",
|
143
143
|
{
|
@@ -160,7 +160,7 @@ def _mimic_async[**Args, Result](
|
|
160
160
|
"__globals__",
|
161
161
|
):
|
162
162
|
try:
|
163
|
-
|
163
|
+
object.__setattr__(
|
164
164
|
within,
|
165
165
|
attribute,
|
166
166
|
getattr(
|
@@ -177,7 +177,7 @@ def _mimic_async[**Args, Result](
|
|
177
177
|
except AttributeError:
|
178
178
|
pass
|
179
179
|
|
180
|
-
|
180
|
+
object.__setattr__( # mimic functools.wraps behavior for correct signature checks
|
181
181
|
within,
|
182
182
|
"__wrapped__",
|
183
183
|
function,
|
haiway/utils/mimic.py
CHANGED
@@ -40,7 +40,7 @@ def mimic_function[**Args, Result](
|
|
40
40
|
"__globals__",
|
41
41
|
):
|
42
42
|
try:
|
43
|
-
|
43
|
+
object.__setattr__(
|
44
44
|
target,
|
45
45
|
attribute,
|
46
46
|
getattr(
|
@@ -57,7 +57,7 @@ def mimic_function[**Args, Result](
|
|
57
57
|
except AttributeError:
|
58
58
|
pass
|
59
59
|
|
60
|
-
|
60
|
+
object.__setattr__( # mimic functools.wraps behavior for correct signature checks
|
61
61
|
target,
|
62
62
|
"__wrapped__",
|
63
63
|
function,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: haiway
|
3
|
-
Version: 0.21.
|
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=
|
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
|
@@ -9,7 +9,7 @@ haiway/context/state.py,sha256=tRJRvd07XObhdayz-1OcNxABqcHQRD_k_yUGsn72wDU,9541
|
|
9
9
|
haiway/context/tasks.py,sha256=pScFgeiyrXSJRDFZiYbBLi3k_DHkSlhB8rgAnYtgyrU,4925
|
10
10
|
haiway/context/types.py,sha256=VDWXJySihfvSSPzY09PaGk6j5S9HgmAUboBGCZ8o_4k,766
|
11
11
|
haiway/helpers/__init__.py,sha256=WzQFUHAX0NtpbdKycHywTyxfMGmid91y0vfmdIHX-NE,640
|
12
|
-
haiway/helpers/asynchrony.py,sha256=
|
12
|
+
haiway/helpers/asynchrony.py,sha256=kcGBTF7Dc2a0THH8usIq2OenspXx3KvuNrL8j7xyh80,5382
|
13
13
|
haiway/helpers/caching.py,sha256=BqgcUGQSAmXsuLi5V8EwlZzuGyutHOn1V4k7BHsGKeg,14347
|
14
14
|
haiway/helpers/concurrent.py,sha256=xGMcan_tiETAHQs1YFmgYpA4YMFo6rIbFKvNeMlRFG8,2551
|
15
15
|
haiway/helpers/observability.py,sha256=3G0eRE1WYTGRujS0mxzYbLR4MlKnoYllE8cu2Eb_23w,11073
|
@@ -35,11 +35,11 @@ haiway/utils/env.py,sha256=Z0uHJDFegvgzy-gM-f0uPMha9_1ldUglrD5SKNJsvYE,9445
|
|
35
35
|
haiway/utils/formatting.py,sha256=jgSIGalGUBZVo2ziiNC5Y7vBYbAEwPugOiwEOrNFTcI,4039
|
36
36
|
haiway/utils/freezing.py,sha256=HJH0SOgPCreb9o0wPeaMPMxhS9JDuzzey6UsKhuvUJU,1292
|
37
37
|
haiway/utils/logs.py,sha256=NuwoqKQnMNi1FMIA91cVFnAPefUFeg3UIT50IOl3sJk,1571
|
38
|
-
haiway/utils/mimic.py,sha256=
|
38
|
+
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.
|
43
|
-
haiway-0.21.
|
44
|
-
haiway-0.21.
|
45
|
-
haiway-0.21.
|
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,,
|
File without changes
|
File without changes
|