Skip to content

Commit 08db442

Browse files
committed
Python 3.13 Support
1 parent 264dbd7 commit 08db442

File tree

10 files changed

+13898
-38
lines changed

10 files changed

+13898
-38
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,6 @@ jobs:
203203
3.10.0,
204204
3.10.15,
205205
3.11.0,
206-
3.11.1,
207-
3.11.2,
208-
3.11.3,
209-
3.11.4,
210-
3.11.5,
211-
3.11.6,
212-
3.11.7,
213-
3.11.8,
214-
3.11.9,
215206
3.11.10,
216207
3.12.0,
217208
3.12.1,
@@ -221,31 +212,14 @@ jobs:
221212
3.12.5,
222213
3.12.6,
223214
3.12.7,
215+
3.13.0,
224216
]
225217
# TODO: also test windows
226218
os: [ubuntu-20.04, macos-13]
227219
# some versions of python can't be tested on GHA with osx because of SIP:
228220
exclude:
229221
- os: macos-13
230222
python-version: 3.11.0
231-
- os: macos-13
232-
python-version: 3.11.1
233-
- os: macos-13
234-
python-version: 3.11.2
235-
- os: macos-13
236-
python-version: 3.11.3
237-
- os: macos-13
238-
python-version: 3.11.4
239-
- os: macos-13
240-
python-version: 3.11.5
241-
- os: macos-13
242-
python-version: 3.11.6
243-
- os: macos-13
244-
python-version: 3.11.7
245-
- os: macos-13
246-
python-version: 3.11.8
247-
- os: macos-13
248-
python-version: 3.11.9
249223
- os: macos-13
250224
python-version: 3.11.10
251225
- os: macos-13

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ serde_derive = "1.0"
3838
serde_json = "1.0"
3939
rand = "0.8"
4040
rand_distr = "0.4"
41-
remoteprocess = {version="0.4.12", features=["unwind"]}
41+
remoteprocess = {version="0.4.12", features=[]}
4242
chrono = "0.4.26"
4343

4444
[dev-dependencies]

ci/update_python_test_versions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def get_github_python_versions():
3838

3939
# for older versions of python, don't test all patches
4040
# (just test first and last) to keep the test matrix down
41-
if major == 2 or minor <= 10:
41+
if major == 2 or minor <= 11:
4242
patches = [patches[0], patches[-1]]
4343

44-
if major == 3 and minor >= 13:
44+
if major == 3 and minor > 13:
4545
continue
4646

4747
versions.extend(f"{major}.{minor}.{patch}" for patch in patches)
@@ -82,7 +82,7 @@ def update_python_test_versions():
8282
# since it currently fails in GHA on SIP errors
8383
exclusions = []
8484
for v in versions:
85-
if v.startswith("3.11") or v.startswith("3.12"):
85+
if v.startswith("3.11") or v.startswith("3.12") or v.startswith("3.13"):
8686
exclusions.append(" - os: macos-13\n")
8787
exclusions.append(f" python-version: {v}\n")
8888
first_exclude_line = lines.index(" exclude:\n", first_line)

src/python_bindings/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pub mod v2_7_15;
22
pub mod v3_10_0;
33
pub mod v3_11_0;
44
pub mod v3_12_0;
5+
pub mod v3_13_0;
56
pub mod v3_3_7;
67
pub mod v3_5_5;
78
pub mod v3_6_6;
@@ -75,6 +76,13 @@ pub mod pyruntime {
7576
minor: 11..=12,
7677
..
7778
} => 40,
79+
// TODO: we can get this from the _PyRuntime.debug_offsets.runtime_state.interpreters_head
80+
// way easier than we can get by updating manually, we should take advantagbe of that
81+
Version {
82+
major: 3,
83+
minor: 13,
84+
..
85+
} => 632,
7886
_ => 24,
7987
}
8088
}

0 commit comments

Comments
 (0)