dbos 1.12.0a1__py3-none-any.whl → 1.12.0a2__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.

Potentially problematic release.


This version of dbos might be problematic. Click here for more details.

dbos/_core.py CHANGED
@@ -1156,27 +1156,15 @@ def decorate_step(
1156
1156
 
1157
1157
  @wraps(func)
1158
1158
  def wrapper(*args: Any, **kwargs: Any) -> Any:
1159
- rr: Optional[str] = check_required_roles(func, fi)
1160
- # Entering step is allowed:
1161
- # No DBOS, just call the original function directly
1162
- # In a step already, just call the original function directly.
1163
- # In a workflow (that is not in a step already)
1164
- # Not in a workflow (we will start the single op workflow)
1165
- if not dbosreg.dbos or not dbosreg.dbos._launched:
1166
- # Call the original function directly
1167
- return func(*args, **kwargs)
1159
+ # If the step is called from a workflow, run it as a step.
1160
+ # Otherwise, run it as a normal function.
1168
1161
  ctx = get_local_dbos_context()
1169
- if ctx and ctx.is_step():
1170
- # Call the original function directly
1171
- return func(*args, **kwargs)
1172
- if ctx and ctx.is_within_workflow():
1173
- assert ctx.is_workflow(), "Steps must be called from within workflows"
1162
+ if ctx and ctx.is_workflow():
1163
+ rr: Optional[str] = check_required_roles(func, fi)
1174
1164
  with DBOSAssumeRole(rr):
1175
1165
  return invoke_step(*args, **kwargs)
1176
1166
  else:
1177
- tempwf = dbosreg.workflow_info_map.get("<temp>." + step_name)
1178
- assert tempwf
1179
- return tempwf(*args, **kwargs)
1167
+ return func(*args, **kwargs)
1180
1168
 
1181
1169
  wrapper = (
1182
1170
  _mark_coroutine(wrapper) if inspect.iscoroutinefunction(func) else wrapper # type: ignore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 1.12.0a1
3
+ Version: 1.12.0a2
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- dbos-1.12.0a1.dist-info/METADATA,sha256=C0KYncUnaBZoIUcbp8aiGYugvzqGDUYEejRyhriIUac,13268
2
- dbos-1.12.0a1.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- dbos-1.12.0a1.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-1.12.0a1.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-1.12.0a2.dist-info/METADATA,sha256=oNte-Ruz9ts7sv1QqQRgCXRHZfi861HiknkNI1LUDJ4,13268
2
+ dbos-1.12.0a2.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ dbos-1.12.0a2.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-1.12.0a2.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=NssPCubaBxdiKarOWa-wViz1hdJSkmBGcpLX_gQ4NeA,891
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
7
  dbos/_admin_server.py,sha256=e8ELhcDWqR3_PNobnNgUvLGh5lzZq0yFSF6dvtzoQRI,16267
@@ -11,7 +11,7 @@ dbos/_client.py,sha256=_wMe4qnRSwiRZo74xdqTBetbHlIVy3vQifdSd7os1ZY,18213
11
11
  dbos/_conductor/conductor.py,sha256=3E_hL3c9g9yWqKZkvI6KA0-ZzPMPRo06TOzT1esMiek,24114
12
12
  dbos/_conductor/protocol.py,sha256=q3rgLxINFtWFigdOONc-4gX4vn66UmMlJQD6Kj8LnL4,7420
13
13
  dbos/_context.py,sha256=8yZOTM1ehhk6URLa0EP9_20aOd6SZLhXBmcPwFEZDlA,26739
14
- dbos/_core.py,sha256=KtIA7VZDeuKrrJT6Cy2z0YeT9dDDxelj69LIJ-4Gors,49536
14
+ dbos/_core.py,sha256=tKAahVW7StJ_KuW4e1fWnCSE5-2SaI7RZIMWZWcuzm8,48848
15
15
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
16
16
  dbos/_dbos.py,sha256=bn5S_T6HZnDipYEVqhLq_F2Zo904fjT3J5oO15Frhrs,57715
17
17
  dbos/_dbos_config.py,sha256=er8oF3e9zGlEG9KntX7uBSXrDuVvROtkzVidzXjOwUU,21746
@@ -71,4 +71,4 @@ dbos/cli/migration.py,sha256=eI0sc0vYq2iUP3cBHPfTa6WHCyDBr8ld9nRxEZZzFrU,3316
71
71
  dbos/dbos-config.schema.json,sha256=CjaspeYmOkx6Ip_pcxtmfXJTn_YGdSx_0pcPBF7KZmo,6060
72
72
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
73
73
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
74
- dbos-1.12.0a1.dist-info/RECORD,,
74
+ dbos-1.12.0a2.dist-info/RECORD,,