Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.10 support #442

Merged
merged 6 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [2.7.17, 2.7.18, 3.5.4, 3.5.9, 3.5.10, 3.6.7, 3.6.8, 3.6.9, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.7.1, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.7.10, 3.7.11, 3.7.12, 3.8.0, 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.8.10, 3.8.11, 3.8.12, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7]
python-version: [2.7.17, 2.7.18, 3.5.4, 3.5.9, 3.5.10, 3.6.7, 3.6.8, 3.6.9, 3.6.10, 3.6.11, 3.6.12, 3.6.13, 3.6.14, 3.6.15, 3.7.1, 3.7.5, 3.7.6, 3.7.7, 3.7.8, 3.7.9, 3.7.10, 3.7.11, 3.7.12, 3.8.0, 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.8.9, 3.8.10, 3.8.11, 3.8.12, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.10.0-rc.2]
# TODO: also test windows
os: [ubuntu-latest, macos-latest]
steps:
Expand Down
2 changes: 1 addition & 1 deletion ci/update_python_test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_github_python_versions():
raw_versions = [v["version"] for v in versions_json]
versions = []
for version_str in raw_versions:
if "-" in version_str:
if "-" in version_str and version_str != "3.10.0-rc.2":
continue

major, minor, patch = parse_version(version_str)
Expand Down
19 changes: 10 additions & 9 deletions src/python_bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub mod v3_6_6;
pub mod v3_7_0;
pub mod v3_8_0;
pub mod v3_9_5;
pub mod v3_10_0;

// currently the PyRuntime struct used from Python 3.7 on really can't be
// exposed in a cross platform way using bindgen. PyRuntime has several mutex's
Expand All @@ -28,7 +29,7 @@ pub mod pyruntime {
_ => 24
}
},
Version{major: 3, minor: 8..=9, ..} => 24,
Version{major: 3, minor: 8..=10, ..} => 24,
_ => 16
}
}
Expand All @@ -50,7 +51,7 @@ pub mod pyruntime {
_ => 32
}
},
Version{major: 3, minor: 8..=9, ..} => 32,
Version{major: 3, minor: 8..=10, ..} => 32,
_ => 24
}
}
Expand All @@ -72,7 +73,7 @@ pub mod pyruntime {
}
},
Version{major: 3, minor: 8, ..} => { Some(1416) },
Version{major: 3, minor: 9, ..} => { Some(616) },
Version{major: 3, minor: 9..=10, ..} => { Some(616) },
_ => None
}
}
Expand All @@ -90,7 +91,7 @@ pub mod pyruntime {
}
},
Version{major: 3, minor: 8, ..} => Some(788),
Version{major: 3, minor: 9, ..} => Some(352),
Version{major: 3, minor: 9..=10, ..} => Some(352),
_ => None
}
}
Expand All @@ -100,7 +101,7 @@ pub mod pyruntime {
match version {
Version{major: 3, minor: 7, ..} => Some(828),
Version{major: 3, minor: 8, ..} => Some(804),
Version{major: 3, minor: 9, ..} => Some(364),
Version{major: 3, minor: 9..=10, ..} => Some(364),
_ => None
}
}
Expand All @@ -111,7 +112,7 @@ pub mod pyruntime {
Version{major: 3, minor: 7, patch: 0..=3, ..} => Some(1408),
Version{major: 3, minor: 7, ..} => Some(1496),
Version{major: 3, minor: 8, ..} => Some(1384),
Version{major: 3, minor: 9, ..} => Some(584),
Version{major: 3, minor: 9..=10, ..} => Some(584),
_ => None
}
}
Expand All @@ -130,7 +131,7 @@ pub mod pyruntime {
}
},
Version{major: 3, minor: 8, ..} => Some(1368),
Version{major: 3, minor: 9, ..} => Some(568),
Version{major: 3, minor: 9..=10, ..} => Some(568),
_ => None
}
}
Expand All @@ -153,7 +154,7 @@ pub mod pyruntime {
}
},
Version{major: 3, minor: 8, ..} => Some(1296),
Version{major: 3, minor: 9, ..} => Some(496),
Version{major: 3, minor: 9..=10, ..} => Some(496),
_ => None
}
}
Expand All @@ -172,7 +173,7 @@ pub mod pyruntime {
}
},
Version{major: 3, minor: 8, ..} => Some(1224),
Version{major: 3, minor: 9, ..} => Some(424),
Version{major: 3, minor: 9..=10, ..} => Some(424),
_ => None
}
}
Expand Down
Loading