Skip to content

Commit e6746d3

Browse files
committed
Drop Python 3.8, confirm 3.13
1 parent 853889c commit e6746d3

File tree

9 files changed

+247
-168
lines changed

9 files changed

+247
-168
lines changed

.github/workflows/build-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
submodules: recursive
3333
- uses: actions/setup-python@v5
3434
with:
35-
python-version: "3.12"
35+
python-version: "3.13"
3636

3737
# Install Rust locally for non-Linux (Linux uses an internal docker
3838
# command to build with cibuildwheel which uses rustup install defined

.github/workflows/ci.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,23 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python: ["3.8", "3.12"]
15+
python: ["3.9", "3.13"]
1616
os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
1717
include:
1818
- os: ubuntu-latest
19-
python: "3.12"
19+
python: "3.13"
2020
docsTarget: true
2121
cloudTestTarget: true
2222
clippyLinter: true
2323
- os: ubuntu-latest
24-
python: "3.8"
24+
python: "3.9"
2525
protoCheckTarget: true
2626
- os: ubuntu-arm
2727
runsOn: ubuntu-24.04-arm64-2-core
2828
- os: macos-intel
2929
runsOn: macos-12
3030
- os: macos-arm
3131
runsOn: macos-14
32-
# macOS ARM 3.8 does not have an available Python build at
33-
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json.
34-
# See https://github.com/actions/setup-python/issues/808 and
35-
# https://github.com/actions/python-versions/pull/259.
36-
exclude:
37-
- os: macos-arm
38-
python: "3.8"
3932
runs-on: ${{ matrix.runsOn || matrix.os }}
4033
steps:
4134
- uses: actions/checkout@v4
@@ -45,10 +38,10 @@ jobs:
4538
- uses: Swatinem/rust-cache@v2
4639
with:
4740
workspaces: temporalio/bridge -> target
48-
- uses: actions/setup-python@v5
49-
with:
50-
# Pinning due to failed Windows builds on 3.12.5 https://github.com/temporalio/sdk-python/issues/637
51-
python-version: ${{ matrix.python == '3.12' && '3.12.4' || matrix.python }}
41+
# - uses: actions/setup-python@v5
42+
# with:
43+
# # Pinning due to failed Windows builds on 3.12.5 https://github.com/temporalio/sdk-python/issues/637
44+
# python-version: ${{ matrix.python == '3.12' && '3.12.4' || matrix.python }}
5245
- uses: arduino/setup-protoc@v3
5346
with:
5447
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed

.github/workflows/run-bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
workspaces: temporalio/bridge -> target
3838
- uses: actions/setup-python@v5
3939
with:
40-
python-version: "3.12"
40+
python-version: "3.13"
4141
- uses: arduino/setup-protoc@v3
4242
with:
4343
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Temporal Python SDK](https://assets.temporal.io/w/py-banner.svg)
22

3-
[![Python 3.8+](https://img.shields.io/pypi/pyversions/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio)
3+
[![Python 3.9+](https://img.shields.io/pypi/pyversions/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio)
44
[![PyPI](https://img.shields.io/pypi/v/temporalio.svg?style=for-the-badge)](https://pypi.org/project/temporalio)
55
[![MIT](https://img.shields.io/pypi/l/temporalio.svg?style=for-the-badge)](LICENSE)
66

@@ -1367,7 +1367,7 @@ The Python SDK is built to work with Python 3.8 and newer. It is built using
13671367

13681368
To build the SDK from source for use as a dependency, the following prerequisites are required:
13691369

1370-
* [Python](https://www.python.org/) >= 3.8
1370+
* [Python](https://www.python.org/) >= 3.9
13711371
* Make sure the latest version of `pip` is in use
13721372
* [Rust](https://www.rust-lang.org/)
13731373
* [Protobuf Compiler](https://protobuf.dev/)

poetry.lock

Lines changed: 214 additions & 133 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,27 @@ generate-setup-file = true
3131
"Bug Tracker" = "https://github.com/temporalio/sdk-python/issues"
3232

3333
[tool.poetry.dependencies]
34-
grpcio = {version = "^1.59.0", optional = true}
34+
grpcio = [
35+
{version = "^1.59.0", python = "<3.13", optional = true},
36+
{version = "^1.68.0", python = ">=3.13", optional = true}
37+
]
3538
opentelemetry-api = { version = "^1.11.1", optional = true }
3639
opentelemetry-sdk = { version = "^1.11.1", optional = true }
37-
protobuf = ">=3.20"
38-
python = "^3.8"
40+
protobuf = [
41+
{version = ">=3.20,<5", python = "<3.13"},
42+
{version = ">=5", python = ">=3.13"}
43+
]
44+
python = "^3.9"
3945
python-dateutil = { version = "^2.8.2", python = "<3.11" }
4046
types-protobuf = ">=3.20"
4147
typing-extensions = "^4.2.0"
4248

4349
[tool.poetry.dev-dependencies]
4450
cibuildwheel = "^2.19.0"
45-
grpcio-tools = "^1.48.0"
51+
grpcio-tools = [
52+
{version = "^1.48.0", python = "<3.13", optional = true},
53+
{version = "^1.68.0", python = ">=3.13", optional = true}
54+
]
4655
mypy = "^1.0.0"
4756
mypy-protobuf = "^3.3.0"
4857
psutil = "^5.9.3"
@@ -119,11 +128,7 @@ filterwarnings = [
119128
]
120129

121130
[tool.cibuildwheel]
122-
# We only want the 3.8 64-bit build of each type. However, due to
123-
# https://github.com/pypa/cibuildwheel/issues/1278, we have to build macOS as
124-
# 3.9 until that is fixed. Our fix-wheel process will rename it to 3.8 and we
125-
# have manually confirmed this works with 3.8.
126-
build = "cp38-win_amd64 cp38-manylinux_x86_64 cp38-manylinux_aarch64 cp38-macosx_x86_64 cp39-macosx_arm64"
131+
build = "cp39-win_amd64 cp39-manylinux_x86_64 cp39-manylinux_aarch64 cp39-macosx_x86_64 cp39-macosx_arm64"
127132
build-verbosity = "1"
128133

129134
[tool.cibuildwheel.linux]

scripts/fix_wheel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
# All tags need ABI3
3737
pieces[1] = "abi3"
3838
if pieces[2].startswith("macosx_") and pieces[2].endswith("_arm64"):
39-
# macOS ARM needs to be set to 3.8+ on 11+
40-
pieces[0] = "cp38"
39+
# macOS ARM needs to be set to 3.9+ on 11+
40+
pieces[0] = "cp39"
4141
pieces[2] = "macosx_11_0_arm64"
4242
elif pieces[2].startswith("macosx_") and pieces[2].endswith("_x86_64"):
43-
# macOS x86 needs to be set to 3.8+ on 10.9+
44-
pieces[0] = "cp38"
43+
# macOS x86 needs to be set to 3.9+ on 10.9+
44+
pieces[0] = "cp39"
4545
pieces[2] = "macosx_10_9_x86_64"
4646
else:
47-
# All others just need to be set to 3.8+
48-
pieces[0] = "cp38"
47+
# All others just need to be set to 3.9+
48+
pieces[0] = "cp39"
4949
wheel_lines[i] = "Tag: " + "-".join(pieces)
5050
found_wheel_tag = True
5151
if not found_wheel_tag:

scripts/setup_bridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
path="temporalio/bridge/Cargo.toml",
1212
binding=Binding.PyO3,
1313
py_limited_api=True,
14-
features=["pyo3/abi3-py38"],
14+
features=["pyo3/abi3-py39"],
1515
# Allow local release builds if requested
1616
debug=False if os.environ.get("TEMPORAL_BUILD_RELEASE") == "1" else None,
1717
)

temporalio/bridge/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async-trait = "0.1"
1313
futures = "0.3"
1414
log = "0.4"
1515
prost = "0.13"
16-
pyo3 = { version = "0.20", features = ["extension-module", "abi3-py38", "anyhow"] }
16+
pyo3 = { version = "0.20", features = ["extension-module", "abi3-py39", "anyhow"] }
1717
pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] }
1818
pythonize = "0.20"
1919
temporal-client = { version = "0.1.0", path = "./sdk-core/client" }

0 commit comments

Comments
 (0)