Add support for managed Python 3.13 and update CPython versions (#7263)

Adds support for CPython 3.13.0rc2

Also bumps to the latest patch version of all the other CPython minor
versions we support.
This commit is contained in:
Zanie Blue 2024-09-10 14:36:16 -05:00 committed by GitHub
parent 0dc1f5db21
commit 0e9870078e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 2989 additions and 70 deletions

View file

@ -282,9 +282,7 @@ impl ManagedPythonInstallation {
/// The [`PythonVersion`] of the toolchain.
pub fn version(&self) -> PythonVersion {
self.key
.version()
.expect("Managed Python installations should always have valid versions")
self.key.version()
}
pub fn implementation(&self) -> &ImplementationName {
@ -331,17 +329,13 @@ impl ManagedPythonInstallation {
let stdlib = if matches!(self.key.os, Os(target_lexicon::OperatingSystem::Windows)) {
self.python_dir().join("Lib")
} else {
let version = self
.key
.version()
.expect("Managed Python installations should always have valid versions");
let python = if matches!(
self.key.implementation,
LenientImplementationName::Known(ImplementationName::PyPy)
) {
format!("pypy{}", version.python_version())
format!("pypy{}", self.key.version().python_version())
} else {
format!("python{}", version.python_version())
format!("python{}", self.key.version().python_version())
};
self.python_dir().join("lib").join(python)
};