haiway 0.5.1__tar.gz → 0.5.3__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.
Files changed (48) hide show
  1. {haiway-0.5.1/src/haiway.egg-info → haiway-0.5.3}/PKG-INFO +1 -1
  2. {haiway-0.5.1 → haiway-0.5.3}/pyproject.toml +1 -1
  3. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/metrics.py +5 -3
  4. {haiway-0.5.1 → haiway-0.5.3/src/haiway.egg-info}/PKG-INFO +1 -1
  5. {haiway-0.5.1 → haiway-0.5.3}/LICENSE +0 -0
  6. {haiway-0.5.1 → haiway-0.5.3}/README.md +0 -0
  7. {haiway-0.5.1 → haiway-0.5.3}/setup.cfg +0 -0
  8. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/__init__.py +0 -0
  9. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/__init__.py +0 -0
  10. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/access.py +0 -0
  11. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/disposables.py +0 -0
  12. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/state.py +0 -0
  13. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/tasks.py +0 -0
  14. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/context/types.py +0 -0
  15. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/__init__.py +0 -0
  16. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/asynchrony.py +0 -0
  17. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/caching.py +0 -0
  18. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/retries.py +0 -0
  19. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/throttling.py +0 -0
  20. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/timeouted.py +0 -0
  21. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/helpers/tracing.py +0 -0
  22. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/py.typed +0 -0
  23. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/state/__init__.py +0 -0
  24. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/state/attributes.py +0 -0
  25. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/state/structure.py +0 -0
  26. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/state/validation.py +0 -0
  27. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/types/__init__.py +0 -0
  28. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/types/frozen.py +0 -0
  29. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/types/missing.py +0 -0
  30. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/__init__.py +0 -0
  31. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/always.py +0 -0
  32. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/env.py +0 -0
  33. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/immutable.py +0 -0
  34. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/logs.py +0 -0
  35. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/mimic.py +0 -0
  36. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/noop.py +0 -0
  37. {haiway-0.5.1 → haiway-0.5.3}/src/haiway/utils/queue.py +0 -0
  38. {haiway-0.5.1 → haiway-0.5.3}/src/haiway.egg-info/SOURCES.txt +0 -0
  39. {haiway-0.5.1 → haiway-0.5.3}/src/haiway.egg-info/dependency_links.txt +0 -0
  40. {haiway-0.5.1 → haiway-0.5.3}/src/haiway.egg-info/requires.txt +0 -0
  41. {haiway-0.5.1 → haiway-0.5.3}/src/haiway.egg-info/top_level.txt +0 -0
  42. {haiway-0.5.1 → haiway-0.5.3}/tests/test_async_queue.py +0 -0
  43. {haiway-0.5.1 → haiway-0.5.3}/tests/test_auto_retry.py +0 -0
  44. {haiway-0.5.1 → haiway-0.5.3}/tests/test_cache.py +0 -0
  45. {haiway-0.5.1 → haiway-0.5.3}/tests/test_context.py +0 -0
  46. {haiway-0.5.1 → haiway-0.5.3}/tests/test_state.py +0 -0
  47. {haiway-0.5.1 → haiway-0.5.3}/tests/test_streaming.py +0 -0
  48. {haiway-0.5.1 → haiway-0.5.3}/tests/test_timeout.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: haiway
3
- Version: 0.5.1
3
+ Version: 0.5.3
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
@@ -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.5.1"
8
+ version = "0.5.3"
9
9
  readme = "README.md"
10
10
  maintainers = [
11
11
  { name = "Kacper Kaliński", email = "kacper.kalinski@miquido.com" },
@@ -21,8 +21,8 @@ from haiway.types import MISSING, Missing, not_missing
21
21
  from haiway.utils import freeze
22
22
 
23
23
  __all__ = [
24
- "ScopeMetrics",
25
24
  "MetricsContext",
25
+ "ScopeMetrics",
26
26
  ]
27
27
 
28
28
 
@@ -48,14 +48,14 @@ class ScopeMetrics:
48
48
  self._logger: Logger = logger or getLogger(name=scope)
49
49
  self._parent: Self | None = parent if parent else None
50
50
  self._metrics: dict[type[State], State] = {}
51
- self._nested: set[ScopeMetrics] = set()
51
+ self._nested: list[ScopeMetrics] = []
52
52
  self._timestamp: float = monotonic()
53
53
  self._finished: bool = False
54
54
  self._loop: AbstractEventLoop = get_event_loop()
55
55
  self._completed: Future[float] = self._loop.create_future()
56
56
 
57
57
  if parent := parent:
58
- parent._nested.add(self)
58
+ parent._nested.append(self)
59
59
 
60
60
  freeze(self)
61
61
 
@@ -378,6 +378,7 @@ class MetricsContext:
378
378
  self._token is None and not self._metrics._finished # pyright: ignore[reportPrivateUsage]
379
379
  ), "MetricsContext reentrance is not allowed"
380
380
  self._token = MetricsContext._context.set(self._metrics)
381
+ self._metrics.log(INFO, "Started...")
381
382
 
382
383
  def __exit__(
383
384
  self,
@@ -391,3 +392,4 @@ class MetricsContext:
391
392
  MetricsContext._context.reset(self._token)
392
393
  self._metrics._finish() # pyright: ignore[reportPrivateUsage]
393
394
  self._token = None
395
+ self._metrics.log(INFO, f"...finished after {self._metrics.time:.2f}s")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: haiway
3
- Version: 0.5.1
3
+ Version: 0.5.3
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
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