simpleflow 0.34.3__tar.gz → 0.36.0__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.
- {simpleflow-0.34.3 → simpleflow-0.36.0}/PKG-INFO +3 -5
- {simpleflow-0.34.3 → simpleflow-0.36.0}/pyproject.toml +43 -18
- simpleflow-0.36.0/simpleflow/__init__.py +16 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/activity.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/execute.py +4 -3
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/history.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/process/_named_mixin.py +6 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/submittable.py +1 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/utils.py +1 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/workflow.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/executor.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/exceptions.py +3 -2
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/base.py +1 -7
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/task.py +1 -8
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/workflow.py +1 -6
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/history/base.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/stats/pretty.py +2 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/task.py +13 -1
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/task.py +15 -3
- simpleflow-0.34.3/simpleflow/__init__.py +0 -10
- {simpleflow-0.34.3 → simpleflow-0.36.0}/.gitignore +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/LICENSE +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/README.md +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/__main__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/_decorators.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/boto3_utils.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/canvas.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/command.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/constants.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/by_module.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/dry_run.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/dynamic_dispatcher.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/exceptions.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/dispatch/from_task_registry.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/download.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/exceptions.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/executor.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/format.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/futures.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/job/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/local/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/local/executor.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/log.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/logging_context.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/marker.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/metrology.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/process/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/process/_supervisor.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/registry.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/runtime/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/settings/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/settings/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/settings/default.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/signal.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/constants.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/step/tasks.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/storage.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/constants.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/helpers.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/actors/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/actors/core.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/actors/decider.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/actors/worker.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/constants.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/core.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/activity.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/marker.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/task.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/timer.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/decision/workflow.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/domain.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/compiler.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/factory.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/marker.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/event/timer.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/history/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/history/builder.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/models/workflow.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/activity.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/domain.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/history.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/querysets/workflow.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/responses/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/responses/_base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/settings.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/mapper/utils.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/decider/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/decider/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/decider/command.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/decider/helpers.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/poller.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/worker/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/worker/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/process/worker/command.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/stats/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/stats/base.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/swf/utils.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/utils/__init__.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/utils/_dict.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/utils/_json.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/utils/retry.py +0 -0
- {simpleflow-0.34.3 → simpleflow-0.36.0}/simpleflow/workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simpleflow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: Python library for dataflow programming with Amazon SWF
|
|
5
5
|
Project-URL: documentation, https://botify-labs.github.io/simpleflow
|
|
6
6
|
Project-URL: repository, https://github.com/botify-labs/simpleflow
|
|
@@ -15,14 +15,12 @@ Classifier: Intended Audience :: Developers
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Natural Language :: English
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
21
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
23
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
-
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Requires-Python: >=3.10
|
|
26
24
|
Requires-Dist: attrs
|
|
27
25
|
Requires-Dist: boto3>=1.28.20
|
|
28
26
|
Requires-Dist: click
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
2
|
+
requires = ["hatchling", "uv-dynamic-versioning"]
|
|
3
3
|
build-backend = "hatchling.build"
|
|
4
4
|
|
|
5
|
+
[tool.hatch.version]
|
|
6
|
+
source = "uv-dynamic-versioning"
|
|
7
|
+
|
|
8
|
+
[tool.uv-dynamic-versioning]
|
|
9
|
+
pattern = "default-unprefixed"
|
|
10
|
+
|
|
5
11
|
[project]
|
|
6
12
|
name = "simpleflow"
|
|
7
13
|
description = "Python library for dataflow programming with Amazon SWF"
|
|
8
14
|
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.
|
|
15
|
+
requires-python = ">=3.10"
|
|
10
16
|
license = "MIT"
|
|
11
|
-
authors = [
|
|
12
|
-
|
|
13
|
-
]
|
|
14
|
-
maintainers = [
|
|
15
|
-
{ "email" = "tech@botify.com" },
|
|
16
|
-
]
|
|
17
|
+
authors = [{ name = "Greg Leclercq" }]
|
|
18
|
+
maintainers = [{ "email" = "tech@botify.com" }]
|
|
17
19
|
keywords = ["simpleflow", "amazon swf", "simple workflow"]
|
|
18
20
|
classifiers = [
|
|
19
21
|
"Development Status :: 4 - Beta",
|
|
@@ -21,13 +23,11 @@ classifiers = [
|
|
|
21
23
|
"License :: OSI Approved :: MIT License",
|
|
22
24
|
"Natural Language :: English",
|
|
23
25
|
"Programming Language :: Python :: 3",
|
|
24
|
-
"Programming Language :: Python :: 3.7",
|
|
25
|
-
"Programming Language :: Python :: 3.8",
|
|
26
|
-
"Programming Language :: Python :: 3.9",
|
|
27
26
|
"Programming Language :: Python :: 3.10",
|
|
28
27
|
"Programming Language :: Python :: 3.11",
|
|
29
28
|
"Programming Language :: Python :: 3.12",
|
|
30
29
|
"Programming Language :: Python :: 3.13",
|
|
30
|
+
"Programming Language :: Python :: 3.14",
|
|
31
31
|
]
|
|
32
32
|
dynamic = ["version"]
|
|
33
33
|
|
|
@@ -58,6 +58,7 @@ simpleflow = "simpleflow.command:cli"
|
|
|
58
58
|
|
|
59
59
|
[tool.ruff]
|
|
60
60
|
line-length = 120
|
|
61
|
+
unsafe-fixes = true
|
|
61
62
|
|
|
62
63
|
[tool.ruff.lint]
|
|
63
64
|
extend-select = [
|
|
@@ -68,8 +69,7 @@ extend-select = [
|
|
|
68
69
|
"RUF", # ruff
|
|
69
70
|
]
|
|
70
71
|
allowed-confusables = ["‘", "’"]
|
|
71
|
-
extend-ignore = [
|
|
72
|
-
]
|
|
72
|
+
extend-ignore = []
|
|
73
73
|
ignore = ["E501"]
|
|
74
74
|
|
|
75
75
|
[tool.ruff.lint.isort]
|
|
@@ -80,10 +80,35 @@ exclude_dirs = ["/tests", "/examples", "/venv", "/build"]
|
|
|
80
80
|
skips = ["B404"]
|
|
81
81
|
|
|
82
82
|
[tool.pytest.ini_options]
|
|
83
|
-
addopts = "--doctest-modules --ignore=setup.py --ignore=tasks.py --ignore=docs/ --ignore=build/ --ignore=examples/"
|
|
83
|
+
addopts = "-vv -rfE --no-success-flaky-report --doctest-modules --ignore=setup.py --ignore=tasks.py --ignore=docs/ --ignore=build/ --ignore=examples/"
|
|
84
|
+
env = [
|
|
85
|
+
"PYTHONDONTWRITEBYTECODE=1",
|
|
86
|
+
# The AWS_DEFAULT_REGION parameter determines the region used for SWF.
|
|
87
|
+
# Leaving it to a value different than "us-east-1" would break moto,
|
|
88
|
+
# because moto.swf only mocks calls to us-east-1 region for now.
|
|
89
|
+
"AWS_DEFAULT_REGION=us-east-1",
|
|
90
|
+
# Disable AWS credentials.
|
|
91
|
+
# NB: we set them to wrong values so boto believes they're here, so it
|
|
92
|
+
# issues integration requests later caught by VCR. For more information
|
|
93
|
+
# see tests/integration/README.md
|
|
94
|
+
"AWS_ACCESS_KEY_ID=1234",
|
|
95
|
+
"AWS_SECRET_ACCESS_KEY=1234",
|
|
96
|
+
# Enable various test optimizations
|
|
97
|
+
"SIMPLEFLOW_ENV=test",
|
|
98
|
+
"SIMPLEFLOW_CLEANUP_PROCESSES=yes",
|
|
99
|
+
# Simple variable to control the number of connection retries
|
|
100
|
+
"SWF_CONNECTION_RETRIES=1",
|
|
101
|
+
# Don't run real SWF requests if a cassette doesn't match
|
|
102
|
+
# See tests/integration/README.md for instructions about cassettes updating
|
|
103
|
+
"SIMPLEFLOW_VCR_RECORD_MODE=none",
|
|
104
|
+
# Disable jumbo fields
|
|
105
|
+
"SIMPLEFLOW_JUMBO_FIELDS_BUCKET=",
|
|
106
|
+
# setproctitle segfaults in forked children on macOS (py-setproctitle#165)
|
|
107
|
+
"SIMPLEFLOW_DISABLE_SETPROCTITLE=1",
|
|
108
|
+
# Prevent CI from overriding boto configuration
|
|
109
|
+
"BOTO_CONFIG=/dev/null",
|
|
110
|
+
]
|
|
84
111
|
|
|
85
|
-
[tool.hatch.version]
|
|
86
|
-
path = "simpleflow/__init__.py"
|
|
87
112
|
|
|
88
113
|
[tool.hatch.build]
|
|
89
114
|
include = ["/simpleflow"]
|
|
@@ -102,13 +127,13 @@ dev = [
|
|
|
102
127
|
"pytest",
|
|
103
128
|
"pytest-xdist>=3.2.0",
|
|
104
129
|
"ruff",
|
|
105
|
-
"setuptools<72",
|
|
130
|
+
"setuptools<72", # See https://github.com/pypa/setuptools/issues/4519
|
|
106
131
|
"sphinx",
|
|
107
132
|
"sphinx_rtd_theme",
|
|
108
|
-
"sure",
|
|
109
133
|
"typing-extensions",
|
|
110
134
|
"vcrpy",
|
|
111
135
|
"twine",
|
|
136
|
+
"pytest-env>=1.0.1",
|
|
112
137
|
]
|
|
113
138
|
|
|
114
139
|
doc = [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
from .activity import Activity as Activity
|
|
6
|
+
from .runtime import logger as logger
|
|
7
|
+
from .signal import WaitForSignal as WaitForSignal
|
|
8
|
+
from .workflow import Workflow as Workflow
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
__version__ = version("simpleflow")
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
# Running from a source checkout without the distribution installed.
|
|
14
|
+
__version__ = "unknown"
|
|
15
|
+
__author__ = "Greg Leclercq, Yves Bastide"
|
|
16
|
+
__license__ = "MIT"
|
|
@@ -155,9 +155,10 @@ def python(
|
|
|
155
155
|
tmp_dir = env.get(envname)
|
|
156
156
|
if tmp_dir:
|
|
157
157
|
break
|
|
158
|
-
with
|
|
159
|
-
dir=tmp_dir,
|
|
160
|
-
|
|
158
|
+
with (
|
|
159
|
+
tempfile.TemporaryFile(dir=tmp_dir) as result_fd,
|
|
160
|
+
tempfile.TemporaryFile(dir=tmp_dir, buffering=0) as error_fd,
|
|
161
|
+
):
|
|
161
162
|
dup_result_fd = os.dup(result_fd.fileno()) # remove FD_CLOEXEC
|
|
162
163
|
dup_error_fd = os.dup(error_fd.fileno()) # remove FD_CLOEXEC
|
|
163
164
|
arguments_json = format_arguments_json(*args, **kwargs)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import collections
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from typing import TYPE_CHECKING, ClassVar
|
|
5
6
|
|
|
6
7
|
import simpleflow.swf.mapper.models.history
|
|
7
8
|
from simpleflow import logger
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
|
+
import os
|
|
4
5
|
|
|
5
6
|
from setproctitle import setproctitle
|
|
6
7
|
|
|
@@ -61,6 +62,11 @@ class NamedMixin:
|
|
|
61
62
|
self.set_process_name()
|
|
62
63
|
|
|
63
64
|
def set_process_name(self):
|
|
65
|
+
# setproctitle segfaults when called in a forked child process on macOS
|
|
66
|
+
# (see https://github.com/dvarrazzo/py-setproctitle/issues/165). Allow
|
|
67
|
+
# disabling it so the test suite doesn't crash spawned workers/deciders.
|
|
68
|
+
if os.environ.get("SIMPLEFLOW_DISABLE_SETPROCTITLE"):
|
|
69
|
+
return
|
|
64
70
|
klass = self.__class__.__name__
|
|
65
71
|
properties = []
|
|
66
72
|
for prop in getattr(self, "_named_mixin_properties", []):
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import re
|
|
4
|
-
from collections.abc import Sequence
|
|
4
|
+
from collections.abc import Callable, Sequence
|
|
5
5
|
from functools import partial, wraps
|
|
6
|
-
from
|
|
6
|
+
from re import Pattern
|
|
7
|
+
from typing import Any
|
|
7
8
|
|
|
8
9
|
from botocore.exceptions import ClientError
|
|
9
10
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
3
|
from datetime import datetime
|
|
5
|
-
from typing import Any
|
|
6
|
-
|
|
7
|
-
if sys.version_info < (3, 8):
|
|
8
|
-
from typing_extensions import TypedDict
|
|
9
|
-
else:
|
|
10
|
-
from typing import TypedDict
|
|
4
|
+
from typing import Any, TypedDict
|
|
11
5
|
|
|
12
6
|
import pytz
|
|
13
7
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
if sys.version_info < (3, 8):
|
|
6
|
-
from typing_extensions import TypedDict
|
|
7
|
-
else:
|
|
8
|
-
from typing import ClassVar, TypedDict
|
|
9
|
-
|
|
10
|
-
from typing import TYPE_CHECKING, Any
|
|
3
|
+
from typing import TYPE_CHECKING, Any, ClassVar, TypedDict
|
|
11
4
|
|
|
12
5
|
from simpleflow.swf.mapper.models.event.base import Event, TaskList
|
|
13
6
|
from simpleflow.swf.mapper.models.event.compiler import CompiledEvent
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
if sys.version_info < (3, 8):
|
|
6
|
-
from typing_extensions import TypedDict
|
|
7
|
-
else:
|
|
8
|
-
from typing import ClassVar, TypedDict
|
|
3
|
+
from typing import ClassVar, TypedDict
|
|
9
4
|
|
|
10
5
|
from simpleflow.swf.mapper.models.event.base import Event, TaskList
|
|
11
6
|
from simpleflow.swf.mapper.models.event.compiler import CompiledEvent
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from collections.abc import Iterator
|
|
3
4
|
from itertools import groupby
|
|
4
|
-
from typing import Any
|
|
5
|
+
from typing import Any
|
|
5
6
|
|
|
6
7
|
from simpleflow.swf.mapper.models.event.base import Event
|
|
7
8
|
from simpleflow.swf.mapper.models.event.compiler import CompiledEvent
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import operator
|
|
4
|
+
from collections.abc import Sequence
|
|
4
5
|
from datetime import datetime
|
|
5
6
|
from functools import partial, wraps
|
|
6
7
|
from itertools import chain
|
|
7
|
-
from typing import TYPE_CHECKING, Any
|
|
8
|
+
from typing import TYPE_CHECKING, Any
|
|
8
9
|
|
|
9
10
|
from tabulate import tabulate
|
|
10
11
|
|
|
@@ -161,7 +161,14 @@ class WorkflowTask(task.WorkflowTask, SwfTask):
|
|
|
161
161
|
"""
|
|
162
162
|
Casts a generic simpleflow.task.WorkflowTask into a SWF one.
|
|
163
163
|
"""
|
|
164
|
-
|
|
164
|
+
# Preserve an explicit decision task list override set on the generic task.
|
|
165
|
+
return cls(
|
|
166
|
+
task.executor,
|
|
167
|
+
task.workflow,
|
|
168
|
+
*task._args,
|
|
169
|
+
workflow_task_list=task._task_list,
|
|
170
|
+
**task._kwargs,
|
|
171
|
+
)
|
|
165
172
|
|
|
166
173
|
@property
|
|
167
174
|
def name(self):
|
|
@@ -173,6 +180,11 @@ class WorkflowTask(task.WorkflowTask, SwfTask):
|
|
|
173
180
|
|
|
174
181
|
@property
|
|
175
182
|
def task_list(self) -> str | None:
|
|
183
|
+
# An explicit override (e.g. to make a child workflow inherit its
|
|
184
|
+
# parent's decision task list) wins over the workflow's own logic.
|
|
185
|
+
if self._task_list:
|
|
186
|
+
return self._task_list
|
|
187
|
+
|
|
176
188
|
get_task_list = getattr(self.workflow, "get_task_list", None)
|
|
177
189
|
if get_task_list:
|
|
178
190
|
return get_task_list(self.workflow, *self.args, **self.kwargs)
|
|
@@ -146,7 +146,14 @@ class WorkflowTask(Task):
|
|
|
146
146
|
Child workflow.
|
|
147
147
|
"""
|
|
148
148
|
|
|
149
|
-
def __init__(
|
|
149
|
+
def __init__(
|
|
150
|
+
self,
|
|
151
|
+
executor: Executor | None,
|
|
152
|
+
workflow: type[Workflow],
|
|
153
|
+
*args,
|
|
154
|
+
workflow_task_list: str | None = None,
|
|
155
|
+
**kwargs,
|
|
156
|
+
) -> None:
|
|
150
157
|
# Keep original arguments for use in subclasses
|
|
151
158
|
# For instance this helps casting a generic class to a simpleflow.swf.task,
|
|
152
159
|
# see simpleflow.swf.task.WorkflowTask.from_generic_task() factory
|
|
@@ -159,6 +166,11 @@ class WorkflowTask(Task):
|
|
|
159
166
|
get_workflow_id = getattr(workflow, "get_workflow_id", None)
|
|
160
167
|
self.args = self.resolve_args(*args)
|
|
161
168
|
self.kwargs = self.resolve_kwargs(**kwargs)
|
|
169
|
+
# Explicit decision task list for the child workflow. When set, it takes
|
|
170
|
+
# precedence over the child workflow's own ``get_task_list``/``task_list``
|
|
171
|
+
# (see simpleflow.swf.task.WorkflowTask.task_list). It is *not* a run
|
|
172
|
+
# argument: it never reaches the child's ``run()``.
|
|
173
|
+
self._task_list = workflow_task_list
|
|
162
174
|
|
|
163
175
|
if get_workflow_id:
|
|
164
176
|
self.id: str | None = get_workflow_id(workflow, *self.args, **self.kwargs)
|
|
@@ -192,8 +204,8 @@ class ChildWorkflowTask(WorkflowTask):
|
|
|
192
204
|
(yet).
|
|
193
205
|
"""
|
|
194
206
|
|
|
195
|
-
def __init__(self, workflow: type[Workflow], *args, **kwargs) -> None:
|
|
196
|
-
super().__init__(None, workflow, *args, **kwargs)
|
|
207
|
+
def __init__(self, workflow: type[Workflow], *args, workflow_task_list: str | None = None, **kwargs) -> None:
|
|
208
|
+
super().__init__(None, workflow, *args, workflow_task_list=workflow_task_list, **kwargs)
|
|
197
209
|
|
|
198
210
|
|
|
199
211
|
class SignalTask(Task):
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from .activity import Activity # NOQA
|
|
4
|
-
from .runtime import logger # NOQA
|
|
5
|
-
from .signal import WaitForSignal # NOQA
|
|
6
|
-
from .workflow import Workflow # NOQA
|
|
7
|
-
|
|
8
|
-
__version__ = "0.34.3"
|
|
9
|
-
__author__ = "Greg Leclercq"
|
|
10
|
-
__license__ = "MIT"
|
|
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
|
|
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
|