dbos 0.25.0a8__py3-none-any.whl → 0.25.0a9__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.
dbos/_core.py CHANGED
@@ -81,7 +81,6 @@ from ._sys_db import (
81
81
  if TYPE_CHECKING:
82
82
  from ._dbos import (
83
83
  DBOS,
84
- Workflow,
85
84
  WorkflowHandle,
86
85
  WorkflowHandleAsync,
87
86
  DBOSRegistry,
@@ -304,7 +303,7 @@ def _get_wf_invoke_func(
304
303
  def _execute_workflow_wthread(
305
304
  dbos: "DBOS",
306
305
  status: WorkflowStatusInternal,
307
- func: "Workflow[P, R]",
306
+ func: "Callable[P, R]",
308
307
  ctx: DBOSContext,
309
308
  *args: Any,
310
309
  **kwargs: Any,
@@ -335,7 +334,7 @@ def _execute_workflow_wthread(
335
334
  async def _execute_workflow_async(
336
335
  dbos: "DBOS",
337
336
  status: WorkflowStatusInternal,
338
- func: "Workflow[P, Coroutine[Any, Any, R]]",
337
+ func: "Callable[P, Coroutine[Any, Any, R]]",
339
338
  ctx: DBOSContext,
340
339
  *args: Any,
341
340
  **kwargs: Any,
@@ -449,7 +448,7 @@ def _get_new_wf() -> tuple[str, DBOSContext]:
449
448
 
450
449
  def start_workflow(
451
450
  dbos: "DBOS",
452
- func: "Workflow[P, Union[R, Coroutine[Any, Any, R]]]",
451
+ func: "Callable[P, Union[R, Coroutine[Any, Any, R]]]",
453
452
  queue_name: Optional[str],
454
453
  execute_workflow: bool,
455
454
  *args: P.args,
@@ -531,7 +530,7 @@ def start_workflow(
531
530
 
532
531
  async def start_workflow_async(
533
532
  dbos: "DBOS",
534
- func: "Workflow[P, Coroutine[Any, Any, R]]",
533
+ func: "Callable[P, Coroutine[Any, Any, R]]",
535
534
  queue_name: Optional[str],
536
535
  execute_workflow: bool,
537
536
  *args: P.args,
dbos/_dbos.py CHANGED
@@ -126,17 +126,6 @@ R = TypeVar("R", covariant=True) # A generic type for workflow return values
126
126
 
127
127
  T = TypeVar("T")
128
128
 
129
-
130
- class DBOSCallProtocol(Protocol[P, R]):
131
- __name__: str
132
- __qualname__: str
133
-
134
- def __call__(*args: P.args, **kwargs: P.kwargs) -> R: ...
135
-
136
-
137
- Workflow: TypeAlias = DBOSCallProtocol[P, R]
138
-
139
-
140
129
  IsolationLevel = Literal[
141
130
  "SERIALIZABLE",
142
131
  "REPEATABLE READ",
@@ -169,7 +158,7 @@ RegisteredJob = Tuple[
169
158
 
170
159
  class DBOSRegistry:
171
160
  def __init__(self) -> None:
172
- self.workflow_info_map: dict[str, Workflow[..., Any]] = {}
161
+ self.workflow_info_map: dict[str, Callable[..., Any]] = {}
173
162
  self.function_type_map: dict[str, str] = {}
174
163
  self.class_info_map: dict[str, type] = {}
175
164
  self.instance_info_map: dict[str, object] = {}
@@ -713,7 +702,7 @@ class DBOS:
713
702
  @classmethod
714
703
  def start_workflow(
715
704
  cls,
716
- func: Workflow[P, R],
705
+ func: Callable[P, R],
717
706
  *args: P.args,
718
707
  **kwargs: P.kwargs,
719
708
  ) -> WorkflowHandle[R]:
@@ -723,7 +712,7 @@ class DBOS:
723
712
  @classmethod
724
713
  async def start_workflow_async(
725
714
  cls,
726
- func: Workflow[P, Coroutine[Any, Any, R]],
715
+ func: Callable[P, Coroutine[Any, Any, R]],
727
716
  *args: P.args,
728
717
  **kwargs: P.kwargs,
729
718
  ) -> WorkflowHandleAsync[R]:
dbos/_queue.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import threading
2
2
  import traceback
3
- from typing import TYPE_CHECKING, Any, Coroutine, Optional, TypedDict
3
+ from typing import TYPE_CHECKING, Any, Callable, Coroutine, Optional, TypedDict
4
4
 
5
5
  from psycopg import errors
6
6
  from sqlalchemy.exc import OperationalError
@@ -10,7 +10,7 @@ from dbos._utils import GlobalParams
10
10
  from ._core import P, R, execute_workflow_by_id, start_workflow, start_workflow_async
11
11
 
12
12
  if TYPE_CHECKING:
13
- from ._dbos import DBOS, Workflow, WorkflowHandle, WorkflowHandleAsync
13
+ from ._dbos import DBOS, WorkflowHandle, WorkflowHandleAsync
14
14
 
15
15
 
16
16
  class QueueRateLimit(TypedDict):
@@ -59,7 +59,7 @@ class Queue:
59
59
  registry.queue_info_map[self.name] = self
60
60
 
61
61
  def enqueue(
62
- self, func: "Workflow[P, R]", *args: P.args, **kwargs: P.kwargs
62
+ self, func: "Callable[P, R]", *args: P.args, **kwargs: P.kwargs
63
63
  ) -> "WorkflowHandle[R]":
64
64
  from ._dbos import _get_dbos_instance
65
65
 
@@ -68,7 +68,7 @@ class Queue:
68
68
 
69
69
  async def enqueue_async(
70
70
  self,
71
- func: "Workflow[P, Coroutine[Any, Any, R]]",
71
+ func: "Callable[P, Coroutine[Any, Any, R]]",
72
72
  *args: P.args,
73
73
  **kwargs: P.kwargs,
74
74
  ) -> "WorkflowHandleAsync[R]":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.25.0a8
3
+ Version: 0.25.0a9
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -23,6 +23,7 @@ Requires-Dist: cryptography>=43.0.3
23
23
  Requires-Dist: rich>=13.9.4
24
24
  Requires-Dist: pyjwt>=2.10.1
25
25
  Requires-Dist: websockets>=15.0
26
+ Requires-Dist: pyright>=1.1.398
26
27
  Description-Content-Type: text/markdown
27
28
 
28
29
 
@@ -1,7 +1,7 @@
1
- dbos-0.25.0a8.dist-info/METADATA,sha256=dmBQbDy6O8vsnqvCZnwOA9PqTACcu5N-FD9iM8giQhU,5521
2
- dbos-0.25.0a8.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- dbos-0.25.0a8.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-0.25.0a8.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-0.25.0a9.dist-info/METADATA,sha256=zE1UQqo38SY2JASBzAeKriGW_47W7Y3Z0atOx1frcVk,5553
2
+ dbos-0.25.0a9.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ dbos-0.25.0a9.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-0.25.0a9.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=2Ur8QyNElSVn7CeL9Ovek2Zsye8A_ZCyjb9djF-N4A4,785
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
7
  dbos/_admin_server.py,sha256=7kguOf9jEt4vg9LO-QJdh4jYddp6Uqtrt14gh7mKA2Y,6387
@@ -13,10 +13,10 @@ dbos/_cloudutils/databases.py,sha256=_shqaqSvhY4n2ScgQ8IP5PDZvzvcx3YBKV8fj-cxhSY
13
13
  dbos/_conductor/conductor.py,sha256=oDlRpGxLT-uLDjEX1JwTwcJiH2FzDsrOTtnrkt_X_1U,15253
14
14
  dbos/_conductor/protocol.py,sha256=Bj4dhbAhAfj4IrMs_8OYJda2SdjAv1lcePXXG1MejPM,5800
15
15
  dbos/_context.py,sha256=3He4w46OTFbR7h8U1MLcdaU10wNyIPBSRqzLkdggv7U,19368
16
- dbos/_core.py,sha256=ZBzclYK0fRw-Q3h1flTOUBkWgPQtplw94RygPWZOo8Q,43321
16
+ dbos/_core.py,sha256=b7ndBxicB66j2LW61pUWbFVAQR0RO9fAefqn9vqSh40,43303
17
17
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
18
18
  dbos/_db_wizard.py,sha256=VnMa6OL87Lc-XPDD1RnXp8NjsJE8YgiQLj3wtWAXp-8,8252
19
- dbos/_dbos.py,sha256=0w2JAwT4eqKx7QEZPMge7FcJUDfN26Hc1Y9E_ou_HJY,45524
19
+ dbos/_dbos.py,sha256=UP5Dl8Tp0xMMv63E7-9r6qnnQxbVKk2nMNad4XbNi10,45331
20
20
  dbos/_dbos_config.py,sha256=7Qm3FARP3lTKZS0gSxDHLbpaDCT30GzfyERxfCde4bc,21566
21
21
  dbos/_debug.py,sha256=mmgvLkqlrljMBBow9wk01PPur9kUf2rI_11dTJXY4gw,1822
22
22
  dbos/_error.py,sha256=B6Y9XLS1f6yrawxB2uAEYFMxFwk9BHhdxPNddKco-Fw,5399
@@ -36,7 +36,7 @@ dbos/_migrations/versions/d76646551a6c_workflow_queue.py,sha256=G942nophZ2uC2vc4
36
36
  dbos/_migrations/versions/eab0cc1d9a14_job_queue.py,sha256=uvhFOtqbBreCePhAxZfIT0qCAI7BiZTou9wt6QnbY7c,1412
37
37
  dbos/_migrations/versions/f4b9b32ba814_functionname_childid_op_outputs.py,sha256=rwfMdqL6LYI4RwtxmB-OJbRKP_wQi-OA8fsmxley-OM,1042
38
38
  dbos/_outcome.py,sha256=EXxBg4jXCVJsByDQ1VOCIedmbeq_03S6d-p1vqQrLFU,6810
39
- dbos/_queue.py,sha256=OWUtbBAqdkDAArFWkwlF8STxykV4iQmrZxrF-_lavh4,3341
39
+ dbos/_queue.py,sha256=yYwKCjxCSFjtD63vpnRQmb835BZAe9UATgWjMW6dcnY,3341
40
40
  dbos/_recovery.py,sha256=4KyZb0XJEUGH7ekYT1kpx38i6y5vygPeH75Ta7RZjYo,2596
41
41
  dbos/_registrations.py,sha256=_zy6k944Ll8QwqU12Kr3OP23ukVtm8axPNN1TS_kJRc,6717
42
42
  dbos/_request.py,sha256=cX1B3Atlh160phgS35gF1VEEV4pD126c9F3BDgBmxZU,929
@@ -66,4 +66,4 @@ dbos/cli/cli.py,sha256=ut47q-R6A423je0zvBTEgwdxENagaKKoyIvyTeACFIU,15977
66
66
  dbos/dbos-config.schema.json,sha256=HtF_njVTGHLdzBGZ4OrGQz3qbPPT0Go-iwd1PgFVTNg,5847
67
67
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
68
68
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
69
- dbos-0.25.0a8.dist-info/RECORD,,
69
+ dbos-0.25.0a9.dist-info/RECORD,,