Skip to content

Commit 0ee63e4

Browse files
committed
merges main@upstream
2 parents 9458164 + c8cbfe0 commit 0ee63e4

105 files changed

Lines changed: 11193 additions & 4888 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-binaries.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
branches:
55
- main
66
- "releases/*"
7-
- fix-build-binaries
87

98
jobs:
109
# Compile the binaries and upload artifacts
@@ -20,7 +19,7 @@ jobs:
2019
runsOn: ubuntu-24.04-arm64-2-core
2120
- os: macos-intel
2221
package-suffix: macos-amd64
23-
runsOn: macos-13
22+
runsOn: macos-15-intel
2423
- os: macos-arm
2524
package-suffix: macos-aarch64
2625
runsOn: macos-14
@@ -66,7 +65,7 @@ jobs:
6665
if [ "$RUNNER_OS" = "Windows" ]; then
6766
bindir=Scripts
6867
fi
69-
./.venv/$bindir/pip install 'protobuf>=3.20,<6' 'types-protobuf>=3.20,<6' 'typing-extensions>=4.2.0,<5' pytest pytest_asyncio grpcio 'nexus-rpc>=1.1.0' pydantic opentelemetry-api opentelemetry-sdk python-dateutil 'openai-agents>=0.2.3,<=0.2.9'
68+
./.venv/$bindir/pip install 'protobuf>=3.20,<6' 'types-protobuf>=3.20,<6' 'typing-extensions>=4.2.0,<5' pytest pytest_asyncio grpcio 'nexus-rpc>=1.1.0' pydantic opentelemetry-api opentelemetry-sdk python-dateutil 'openai-agents>=0.2.3,<=0.2.9' 'googleapis-common-protos==1.70.0'
7069
./.venv/$bindir/pip install --no-index --find-links=../dist temporalio
7170
./.venv/$bindir/python -m pytest -s -k test_workflow_hello
7271

.github/workflows/ci.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,24 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python: ["3.9", "3.13"]
19+
python: ["3.10", "3.14"]
2020
os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
2121
include:
22-
# On 3.9 there is a problem with import errors caused by pytests' loader that surface due
23-
# to a bug in CPython (https://github.com/python/cpython/issues/91351), so we avoid using
24-
# the assert rewriter.
25-
- python: "3.9"
26-
pytestExtraArgs: "--assert=plain"
2722
- os: ubuntu-latest
28-
python: "3.13"
23+
python: "3.14"
2924
docsTarget: true
3025
cloudTestTarget: true
3126
openaiTestTarget: true
3227
clippyLinter: true
3328
- os: ubuntu-latest
34-
python: "3.9"
29+
python: "3.10"
3530
protoCheckTarget: true
3631
- os: ubuntu-arm
3732
runsOn: ubuntu-24.04-arm64-2-core
3833
- os: macos-intel
39-
runsOn: macos-13
40-
# On 3.13.3 there is some issue with macOS intel where it hangs after pytest with some
41-
# test that may have a worker that cannot properly shutdown, but it does not occur on
42-
# other versions, platforms, etc. See https://github.com/temporalio/sdk-python/issues/834.
43-
- os: macos-intel
44-
python: "3.13"
45-
pythonOverride: "3.13.2"
34+
runsOn: macos-15-intel
4635
- os: macos-arm
4736
runsOn: macos-latest
48-
# On 3.13.5, python3.lib is missing for the linker
49-
- os: windows-latest
50-
python: "3.13"
51-
pythonOverride: "3.13.4"
5237
runs-on: ${{ matrix.runsOn || matrix.os }}
5338
steps:
5439
- uses: actions/checkout@v4
@@ -113,11 +98,10 @@ jobs:
11398
env:
11499
TEMPORAL_TEST_PROTO3: 1
115100
run: |
116-
uv add --python 3.9 "protobuf<4"
101+
uv add --python 3.10 "protobuf<4"
117102
uv sync --all-extras
118103
poe build-develop
119104
poe gen-protos
120-
poe format
121105
[[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1)
122106
poe test -s
123107
timeout-minutes: 10
@@ -148,6 +132,8 @@ jobs:
148132
with:
149133
submodules: recursive
150134
- uses: dtolnay/rust-toolchain@stable
135+
with:
136+
components: "clippy"
151137
- uses: Swatinem/rust-cache@v2
152138
with:
153139
workspaces: temporalio/bridge -> target

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,8 +1676,8 @@ worker = Worker(
16761676
### Workflow Replay
16771677

16781678
Given a workflow's history, it can be replayed locally to check for things like non-determinism errors. For example,
1679-
assuming `history_str` is populated with a JSON string history either exported from the web UI or from `tctl`, the
1680-
following function will replay it:
1679+
assuming `history_str` is populated with a JSON string history either exported from the web UI or from the
1680+
`Temporal CLI`, the following function will replay it:
16811681

16821682
```python
16831683
from temporalio.client import WorkflowHistory

pyproject.toml

Lines changed: 67 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@ name = "temporalio"
33
version = "1.18.1"
44
description = "Temporal.io Python SDK"
55
authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }]
6-
requires-python = ">=3.9"
6+
requires-python = ">=3.10"
77
readme = "README.md"
88
license = { file = "LICENSE" }
9-
keywords = [
10-
"temporal",
11-
"workflow",
12-
]
9+
keywords = ["temporal", "workflow"]
1310
dependencies = [
14-
"nexus-rpc==1.1.0",
15-
"protobuf>=3.20,<7.0.0",
16-
"python-dateutil>=2.8.2,<3 ; python_version < '3.11'",
17-
"types-protobuf>=3.20",
18-
"typing-extensions>=4.2.0,<5",
11+
"nexus-rpc==1.1.0",
12+
"protobuf>=3.20,<7.0.0",
13+
"python-dateutil>=2.8.2,<3 ; python_version < '3.11'",
14+
"types-protobuf>=3.20",
15+
"typing-extensions>=4.2.0,<5",
16+
]
17+
classifiers = [
18+
"License :: OSI Approved :: MIT License",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.14",
1924
]
2025

2126
[project.optional-dependencies]
2227
grpc = ["grpcio>=1.48.2,<2"]
23-
opentelemetry = [
24-
"opentelemetry-api>=1.11.1,<2",
25-
"opentelemetry-sdk>=1.11.1,<2",
26-
]
28+
opentelemetry = ["opentelemetry-api>=1.11.1,<2", "opentelemetry-sdk>=1.11.1,<2"]
2729
pydantic = ["pydantic>=2.0.0,<3"]
2830
openai-agents = [
29-
"openai-agents>=0.3,<0.4",
30-
"eval-type-backport>=0.2.2; python_version < '3.10'",
31-
"mcp>=1.9.4, <2; python_version >= '3.10'",
31+
"openai-agents>=0.3,<0.4",
32+
"mcp>=1.9.4, <2",
3233
]
3334

3435
[project.urls]
@@ -39,48 +40,63 @@ Documentation = "https://docs.temporal.io/docs/python"
3940

4041
[dependency-groups]
4142
dev = [
42-
"cibuildwheel>=2.22.0,<3",
43-
"grpcio-tools>=1.48.2,<2",
44-
"mypy==1.4.1",
45-
"mypy-protobuf>=3.3.0,<4",
46-
"psutil>=5.9.3,<6",
47-
"pydocstyle>=6.3.0,<7",
48-
"pydoctor>=24.11.1,<25",
49-
"pyright==1.1.403",
50-
"pytest~=7.4",
51-
"pytest-asyncio>=0.21,<0.22",
52-
"pytest-timeout~=2.2",
53-
"ruff>=0.5.0,<0.6",
54-
"toml>=0.10.2,<0.11",
55-
"twine>=4.0.1,<5",
56-
"ruff>=0.5.0,<0.6",
57-
"maturin>=1.8.2",
58-
"pytest-cov>=6.1.1",
59-
"httpx>=0.28.1",
60-
"pytest-pretty>=1.3.0",
61-
"openai-agents[litellm]>=0.3,<0.4"
43+
"cibuildwheel>=2.22.0,<3",
44+
"grpcio-tools>=1.48.2,<2",
45+
"mypy==1.18.2",
46+
"mypy-protobuf>=3.3.0,<4",
47+
"psutil>=5.9.3,<6",
48+
"pydocstyle>=6.3.0,<7",
49+
"pydoctor>=24.11.1,<25",
50+
"pyright==1.1.403",
51+
"pytest~=7.4",
52+
"pytest-asyncio>=0.21,<0.22",
53+
"pytest-timeout~=2.2",
54+
"ruff>=0.5.0,<0.6",
55+
"toml>=0.10.2,<0.11",
56+
"twine>=4.0.1,<5",
57+
"maturin>=1.8.2",
58+
"pytest-cov>=6.1.1",
59+
"httpx>=0.28.1",
60+
"pytest-pretty>=1.3.0",
61+
"openai-agents>=0.3,<0.4; python_version >= '3.14'",
62+
"openai-agents[litellm]>=0.3,<0.4; python_version < '3.14'",
63+
"googleapis-common-protos==1.70.0",
6264
]
6365

6466
[tool.poe.tasks]
6567
build-develop = "uv run maturin develop --uv"
6668
build-develop-with-release = { cmd = "uv run maturin develop --release --uv" }
67-
format = [{cmd = "uv run ruff check --select I --fix"}, {cmd = "uv run ruff format"}, ]
69+
format = [
70+
{ cmd = "uv run ruff check --select I --fix" },
71+
{ cmd = "uv run ruff format" },
72+
{ cmd = "cargo fmt", cwd = "temporalio/bridge" },
73+
]
6874
gen-docs = "uv run scripts/gen_docs.py"
69-
gen-protos = "uv run scripts/gen_protos.py"
70-
gen-protos-docker = "uv run scripts/gen_protos_docker.py"
75+
gen-protos = [
76+
{ cmd = "uv run scripts/gen_protos.py" },
77+
{ cmd = "uv run scripts/gen_payload_visitor.py" },
78+
{ cmd = "uv run scripts/gen_bridge_client.py" },
79+
{ ref = "format" },
80+
]
81+
gen-protos-docker = [
82+
{ cmd = "uv run scripts/gen_protos_docker.py" },
83+
{ cmd = "uv run scripts/gen_payload_visitor.py" },
84+
{ cmd = "uv run scripts/gen_bridge_client.py" },
85+
{ ref = "format" },
86+
]
7187
lint = [
72-
{cmd = "uv run ruff check --select I"},
73-
{cmd = "uv run ruff format --check"},
74-
{ref = "lint-types"},
75-
{ref = "lint-docs"},
88+
{ cmd = "uv run ruff check --select I" },
89+
{ cmd = "uv run ruff format --check" },
90+
{ ref = "lint-types" },
91+
{ ref = "lint-docs" },
7692
]
7793
bridge-lint = { cmd = "cargo clippy -- -D warnings", cwd = "temporalio/bridge" }
7894
# TODO(cretz): Why does pydocstyle complain about @overload missing docs after
7995
# https://github.com/PyCQA/pydocstyle/pull/511?
8096
lint-docs = "uv run pydocstyle --ignore-decorators=overload"
8197
lint-types = [
82-
{ cmd = "uv run pyright"},
83-
{ cmd = "uv run mypy --namespace-packages --check-untyped-defs ."},
98+
{ cmd = "uv run pyright" },
99+
{ cmd = "uv run mypy --namespace-packages --check-untyped-defs ." },
84100
]
85101
run-bench = "uv run python scripts/run_bench.py"
86102
test = "uv run pytest"
@@ -104,7 +120,7 @@ filterwarnings = [
104120

105121
[tool.cibuildwheel]
106122
before-all = "pip install protoc-wheel-0"
107-
build = "cp39-win_amd64 cp39-manylinux_x86_64 cp39-manylinux_aarch64 cp39-macosx_x86_64 cp39-macosx_arm64"
123+
build = "cp310-win_amd64 cp310-manylinux_x86_64 cp310-manylinux_aarch64 cp310-macosx_x86_64 cp310-macosx_arm64"
108124
build-verbosity = 1
109125

110126
[tool.cibuildwheel.macos]
@@ -120,7 +136,7 @@ ignore_missing_imports = true
120136
exclude = [
121137
# Ignore generated code
122138
'temporalio/api',
123-
'temporalio/bridge/proto'
139+
'temporalio/bridge/proto',
124140
]
125141

126142
[tool.pydocstyle]
@@ -130,7 +146,8 @@ match_dir = "^(?!(docs|scripts|tests|api|proto|\\.)).*"
130146
add_ignore = [
131147
# We like to wrap at a certain number of chars, even long summary sentences.
132148
# https://github.com/PyCQA/pydocstyle/issues/184
133-
"D205", "D415"
149+
"D205",
150+
"D415",
134151
]
135152

136153
[tool.pydoctor]
@@ -226,9 +243,7 @@ manifest-path = "temporalio/bridge/Cargo.toml"
226243
module-name = "temporalio.bridge.temporal_sdk_bridge"
227244
python-packages = ["temporalio"]
228245
include = ["LICENSE"]
229-
exclude = [
230-
"temporalio/bridge/target/**/*",
231-
]
246+
exclude = ["temporalio/bridge/target/**/*"]
232247

233248
[tool.uv]
234249
# Prevent uv commands from building the package by default

scripts/_proto/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ COPY ./ ./
1010
RUN mkdir -p ./temporalio/api
1111
RUN uv add "protobuf<4"
1212
RUN uv sync --all-extras
13-
RUN poe gen-protos
13+
RUN uv run scripts/gen_protos.py
1414

1515
CMD ["sh", "-c", "cp -r ./temporalio/api/* /api_new && cp -r ./temporalio/bridge/proto/* /bridge_new"]

0 commit comments

Comments
 (0)