Skip to content

Commit 90ed677

Browse files
authored
Merge pull request #72 from PyO3/python-313
Add support for Python 3.13
2 parents 871aa92 + 27f4401 commit 90ed677

File tree

3 files changed

+28
-46
lines changed

3 files changed

+28
-46
lines changed

.github/workflows/dll.yml

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,31 @@
11
name: Collect pythonXY.dll
22

3-
on:
4-
push:
5-
pull_request:
6-
workflow_dispatch:
3+
on: workflow_dispatch
74

85
jobs:
96
collect:
107
name: Collect pythonXY.dll
118
runs-on: windows-latest
129
steps:
13-
- uses: actions/setup-python@v4
14-
with:
15-
python-version: "pypy3.8"
16-
- uses: actions/setup-python@v4
17-
with:
18-
python-version: "pypy3.9"
19-
- uses: actions/setup-python@v4
20-
with:
21-
python-version: "pypy3.10"
22-
- uses: actions/setup-python@v4
23-
with:
24-
python-version: "3.7"
25-
- uses: actions/setup-python@v4
26-
with:
27-
python-version: "3.8"
28-
- uses: actions/setup-python@v4
29-
with:
30-
python-version: "3.9"
31-
- uses: actions/setup-python@v4
32-
with:
33-
python-version: "3.10"
34-
- uses: actions/setup-python@v4
35-
with:
36-
python-version: "3.11"
37-
- uses: actions/setup-python@v4
38-
with:
39-
python-version: "3.12-dev"
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: |
13+
pypy3.8
14+
pypy3.9
15+
pypy3.10
16+
3.7
17+
3.8
18+
3.9
19+
3.10
20+
3.11
21+
3.12
22+
3.13
23+
allow-prereleases: true
4024
- name: Copy pythonXY.dll
4125
shell: bash
4226
run: |
4327
set -e
44-
for VER in 3.7 3.8 3.9 3.10 3.11 3.12; do
28+
for VER in 3.7 3.8 3.9 3.10 3.11 3.12 3.13; do
4529
VER_NUM=$(echo $VER | sed 's/\.//')
4630
PREFIX=$(py -$VER -c "import sys; print(sys.base_prefix, end='')")
4731
cp "$PREFIX/python$VER_NUM.dll" .
@@ -59,7 +43,7 @@ jobs:
5943
done
6044
ls *.dll
6145
- name: Upload DLLs
62-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
6347
with:
6448
name: dll
6549
path: |

.github/workflows/rust.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Test
22

33
on:
44
push:
5-
branches: [ main ]
65
pull_request:
76
branches: [ main ]
87

@@ -19,7 +18,7 @@ jobs:
1918
- windows-latest
2019
runs-on: ${{ matrix.os }}
2120
steps:
22-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2322
- name: Install the MinGW and LLVM toolchains
2423
if: matrix.os == 'ubuntu-latest'
2524
run: sudo apt-get install -y gcc-mingw-w64 llvm
@@ -31,20 +30,18 @@ jobs:
3130
name: Test zig dlltool
3231
runs-on: ubuntu-latest
3332
steps:
34-
- uses: actions/checkout@v3
35-
- uses: goto-bus-stop/setup-zig@v1
36-
with:
37-
version: 0.10.1
33+
- uses: actions/checkout@v4
34+
- uses: goto-bus-stop/setup-zig@v2
3835
- name: Run tests with zig
3936
run: ZIG_COMMAND=zig cargo test --verbose
4037
zigwheel:
4138
name: Test python -m ziglang dlltool
4239
runs-on: ubuntu-latest
4340
steps:
44-
- uses: actions/checkout@v3
45-
- uses: actions/setup-python@v4
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v5
4643
with:
47-
python-version: "3.11"
44+
python-version: "3.12"
4845
- name: Install ziglang package
4946
run: pip install ziglang
5047
- name: Run tests with python -m ziglang
@@ -53,13 +50,13 @@ jobs:
5350
name: Check code formatting
5451
runs-on: ubuntu-latest
5552
steps:
56-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5754
- name: Run cargo fmt
5855
run: cargo fmt -- --check
5956
clippy:
6057
name: Clippy lints
6158
runs-on: ubuntu-latest
6259
steps:
63-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
6461
- name: Run cargo clippy
6562
run: cargo clippy --tests -- --deny warnings

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ impl ImportLibraryGenerator {
256256
Some((3, 10)) => ("python310.def", include_str!("python310.def")),
257257
Some((3, 11)) => ("python311.def", include_str!("python311.def")),
258258
Some((3, 12)) => ("python312.def", include_str!("python312.def")),
259+
Some((3, 13)) => ("python313.def", include_str!("python313.def")),
259260
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python version")),
260261
},
261262
PythonImplementation::PyPy => match self.version {
@@ -524,7 +525,7 @@ mod tests {
524525
.generate(&dir)
525526
.unwrap();
526527

527-
for minor in 7..=12 {
528+
for minor in 7..=13 {
528529
ImportLibraryGenerator::new("x86_64", "gnu")
529530
.version(Some((3, minor)))
530531
.generate(&dir)
@@ -563,7 +564,7 @@ mod tests {
563564
.generate(&dir)
564565
.unwrap();
565566

566-
for minor in 7..=12 {
567+
for minor in 7..=13 {
567568
ImportLibraryGenerator::new("x86_64", "msvc")
568569
.version(Some((3, minor)))
569570
.generate(&dir)

0 commit comments

Comments
 (0)