haiway 0.8.3__tar.gz → 0.8.4__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.8.3/src/haiway.egg-info → haiway-0.8.4}/PKG-INFO +3 -3
- {haiway-0.8.3 → haiway-0.8.4}/pyproject.toml +4 -4
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/structure.py +2 -12
- {haiway-0.8.3 → haiway-0.8.4/src/haiway.egg-info}/PKG-INFO +3 -3
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway.egg-info/requires.txt +2 -2
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_state.py +14 -0
- {haiway-0.8.3 → haiway-0.8.4}/LICENSE +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/README.md +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/setup.cfg +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/access.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/disposables.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/identifier.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/logging.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/metrics.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/state.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/tasks.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/context/types.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/asynchrony.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/caching.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/metrics.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/retries.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/throttling.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/timeouted.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/helpers/tracing.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/py.typed +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/attributes.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/path.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/requirement.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/state/validation.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/types/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/types/frozen.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/types/missing.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/__init__.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/always.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/env.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/immutable.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/logs.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/mappings.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/mimic.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/noop.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/queue.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway/utils/sequences.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway.egg-info/SOURCES.txt +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway.egg-info/dependency_links.txt +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/src/haiway.egg-info/top_level.txt +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_async_queue.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_attribute_path.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_auto_retry.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_cache.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_context.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_streaming.py +0 -0
- {haiway-0.8.3 → haiway-0.8.4}/tests/test_timeout.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: haiway
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.4
|
4
4
|
Summary: Framework for dependency injection and state management within structured concurrency model.
|
5
5
|
Maintainer-email: Kacper Kaliński <kacper.kalinski@miquido.com>
|
6
6
|
License: MIT License
|
@@ -37,12 +37,12 @@ Description-Content-Type: text/markdown
|
|
37
37
|
License-File: LICENSE
|
38
38
|
Provides-Extra: dev
|
39
39
|
Requires-Dist: haiway; extra == "dev"
|
40
|
-
Requires-Dist: ruff~=0.
|
40
|
+
Requires-Dist: ruff~=0.9; extra == "dev"
|
41
41
|
Requires-Dist: pyright~=1.1; extra == "dev"
|
42
42
|
Requires-Dist: bandit~=1.7; extra == "dev"
|
43
43
|
Requires-Dist: pytest~=7.4; extra == "dev"
|
44
44
|
Requires-Dist: pytest-cov~=4.1; extra == "dev"
|
45
|
-
Requires-Dist: pytest-asyncio~=0.23
|
45
|
+
Requires-Dist: pytest-asyncio~=0.23; extra == "dev"
|
46
46
|
|
47
47
|
# 🚗 haiway 🚕 🚚 🚙
|
48
48
|
|
@@ -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.8.
|
8
|
+
version = "0.8.4"
|
9
9
|
readme = "README.md"
|
10
10
|
maintainers = [
|
11
11
|
{ name = "Kacper Kaliński", email = "kacper.kalinski@miquido.com" },
|
@@ -29,12 +29,12 @@ Repository = "https://github.com/miquido/haiway.git"
|
|
29
29
|
[project.optional-dependencies]
|
30
30
|
dev = [
|
31
31
|
"haiway",
|
32
|
-
"ruff~=0.
|
32
|
+
"ruff~=0.9",
|
33
33
|
"pyright~=1.1",
|
34
34
|
"bandit~=1.7",
|
35
35
|
"pytest~=7.4",
|
36
36
|
"pytest-cov~=4.1",
|
37
|
-
"pytest-asyncio~=0.23
|
37
|
+
"pytest-asyncio~=0.23",
|
38
38
|
]
|
39
39
|
|
40
40
|
[tool.ruff]
|
@@ -42,7 +42,7 @@ target-version = "py312"
|
|
42
42
|
line-length = 100
|
43
43
|
extend-exclude = [".venv", ".git", ".cache"]
|
44
44
|
lint.select = ["E", "F", "A", "I", "B", "PL", "W", "C", "RUF", "UP"]
|
45
|
-
lint.ignore = []
|
45
|
+
lint.ignore = ["A005"]
|
46
46
|
|
47
47
|
[tool.ruff.lint.per-file-ignores]
|
48
48
|
"__init__.py" = ["F401", "E402"]
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import typing
|
2
2
|
from collections.abc import Mapping
|
3
|
-
from copy import deepcopy
|
4
3
|
from types import EllipsisType, GenericAlias
|
5
4
|
from typing import (
|
6
5
|
Any,
|
@@ -362,22 +361,13 @@ class State(metaclass=StateMeta):
|
|
362
361
|
)
|
363
362
|
|
364
363
|
def __copy__(self) -> Self:
|
365
|
-
return self
|
364
|
+
return self # State is immutable, no need to provide an actual copy
|
366
365
|
|
367
366
|
def __deepcopy__(
|
368
367
|
self,
|
369
368
|
memo: dict[int, Any] | None,
|
370
369
|
) -> Self:
|
371
|
-
|
372
|
-
**{
|
373
|
-
key: deepcopy(
|
374
|
-
value,
|
375
|
-
memo,
|
376
|
-
)
|
377
|
-
for key, value in vars(self).items()
|
378
|
-
}
|
379
|
-
)
|
380
|
-
return copy
|
370
|
+
return self # State is immutable, no need to provide an actual copy
|
381
371
|
|
382
372
|
def __replace__(
|
383
373
|
self,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: haiway
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.4
|
4
4
|
Summary: Framework for dependency injection and state management within structured concurrency model.
|
5
5
|
Maintainer-email: Kacper Kaliński <kacper.kalinski@miquido.com>
|
6
6
|
License: MIT License
|
@@ -37,12 +37,12 @@ Description-Content-Type: text/markdown
|
|
37
37
|
License-File: LICENSE
|
38
38
|
Provides-Extra: dev
|
39
39
|
Requires-Dist: haiway; extra == "dev"
|
40
|
-
Requires-Dist: ruff~=0.
|
40
|
+
Requires-Dist: ruff~=0.9; extra == "dev"
|
41
41
|
Requires-Dist: pyright~=1.1; extra == "dev"
|
42
42
|
Requires-Dist: bandit~=1.7; extra == "dev"
|
43
43
|
Requires-Dist: pytest~=7.4; extra == "dev"
|
44
44
|
Requires-Dist: pytest-cov~=4.1; extra == "dev"
|
45
|
-
Requires-Dist: pytest-asyncio~=0.23
|
45
|
+
Requires-Dist: pytest-asyncio~=0.23; extra == "dev"
|
46
46
|
|
47
47
|
# 🚗 haiway 🚕 🚚 🚙
|
48
48
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from collections.abc import Callable, Sequence, Set
|
2
|
+
from copy import copy, deepcopy
|
2
3
|
from datetime import date, datetime
|
3
4
|
from enum import StrEnum
|
4
5
|
from typing import Any, Literal, NotRequired, Protocol, Required, Self, TypedDict, runtime_checkable
|
@@ -222,3 +223,16 @@ def test_generic_subtypes_validation() -> None:
|
|
222
223
|
|
223
224
|
# not raises
|
224
225
|
_ = Container(generic=Generic(nested=NestedGeneric(value="ok")))
|
226
|
+
|
227
|
+
|
228
|
+
def test_copying_leaves_same_object() -> None:
|
229
|
+
class Nested(State):
|
230
|
+
string: str
|
231
|
+
|
232
|
+
class Copied(State):
|
233
|
+
string: str
|
234
|
+
nested: Nested
|
235
|
+
|
236
|
+
origin = Copied(string="42", nested=Nested(string="answer"))
|
237
|
+
assert copy(origin) is origin
|
238
|
+
assert deepcopy(origin) is origin
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|