asyncz 0.14.2__tar.gz → 0.14.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 (111) hide show
  1. {asyncz-0.14.2 → asyncz-0.14.3}/PKG-INFO +2 -2
  2. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/__init__.py +1 -1
  3. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/conf/global_settings.py +32 -0
  4. {asyncz-0.14.2 → asyncz-0.14.3}/pyproject.toml +1 -1
  5. {asyncz-0.14.2 → asyncz-0.14.3}/.gitignore +0 -0
  6. {asyncz-0.14.2 → asyncz-0.14.3}/LICENSE +0 -0
  7. {asyncz-0.14.2 → asyncz-0.14.3}/README.md +0 -0
  8. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/__init__.py +0 -0
  9. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/_parsers.py +0 -0
  10. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/app.py +0 -0
  11. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/bootstrap_loader.py +0 -0
  12. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/__init__.py +0 -0
  13. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/add.py +0 -0
  14. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/list.py +0 -0
  15. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/pause.py +0 -0
  16. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/remove.py +0 -0
  17. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/resume.py +0 -0
  18. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/run.py +0 -0
  19. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/commands/start.py +0 -0
  20. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/loader.py +0 -0
  21. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/types.py +0 -0
  22. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/cli/utils.py +0 -0
  23. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/conf/__init__.py +0 -0
  24. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/__init__.py +0 -0
  25. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/__init__.py +0 -0
  26. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/__init__.py +0 -0
  27. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/backends.py +0 -0
  28. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/core.py +0 -0
  29. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/middleware/__init__.py +0 -0
  30. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/middleware/auth_gate.py +0 -0
  31. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/middleware/forward_root_path.py +0 -0
  32. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/admin/protocols.py +0 -0
  33. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/application.py +0 -0
  34. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/config.py +0 -0
  35. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/controllers/__init__.py +0 -0
  36. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/controllers/_helpers.py +0 -0
  37. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/controllers/home.py +0 -0
  38. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/controllers/logs.py +0 -0
  39. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/controllers/tasks.py +0 -0
  40. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/engine.py +0 -0
  41. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/logs/__init__.py +0 -0
  42. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/logs/handler.py +0 -0
  43. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/logs/storage.py +0 -0
  44. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/messages.py +0 -0
  45. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/mixins.py +0 -0
  46. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/statics/css/asyncz.css +0 -0
  47. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/statics/css/toastify.min.css +0 -0
  48. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/statics/js/asyncz.js +0 -0
  49. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/statics/js/toastify.min.js +0 -0
  50. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/404.html +0 -0
  51. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/index.html +0 -0
  52. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/layout.html +0 -0
  53. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/login.html +0 -0
  54. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/logs/index.html +0 -0
  55. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/logs/partials/table.html +0 -0
  56. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/shared/loading.html +0 -0
  57. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/shared/messages.html +0 -0
  58. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/tasks/_table.html +0 -0
  59. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/contrib/dashboard/templates/tasks/tasks.html +0 -0
  60. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/datastructures.py +0 -0
  61. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/enums.py +0 -0
  62. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/events/__init__.py +0 -0
  63. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/events/base.py +0 -0
  64. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/events/constants.py +0 -0
  65. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/exceptions.py +0 -0
  66. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/__init__.py +0 -0
  67. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/asyncio.py +0 -0
  68. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/base.py +0 -0
  69. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/debug.py +0 -0
  70. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/pool.py +0 -0
  71. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/process_pool.py +0 -0
  72. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/executors/types.py +0 -0
  73. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/file_locking.py +0 -0
  74. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/locks.py +0 -0
  75. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/monkay.py +0 -0
  76. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/protocols.py +0 -0
  77. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/py.typed +0 -0
  78. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/__init__.py +0 -0
  79. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/asyncio.py +0 -0
  80. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/base.py +0 -0
  81. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/datastructures.py +0 -0
  82. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/defaults.py +0 -0
  83. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/types.py +0 -0
  84. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/schedulers/utils.py +0 -0
  85. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/state.py +0 -0
  86. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/__init__.py +0 -0
  87. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/base.py +0 -0
  88. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/file.py +0 -0
  89. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/memory.py +0 -0
  90. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/mongo.py +0 -0
  91. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/redis.py +0 -0
  92. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/sqlalchemy.py +0 -0
  93. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/stores/types.py +0 -0
  94. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/tasks/__init__.py +0 -0
  95. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/tasks/base.py +0 -0
  96. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/tasks/types.py +0 -0
  97. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/__init__.py +0 -0
  98. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/base.py +0 -0
  99. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/combination.py +0 -0
  100. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/__init__.py +0 -0
  101. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/constants.py +0 -0
  102. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/expressions.py +0 -0
  103. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/fields.py +0 -0
  104. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/trigger.py +0 -0
  105. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/cron/types.py +0 -0
  106. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/date.py +0 -0
  107. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/interval.py +0 -0
  108. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/shutdown.py +0 -0
  109. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/triggers/types.py +0 -0
  110. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/typing.py +0 -0
  111. {asyncz-0.14.2 → asyncz-0.14.3}/asyncz/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asyncz
3
- Version: 0.14.2
3
+ Version: 0.14.3
4
4
  Summary: The scheduler that nobody wants but every application needs.
5
5
  Project-URL: Homepage, https://github.com/dymmond/asyncz
6
6
  Project-URL: Documentation, https://asyncz.dymmond.com/
@@ -68,7 +68,7 @@ Requires-Dist: pymongo<5.0.0,>=4.3.3; extra == 'testing'
68
68
  Requires-Dist: pytest-asyncio<2.0.0,>=1.0; extra == 'testing'
69
69
  Requires-Dist: pytest-cov<8.0.0,>=2.12.0; extra == 'testing'
70
70
  Requires-Dist: pytest-loguru<1,>=0.2.0; extra == 'testing'
71
- Requires-Dist: pytest<9.0.0,>=7.1.3; extra == 'testing'
71
+ Requires-Dist: pytest<10.0.0,>=7.1.3; extra == 'testing'
72
72
  Requires-Dist: pytz>=2022.6; extra == 'testing'
73
73
  Requires-Dist: ravyn>=0.1.0; extra == 'testing'
74
74
  Requires-Dist: redis<8.0.0,>=4.4.0; extra == 'testing'
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
2
2
 
3
3
  from .monkay import create_monkay
4
4
 
5
- __version__ = "0.14.2"
5
+ __version__ = "0.14.3"
6
6
 
7
7
  if TYPE_CHECKING:
8
8
  from .conf import settings
@@ -1,7 +1,9 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import builtins
3
4
  import inspect
4
5
  import os
6
+ import sys
5
7
  from functools import cached_property
6
8
  from types import UnionType
7
9
  from typing import (
@@ -82,11 +84,41 @@ class BaseSettings:
82
84
  ...
83
85
 
84
86
  def _extract_base_type(self, typ: Any) -> Any:
87
+ # 1. Handle standard typing (when get_type_hints works)
85
88
  origin = get_origin(typ)
86
89
  if origin is Annotated:
87
90
  return get_args(typ)[0]
91
+
92
+ # 2. Handle String Annotations (when get_type_hints fails)
93
+ if isinstance(typ, str):
94
+ # Attempt to resolve the string to an actual class
95
+ resolved = self._resolve_string_type(typ)
96
+ if resolved:
97
+ return resolved
98
+
88
99
  return typ
89
100
 
101
+ def _resolve_string_type(self, type_name: str) -> Any:
102
+ """
103
+ Attempts to resolve a string type hint (e.g., 'CacheBackend', 'list[str]')
104
+ into an actual Python class.
105
+ """
106
+ # Clean up generics: "list[str]" -> "list"
107
+ # We only need the base type for casting/init purposes
108
+ base_name = type_name.split("[", 1)[0]
109
+
110
+ # Look in the Class's Module (for custom classes like CacheBackend)
111
+ module = sys.modules.get(self.__class__.__module__)
112
+ if module and hasattr(module, base_name):
113
+ return getattr(module, base_name)
114
+
115
+ # Look in Builtins (for str, int, bool, list, dict)
116
+ if hasattr(builtins, base_name):
117
+ return getattr(builtins, base_name)
118
+
119
+ # Return None if we can't find it (will trigger the original error downstream)
120
+ return None
121
+
90
122
  def _cast(self, value: str, typ: type[Any]) -> Any:
91
123
  """
92
124
  Casts the value to the specified type.
@@ -75,7 +75,7 @@ loguru=["loguru>=0.7.0,<0.8.0"]
75
75
  testing = [
76
76
  "asyncz[localtime,loguru]",
77
77
  "pymongo>=4.3.3,<5.0.0",
78
- "pytest>=7.1.3,<9.0.0",
78
+ "pytest>=7.1.3,<10.0.0",
79
79
  "pytest-cov >=2.12.0,<8.0.0",
80
80
  "pytest-asyncio >=1.0,<2.0.0",
81
81
  "pytest-loguru>=0.2.0,<1",
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