Skip to content

Commit d536bbf

Browse files
Peefyclaude
andauthored
chore(release): bump KCL to v0.13.2 and support CPython 3.15
kcl-lang/kcl v0.13.2 is published, so the runtime pin and every binding's package version move with it. The prebuilt binaries every binding vendors come from that release, so the two move together (see docs/lib-vendoring.md). - KCL_VERSION in go/install/install.go and the package version in every binding go from 0.13.1 to 0.13.2. - The kcl-* git dependencies move with them. They are unpinned to the default branch, whose workspace version is already 0.13.2, so the 0.13.1 requirement no longer resolved -- that part is a build fix, not cosmetics. - lua/kcl_lib-0.13.1-3.rockspec becomes kcl_lib-0.13.2-3.rockspec. publish-luarocks.yaml globs for it by version and errors unless exactly one matches. Comments recording what changed *in* v0.13.1 are left alone -- historical, not stale. The Python binding gains CPython 3.15 support (#404), which it could not have before: pyo3 was pinned to =0.20.2, whose documented ceiling is 3.12. cp313 and cp314 only worked because the workflow also set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1. - pyo3 goes to 0.30, the first line with final 3.15 support (0.29 had it as beta). The =0.20.2 pin existed for PyO3/maturin#1960, closed in Feb 2024 once maturin 1.5 stopped detecting too-new interpreters, so it had been constraining nothing for two years. - The source change is one line: #[pymodule] takes &Bound<'_, PyModule> under the post-0.21 API. The crate is two #[pyfunction]s, so that migration is the entire surface. - maturin's floor goes from >=1.5 to >=1.14, the first release that knows about 3.15; CI pins v1.15.0. - requires-python goes from >=3.7 to >=3.10. protobuf 7.x -- the wheel's only runtime dependency -- requires >=3.10, so no build below 3.10 could ever install. maturin skips interpreters below requires-python during --find-interpreter rather than erroring, so the CPython 3.9 in the Linux images simply stops being probed. The wheel jobs needed three different fixes to produce a cp315 wheel on every platform, and none of them is a version matrix: - Windows stops at 3.14, so that job runs actions/setup-python for 3.15. setup-python adds to what maturin discovers rather than replacing it, so 3.10-3.14 are still built. - Linux aarch64 is a cross build, so maturin-action runs it in ghcr.io/rust-cross/manylinux2014-cross:aarch64 rather than the native manylinux image. That image does carry 3.15 and 3.15t, but --find-interpreter never offers them: it reports 3.10 through 3.14, 3.14t and PyPy 3.11 and stops. Naming them explicitly (-i python3.15, -i python3.15t) resolves, so the aarch64 leg builds those two wheels in separate steps. Without them aarch64 Linux ships no 3.15 wheel at all. - Linux x86_64 and macOS need nothing; their images already carry 3.15. An earlier revision of this PR added a python: [default, "3.15"] matrix dimension to all the wheel jobs. That was redundant for x86_64 and macOS and actively harmful: macOS produced a byte-identical cp315 wheel under two artifact names, and those collide once the release job merges artifacts. The dimension is gone; the test job keeps its 3.x/3.15 matrix, where the version selects what is exercised rather than what is packaged. The release job's artifact download changes shape too. It listed four artifacts by exact name, which would have needed hand-editing for every new Python version; it is now a single pattern: wheels-*-<run_id> download with merge-multiple. The wheels- prefix deliberately excludes the sdist artifact, which was never published either before or after. The published set goes from 28 files to 29: every platform gains 3.15, and the cp37/cp38/cp39 and older PyPy builds that protobuf 7.x made uninstallable are gone. Signed-off-by: Peefy <xpf6677@163.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bd39db7 commit d536bbf

46 files changed

Lines changed: 171 additions & 108 deletions

Some content is hidden

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

‎.github/workflows/ast-diff-test.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ jobs:
182182
if: matrix.binding == 'python'
183183
uses: PyO3/maturin-action@v1
184184
with:
185+
maturin-version: v1.15.0
185186
command: develop
186187
working-directory: lib/python
187188
env:

‎.github/workflows/dotnet-test.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ jobs:
185185
if: "startsWith(github.ref, 'refs/tags/')"
186186
run: |
187187
cd dotnet/KclLib/bin/Release
188-
dotnet nuget push KclLib.0.13.1.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
188+
dotnet nuget push KclLib.0.13.2.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

‎.github/workflows/publish-kcltool.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
env:
3030
KCL_CLI_VERSION: v0.12.10
3131
KCL_LIB_REF: v0.12.5
32-
PACKAGE_VERSION: 0.13.1
32+
PACKAGE_VERSION: 0.13.2
3333

3434
jobs:
3535
build:

‎.github/workflows/python-test.yaml‎

Lines changed: 81 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# This file is autogenerated by maturin v1.5.1
2-
# To update, run
3-
#
4-
# maturin generate-ci github
5-
#
1+
# Derived from `maturin generate-ci github`, but hand-maintained since:
2+
# the wheel jobs gained a Python-version dimension and the `test` job carries
3+
# comments explaining why it builds in place. Re-running the generator would
4+
# drop both, so edit this file directly and keep it in sync with maturin's shape.
65
name: python-test
76

87
on:
@@ -29,16 +28,14 @@ on:
2928
permissions:
3029
contents: read
3130

32-
env:
33-
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
34-
3531
jobs:
3632
sdist:
3733
runs-on: ubuntu-latest
3834
steps:
3935
- uses: actions/checkout@v7
4036
- uses: PyO3/maturin-action@v1
4137
with:
38+
maturin-version: v1.15.0
4239
working-directory: "python"
4340
command: sdist
4441
args: -o dist
@@ -48,6 +45,21 @@ jobs:
4845
name: sdist-${{ github.run_id }}
4946
path: python/dist
5047

48+
# These jobs build a wheel for *every* interpreter available to maturin,
49+
# not one -- `--find-interpreter` means "find them all", and it picks up
50+
# whatever the image ships plus anything on PATH. That is where the
51+
# cp310..cp315 / pp311 spread comes from; there is no version matrix here
52+
# and adding one would only duplicate wheels the default build already
53+
# produces. Interpreters below `requires-python` are skipped outright --
54+
# maturin never probes them -- so the 3.9 in the Linux images is not built.
55+
#
56+
# Linux x86_64 runs in the native manylinux image, which ships 3.9 through
57+
# 3.15 (plus free-threaded 3.14t/3.15t and PyPy 3.11), so its cp315 comes
58+
# for free. The macOS runner image also carries 3.15. The Windows image
59+
# stops at 3.14, so that job installs 3.15 explicitly below -- setup-python
60+
# adds to what maturin discovers rather than replacing it. Linux aarch64
61+
# needs its own steps for the same reason, but for a different one; see
62+
# below.
5163
linux:
5264
runs-on: ubuntu-latest
5365
strategy:
@@ -57,6 +69,7 @@ jobs:
5769
- uses: actions/checkout@v7
5870
- uses: PyO3/maturin-action@v1
5971
with:
72+
maturin-version: v1.15.0
6073
target: ${{ matrix.target }}
6174
manylinux: auto
6275
working-directory: "python"
@@ -65,6 +78,42 @@ jobs:
6578
env:
6679
# Workaround ring 0.17 build issue
6780
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
81+
# aarch64 is a cross build, so maturin-action runs it in
82+
# ghcr.io/rust-cross/manylinux2014-cross:aarch64 rather than the native
83+
# quay.io/pypa/manylinux2014_x86_64 image the x86_64 leg uses. That
84+
# cross image does have 3.15 and 3.15t, but --find-interpreter never
85+
# offers them -- it reports 3.10 through 3.14, 3.14t and PyPy 3.11 and
86+
# stops. Naming them explicitly resolves, so the two steps below build
87+
# them by hand. Without them aarch64 Linux ships no 3.15 wheel at all,
88+
# which is the gap #404 is about.
89+
- name: Build the aarch64 CPython 3.15 wheel
90+
if: matrix.target == 'aarch64'
91+
uses: PyO3/maturin-action@v1
92+
with:
93+
maturin-version: v1.15.0
94+
target: aarch64
95+
manylinux: auto
96+
working-directory: "python"
97+
command: build
98+
args: --release -o dist -i python3.15
99+
env:
100+
# Workaround ring 0.17 build issue
101+
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
102+
# Free-threaded 3.15 on aarch64. The x86_64 leg gets cp315t from the
103+
# native image; this asks the cross image the same question.
104+
- name: Build the aarch64 free-threaded 3.15 wheel
105+
if: matrix.target == 'aarch64'
106+
uses: PyO3/maturin-action@v1
107+
with:
108+
maturin-version: v1.15.0
109+
target: aarch64
110+
manylinux: auto
111+
working-directory: "python"
112+
command: build
113+
args: --release -o dist -i python3.15t
114+
env:
115+
# Workaround ring 0.17 build issue
116+
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
68117
- name: Upload wheels-linux-${{ matrix.target }}-${{ github.run_id }}
69118
uses: actions/upload-artifact@v7
70119
with:
@@ -75,8 +124,16 @@ jobs:
75124
runs-on: windows-latest
76125
steps:
77126
- uses: actions/checkout@v7
127+
# The Windows image tops out at 3.14. Without this the cp315 wheel
128+
# never gets built; with it maturin finds 3.10-3.14 from the image
129+
# plus 3.15 here.
130+
- name: Set up Python 3.15
131+
uses: actions/setup-python@v7
132+
with:
133+
python-version: "3.15"
78134
- uses: PyO3/maturin-action@v1
79135
with:
136+
maturin-version: v1.15.0
80137
working-directory: "python"
81138
command: build
82139
args: --release -o dist --find-interpreter
@@ -92,6 +149,7 @@ jobs:
92149
- uses: actions/checkout@v7
93150
- uses: PyO3/maturin-action@v1
94151
with:
152+
maturin-version: v1.15.0
95153
working-directory: "python"
96154
command: build
97155
target: universal2-apple-darwin
@@ -103,18 +161,21 @@ jobs:
103161
path: python/dist
104162

105163
test:
106-
name: Test on ${{ matrix.os }}
164+
name: Test on ${{ matrix.os }} / ${{ matrix.python }}
107165
runs-on: ${{ matrix.os }}
108166
strategy:
109167
fail-fast: false
110168
matrix:
111169
os: [ubuntu-latest, macos-latest, windows-latest]
170+
# "3.x" is the runner default; 3.15 is the newest CPython the wheels
171+
# ship, and the newest is the one most likely to break.
172+
python: [ "3.x", "3.15" ]
112173
steps:
113174
- uses: actions/checkout@v7
114175
- name: Set up Python
115176
uses: actions/setup-python@v7
116177
with:
117-
python-version: "3.x"
178+
python-version: ${{ matrix.python }}
118179
# Build the extension in-place via maturin develop so that the compiled
119180
# `_kcl_lib.<abi>.so` is placed inside `python/kcl_lib/` alongside its
120181
# Python source. This matters because the tests run with `working-directory:
@@ -127,9 +188,9 @@ jobs:
127188
run: |
128189
python -m venv .venv
129190
if [ "$RUNNER_OS" = "Windows" ]; then
130-
.venv/Scripts/pip install maturin pytest
191+
.venv/Scripts/pip install maturin==1.15.0 pytest
131192
else
132-
.venv/bin/pip install maturin pytest
193+
.venv/bin/pip install maturin==1.15.0 pytest
133194
fi
134195
- name: Build extension in-place with maturin
135196
working-directory: "python"
@@ -159,22 +220,17 @@ jobs:
159220
id-token: write
160221
needs: [ macos, linux, windows ]
161222
steps:
223+
# Collect every wheel leg in one step. The explicit per-name list this
224+
# replaces had to be hand-edited for every new target, platform, or
225+
# Python version; the pattern picks all of them up. `merge-multiple`
226+
# keeps them flat in python/dist rather than nesting a directory per
227+
# artifact. `wheels-` deliberately excludes the sdist artifact, which is
228+
# published separately and not wanted here.
162229
- uses: actions/download-artifact@v8
163230
with:
164-
name: wheels-linux-x86_64-${{ github.run_id }}
165-
path: python/dist
166-
- uses: actions/download-artifact@v8
167-
with:
168-
name: wheels-linux-aarch64-${{ github.run_id }}
169-
path: python/dist
170-
- uses: actions/download-artifact@v8
171-
with:
172-
name: wheels-windows-${{ github.run_id }}
173-
path: python/dist
174-
- uses: actions/download-artifact@v8
175-
with:
176-
name: wheels-macos-${{ github.run_id }}
231+
pattern: wheels-*-${{ github.run_id }}
177232
path: python/dist
233+
merge-multiple: true
178234
- name: Publish to PyPI
179235
# The issue https://github.com/pypa/gh-action-pypi-publish/issues/310 has not tagged a release yet
180236
# Use the commit hash to get the temporary fix

‎Cargo.toml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kcl-lang"
3-
version = "0.13.1"
3+
version = "0.13.2"
44
edition = "2024"
55
readme = "README.md"
66
documentation = "kcl-lang.io"
@@ -11,12 +11,12 @@ license = "Apache-2.0"
1111

1212
[dependencies]
1313
anyhow = "1"
14-
kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
15-
kcl-evaluator = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
16-
kcl-loader = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
17-
kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
18-
kcl-runtime = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
19-
kcl-primitives = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
14+
kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
15+
kcl-evaluator = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
16+
kcl-loader = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
17+
kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
18+
kcl-runtime = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
19+
kcl-primitives = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
2020

2121
[dev-dependencies]
2222
serde_json = "1"

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This way you'll be able to import the above dependency to use the SDK.
103103
<dependency>
104104
<groupId>com.kcl</groupId>
105105
<artifactId>kcl-lib</artifactId>
106-
<version>0.13.1</version>
106+
<version>0.13.2</version>
107107
</dependency>
108108
```
109109

@@ -256,7 +256,7 @@ This way you'll be able to import the above dependency to use the SDK.
256256
<dependency>
257257
<groupId>com.kcl</groupId>
258258
<artifactId>kcl-lib</artifactId>
259-
<version>0.13.1</version>
259+
<version>0.13.2</version>
260260
</dependency>
261261
```
262262

@@ -340,7 +340,7 @@ For CMake, you can use FetchContent to add KCL C++ Lib to your project.
340340
FetchContent_Declare(
341341
kcl-lib
342342
GIT_REPOSITORY https://github.com/kcl-lang/lib.git
343-
GIT_TAG v0.13.1
343+
GIT_TAG v0.13.2
344344
SOURCE_SUBDIR cpp
345345
)
346346
FetchContent_MakeAvailable(kcl-lib)

‎cpp/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(kcl-lib VERSION 0.13.1 LANGUAGES C CXX)
2+
project(kcl-lib VERSION 0.13.2 LANGUAGES C CXX)
33

44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)

‎cpp/Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
name = "kcl-lib-cpp"
33
publish = false
44
edition = "2024"
5-
version = "0.13.1"
5+
version = "0.13.2"
66

77
[lib]
88
crate-type = ["staticlib"]
99

1010
[dependencies]
1111
anyhow = "1.0"
1212
cxx = "1.0"
13-
kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.13.1" }
13+
kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.13.2" }
1414
# Used to encode the empty `ListMethodArgs` and decode `ListMethodResult`
1515
# through the universal `kcl_api::call` dispatcher since `KclServiceImpl`
1616
# does not expose a typed `list_method` wrapper.

‎cpp/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can use FetchContent to add KCL C++ Lib to your project.
1212
FetchContent_Declare(
1313
kcl-lib
1414
GIT_REPOSITORY https://github.com/kcl-lang/lib.git
15-
GIT_TAG v0.13.1
15+
GIT_TAG v0.13.2
1616
SOURCE_SUBDIR cpp
1717
)
1818
FetchContent_MakeAvailable(kcl-lib)
@@ -24,7 +24,7 @@ Or you can download the source code and add it to your project.
2424
mkdir third_party
2525
cd third_party
2626
git clone https://github.com/kcl-lang/lib.git
27-
git checkout v0.13.1
27+
git checkout v0.13.2
2828
```
2929

3030
```shell

‎dart/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: >
66
the universal protobuf dispatcher shipped as a prebuilt `libkcl` shared
77
library (see `go/lib/` in the parent repository). The Dart runtime never
88
builds any Rust code.
9-
version: 0.13.1
9+
version: 0.13.2
1010

1111
environment:
1212
# protoc_plugin 25.x and protobuf 6.x both require Dart SDK 3.7+.

0 commit comments

Comments
 (0)