Skip to content

Commit

Permalink
Python 3.13 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
benfred committed Oct 19, 2024
1 parent 264dbd7 commit 08db442
Show file tree
Hide file tree
Showing 10 changed files with 13,898 additions and 38 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ jobs:
3.10.0,
3.10.15,
3.11.0,
3.11.1,
3.11.2,
3.11.3,
3.11.4,
3.11.5,
3.11.6,
3.11.7,
3.11.8,
3.11.9,
3.11.10,
3.12.0,
3.12.1,
Expand All @@ -221,31 +212,14 @@ jobs:
3.12.5,
3.12.6,
3.12.7,
3.13.0,
]
# TODO: also test windows
os: [ubuntu-20.04, macos-13]
# some versions of python can't be tested on GHA with osx because of SIP:
exclude:
- os: macos-13
python-version: 3.11.0
- os: macos-13
python-version: 3.11.1
- os: macos-13
python-version: 3.11.2
- os: macos-13
python-version: 3.11.3
- os: macos-13
python-version: 3.11.4
- os: macos-13
python-version: 3.11.5
- os: macos-13
python-version: 3.11.6
- os: macos-13
python-version: 3.11.7
- os: macos-13
python-version: 3.11.8
- os: macos-13
python-version: 3.11.9
- os: macos-13
python-version: 3.11.10
- os: macos-13
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ serde_derive = "1.0"
serde_json = "1.0"
rand = "0.8"
rand_distr = "0.4"
remoteprocess = {version="0.4.12", features=["unwind"]}
remoteprocess = {version="0.4.12", features=[]}
chrono = "0.4.26"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions ci/update_python_test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def get_github_python_versions():

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

if major == 3 and minor >= 13:
if major == 3 and minor > 13:
continue

versions.extend(f"{major}.{minor}.{patch}" for patch in patches)
Expand Down Expand Up @@ -82,7 +82,7 @@ def update_python_test_versions():
# since it currently fails in GHA on SIP errors
exclusions = []
for v in versions:
if v.startswith("3.11") or v.startswith("3.12"):
if v.startswith("3.11") or v.startswith("3.12") or v.startswith("3.13"):
exclusions.append(" - os: macos-13\n")
exclusions.append(f" python-version: {v}\n")
first_exclude_line = lines.index(" exclude:\n", first_line)
Expand Down
8 changes: 8 additions & 0 deletions src/python_bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod v2_7_15;
pub mod v3_10_0;
pub mod v3_11_0;
pub mod v3_12_0;
pub mod v3_13_0;
pub mod v3_3_7;
pub mod v3_5_5;
pub mod v3_6_6;
Expand Down Expand Up @@ -75,6 +76,13 @@ pub mod pyruntime {
minor: 11..=12,
..
} => 40,
// TODO: we can get this from the _PyRuntime.debug_offsets.runtime_state.interpreters_head
// way easier than we can get by updating manually, we should take advantagbe of that
Version {
major: 3,
minor: 13,
..
} => 632,
_ => 24,
}
}
Expand Down
Loading

0 comments on commit 08db442

Please sign in to comment.