haiway 0.6.0__tar.gz → 0.6.2__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.
- {haiway-0.6.0/src/haiway.egg-info → haiway-0.6.2}/PKG-INFO +1 -1
- {haiway-0.6.0 → haiway-0.6.2}/pyproject.toml +1 -1
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/state/validation.py +14 -0
- {haiway-0.6.0 → haiway-0.6.2/src/haiway.egg-info}/PKG-INFO +1 -1
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_state.py +8 -0
- {haiway-0.6.0 → haiway-0.6.2}/LICENSE +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/README.md +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/setup.cfg +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/access.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/disposables.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/metrics.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/state.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/tasks.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/context/types.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/asynchrony.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/caching.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/retries.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/throttling.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/timeouted.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/helpers/tracing.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/py.typed +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/state/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/state/attributes.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/state/structure.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/types/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/types/frozen.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/types/missing.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/__init__.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/always.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/env.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/immutable.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/logs.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/mimic.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/noop.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway/utils/queue.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway.egg-info/SOURCES.txt +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway.egg-info/dependency_links.txt +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway.egg-info/requires.txt +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/src/haiway.egg-info/top_level.txt +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_async_queue.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_auto_retry.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_cache.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_context.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_streaming.py +0 -0
- {haiway-0.6.0 → haiway-0.6.2}/tests/test_timeout.py +0 -0
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
[project]
|
6
6
|
name = "haiway"
|
7
7
|
description = "Framework for dependency injection and state management within structured concurrency model."
|
8
|
-
version = "0.6.
|
8
|
+
version = "0.6.2"
|
9
9
|
readme = "README.md"
|
10
10
|
maintainers = [
|
11
11
|
{ name = "Kacper Kaliński", email = "kacper.kalinski@miquido.com" },
|
@@ -1,7 +1,11 @@
|
|
1
1
|
from collections.abc import Callable, Mapping, Sequence, Set
|
2
|
+
from datetime import date, datetime, time, timedelta, timezone
|
2
3
|
from enum import Enum
|
4
|
+
from pathlib import Path
|
5
|
+
from re import Pattern
|
3
6
|
from types import MappingProxyType, NoneType, UnionType
|
4
7
|
from typing import Any, Literal, Protocol, Union
|
8
|
+
from uuid import UUID
|
5
9
|
|
6
10
|
from haiway.state.attributes import AttributeAnnotation
|
7
11
|
from haiway.types import MISSING, Missing
|
@@ -281,6 +285,7 @@ VALIDATORS: Mapping[Any, Callable[[AttributeAnnotation], Callable[[Any], Any]]]
|
|
281
285
|
bool: _prepare_validator_of_type,
|
282
286
|
int: _prepare_validator_of_type,
|
283
287
|
float: _prepare_validator_of_type,
|
288
|
+
complex: _prepare_validator_of_type,
|
284
289
|
bytes: _prepare_validator_of_type,
|
285
290
|
str: _prepare_validator_of_type,
|
286
291
|
tuple: _prepare_validator_of_tuple,
|
@@ -289,6 +294,15 @@ VALIDATORS: Mapping[Any, Callable[[AttributeAnnotation], Callable[[Any], Any]]]
|
|
289
294
|
Set: _prepare_validator_of_set,
|
290
295
|
Sequence: _prepare_validator_of_sequence,
|
291
296
|
Mapping: _prepare_validator_of_mapping,
|
297
|
+
range: _prepare_validator_of_type,
|
298
|
+
UUID: _prepare_validator_of_type,
|
299
|
+
date: _prepare_validator_of_type,
|
300
|
+
datetime: _prepare_validator_of_type,
|
301
|
+
time: _prepare_validator_of_type,
|
302
|
+
timedelta: _prepare_validator_of_type,
|
303
|
+
timezone: _prepare_validator_of_type,
|
304
|
+
Path: _prepare_validator_of_type,
|
305
|
+
Pattern: _prepare_validator_of_type,
|
292
306
|
Union: _prepare_validator_of_union,
|
293
307
|
UnionType: _prepare_validator_of_union,
|
294
308
|
Callable: _prepare_validator_of_callable,
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from collections.abc import Callable, Sequence, Set
|
2
|
+
from datetime import date, datetime
|
2
3
|
from enum import StrEnum
|
3
4
|
from typing import Literal, Protocol, Self, runtime_checkable
|
5
|
+
from uuid import UUID, uuid4
|
4
6
|
|
5
7
|
from haiway import MISSING, Missing, State, frozenlist
|
6
8
|
|
@@ -15,6 +17,9 @@ def test_basic_initializes_with_arguments() -> None:
|
|
15
17
|
def __call__(self) -> None: ...
|
16
18
|
|
17
19
|
class Basics(State):
|
20
|
+
uuid: UUID
|
21
|
+
date: date
|
22
|
+
datetime: datetime
|
18
23
|
string: str
|
19
24
|
literal: Literal["A", "B"]
|
20
25
|
sequence: Sequence[str]
|
@@ -29,6 +34,9 @@ def test_basic_initializes_with_arguments() -> None:
|
|
29
34
|
selection: Selection
|
30
35
|
|
31
36
|
basic = Basics(
|
37
|
+
uuid=uuid4(),
|
38
|
+
date=date.today(),
|
39
|
+
datetime=datetime.now(),
|
32
40
|
string="string",
|
33
41
|
literal="A",
|
34
42
|
sequence=["a", "b", "c"],
|
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
|
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
|
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
|
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
|