diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f6e29343..117d86188 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,8 +46,8 @@ jobs: - windows-11-arm python-version: - "3.9" - - "3.14" - - "3.14t" + - "3.15-dev" + - "3.15t-dev" - "pypy3.11" exclude: # TODO: Tests are getting stuck @@ -66,6 +66,7 @@ jobs: runs-on: ${{ matrix.os }} env: RUST_BACKTRACE: "1" + PIP_NO_CACHE_DIR: "1" SCCACHE_GHA_ENABLED: "true" RUSTC_WRAPPER: "sccache" steps: @@ -425,6 +426,7 @@ jobs: - name: Build wheels run: | set -ex + # Use bundled sysconfig bin/maturin build -i ${{ matrix.platform.python }} --release --out dist --target ${{ matrix.platform.target }} -m test-crates/pyo3-mixed/Cargo.toml ${{ matrix.platform.extra-args }} diff --git a/guide/src/bindings.md b/guide/src/bindings.md index 9cb47fccd..51bc8b29a 100644 --- a/guide/src/bindings.md +++ b/guide/src/bindings.md @@ -14,18 +14,30 @@ maturin automatically detects pyo3 bindings when it's added as a dependency in ` ### `Py_LIMITED_API`/abi3 -pyo3 bindings has `Py_LIMITED_API`/abi3 support, enable the `abi3` feature of the `pyo3` crate to use it: +The pyo3 bindings supports the Python stable ABI (`Py_LIMITED_API`/abi3/abi3t). +You can use it by enabling `"abi3"` and/or `"abi3t"` features. We suggest +picking a minimum supported Python version for both features: ```toml -pyo3 = { version = "0.28.3", features = ["abi3"] } +pyo3 = { version = "0.29.0", features = ["abi3-py310", "abi3t-py315"] } ``` -You may additionally specify a minimum Python version by using the `abi3-pyXX` -format for the pyo3 features, where `XX` is corresponds to a Python version. -For example `abi3-py37` will indicate a minimum Python version of 3.7. - -> **Note**: Read more about abi3 support in [pyo3's -> documentation](https://pyo3.rs/latest/building-and-distribution#py_limited_apiabi3). +When selecting a specific interpreter to build against, this will produce an +`abi3-py310` wheel for Python 3.14 and older and an `abi3.abi3t-py315` wheel on +Python 3.15 and newer. If you build with `--find-interpreters`, maturin will +produce an `abi3-py310`, `cp314t-cp314` and an `abi3.abi3t-py315` wheel. These +three wheels cover all non-EOL and non-experimental builds of CPython. Other +python implementations like RustPython may also target the abi3t ABI in the +future. + +An `abi3-py310` wheel supports all GIL-enabled Python +versions from Python 3.10 to Python 3.14 and the `abi3.abi3t` wheel supports +Python 3.15 and all newer versions of CPython. + +> **Note**: Read more about stable ABI support in [pyo3's +> documentation](https://pyo3.rs/latest/building-and-distribution#py_limited_apiabi3abi3t). You +> can read more about using abi3 and abi3t wheels simultaneously in the +> HOWTO guide on migrating to abi3t: https://docs.python.org/3.16/howto/abi3t-migration.html#why-do-this. ### Cross Compiling diff --git a/guide/src/distribution.md b/guide/src/distribution.md index 1f8f5fa25..6f63d0321 100644 --- a/guide/src/distribution.md +++ b/guide/src/distribution.md @@ -263,7 +263,7 @@ or providing any Windows Python library files. ```toml [dependencies] -pyo3 = { version = "0.28.3", features = ["generate-import-lib"] } +pyo3 = { version = "0.29.0", features = ["generate-import-lib"] } ``` It uses an external [`python3-dll-a`](https://docs.rs/python3-dll-a/latest/python3_dll_a/) crate to diff --git a/guide/src/tutorial.md b/guide/src/tutorial.md index b4e08ba1e..534c3dda9 100644 --- a/guide/src/tutorial.md +++ b/guide/src/tutorial.md @@ -36,7 +36,7 @@ crate-type = ["cdylib"] rand = "0.9.0" [dependencies.pyo3] -version = "0.28.3" +version = "0.29.0" # "abi3-py38" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.8 features = ["abi3-py38"] ``` diff --git a/src/binding_generator/pyo3_binding.rs b/src/binding_generator/pyo3_binding.rs index acce3ca25..450c3f041 100644 --- a/src/binding_generator/pyo3_binding.rs +++ b/src/binding_generator/pyo3_binding.rs @@ -37,6 +37,7 @@ pub struct Pyo3BindingGenerator<'a> { enum BindingType<'a> { Abi3(Option<&'a PythonInterpreter>), + Abi3t(Option<&'a PythonInterpreter>), VersionSpecific(&'a PythonInterpreter), } @@ -49,6 +50,7 @@ impl<'a> Pyo3BindingGenerator<'a> { let binding_type = match stable_abi { Some(kind) => match kind { StableAbiKind::Abi3 => BindingType::Abi3(interpreter), + StableAbiKind::Abi3t => BindingType::Abi3t(interpreter), }, None => { let interpreter = interpreter.ok_or_else(|| { @@ -101,6 +103,7 @@ impl<'a> BindingGenerator for Pyo3BindingGenerator<'a> { let so_filename = match self.binding_type { BindingType::Abi3(interpreter) => ext_suffix(target, interpreter, ext_name, "abi3"), + BindingType::Abi3t(interpreter) => ext_suffix(target, interpreter, ext_name, "abi3t"), BindingType::VersionSpecific(interpreter) => interpreter.get_library_name(ext_name), }; let artifact_target = ArtifactTarget::ExtensionModule(module.join(so_filename)); diff --git a/src/bridge/detection.rs b/src/bridge/detection.rs index a81565704..672d852ac 100644 --- a/src/bridge/detection.rs +++ b/src/bridge/detection.rs @@ -23,7 +23,7 @@ const PYO3_BINDING_CRATES: [PyO3Crate; 2] = [PyO3Crate::PyO3Ffi, PyO3Crate::PyO3 /// is forced; otherwise it's auto-detected from dependencies and target types. /// /// Conditional pyo3/pyo3-ffi features from pyproject.toml are excluded from -/// abi3 inference here. Use [`upgrade_bridge_abi3`] after interpreter resolution +/// abi3 inference here. Use [`upgrade_bridge_stable_abi`] after interpreter resolution /// to evaluate them. pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result { let no_extra_features = HashMap::new(); @@ -147,7 +147,7 @@ pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result
, @@ -223,11 +223,11 @@ fn has_stable_abi( deps: &HashMap<&str, &Node>, extra_features: &HashMap<&str, Vec>, ) -> Result> { - let abi3 = has_stable_abi_from_kind(deps, extra_features, StableAbiKind::Abi3)?; - if abi3.is_some() { - return Ok(abi3); + let abi3t = has_stable_abi_from_kind(deps, extra_features, StableAbiKind::Abi3t)?; + if abi3t.is_some() { + return Ok(abi3t); } - Ok(None) + has_stable_abi_from_kind(deps, extra_features, StableAbiKind::Abi3) } /// pyo3 supports building stable abi wheels if the unstable-api feature is not selected @@ -240,7 +240,6 @@ fn has_stable_abi_from_kind( let lib = lib.as_str(); if let Some(&pyo3_crate) = deps.get(lib) { let extra = extra_features.get(lib); - // Find the minimal abi3 python version. If there is none, abi3 hasn't been selected // Find the minimal stable abi python version. If there is none, stable abi hasn't been selected // This parses abi3-py{major}{minor} and returns the minimal (major, minor) tuple let all_features: Vec<&str> = pyo3_crate diff --git a/src/bridge/mod.rs b/src/bridge/mod.rs index a217656fc..b95e23fdd 100644 --- a/src/bridge/mod.rs +++ b/src/bridge/mod.rs @@ -1,6 +1,6 @@ mod detection; -pub use detection::{find_bridge, has_windows_import_lib_support, upgrade_bridge_abi3}; +pub use detection::{find_bridge, has_windows_import_lib_support, upgrade_bridge_stable_abi}; use std::{fmt, str::FromStr}; @@ -132,6 +132,23 @@ impl StableAbi { version: StableAbiVersion::Version(major, minor), } } + + /// Create a StableAbi instance from a known abi3t version + pub fn from_abi3t_version(major: u8, minor: u8) -> StableAbi { + StableAbi { + kind: StableAbiKind::Abi3t, + version: StableAbiVersion::Version(major, minor), + } + } +} + +impl std::fmt::Display for StableAbi { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self.kind { + StableAbiKind::Abi3 => write!(f, "abi3"), + StableAbiKind::Abi3t => write!(f, "abi3t"), + } + } } /// Python version to use as the abi3/abi3t target. @@ -146,7 +163,7 @@ pub enum StableAbiVersion { } impl StableAbiVersion { - /// Convert `StableAbiVersion` into an Option, where CurrentPython maps None + /// Convert `StableAbiVersion` into an Option, where CurrentPython maps to None pub fn min_version(&self) -> Option<(u8, u8)> { match self { StableAbiVersion::CurrentPython => None, @@ -160,12 +177,15 @@ impl StableAbiVersion { pub enum StableAbiKind { /// The original stable ABI, supporting Python 3.2 and up Abi3, + /// The free-threaded stable ABI, supporting Python 3.15 and up + Abi3t, } impl fmt::Display for StableAbiKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { StableAbiKind::Abi3 => write!(f, "abi3"), + StableAbiKind::Abi3t => write!(f, "abi3t"), } } } @@ -175,6 +195,7 @@ impl StableAbiKind { pub fn wheel_tag(&self) -> &str { match self { StableAbiKind::Abi3 => "abi3", + StableAbiKind::Abi3t => "abi3.abi3t", } } } @@ -340,32 +361,36 @@ impl BridgeModel { /// /// This is a project-level check — it does not consider whether a particular /// interpreter meets the abi3 minimum version. For per‑interpreter checks - /// use [`is_abi3_for_interpreter`](Self::is_abi3_for_interpreter). + /// use [`is_stable_abi_for_interpreter`](Self::is_stable_abi_for_interpreter). pub fn has_stable_abi(&self) -> bool { self.pyo3() .and_then(|pyo3| pyo3.stable_abi.as_ref()) .is_some() } - /// Check whether abi3 should be enabled for a specific interpreter. + /// Check whether an abi3 or abi3t build should be enabled for a specific interpreter. /// /// Returns `true` only when the bridge model has stable abi support **and** /// the given interpreter supports the stable ABI **and** meets the abi3 /// minimum version. Version‑specific fallback builds (e.g. Python 3.10 when /// abi3 targets ≥ 3.11) return `false` so that `Py_LIMITED_API` is not /// defined and interpreter‑specific linker names are used. - pub fn is_abi3_for_interpreter(&self, interpreter: &PythonInterpreter) -> bool { - if !interpreter.has_stable_api() { - return false; - } - + pub fn is_stable_abi_for_interpreter(&self, interpreter: &PythonInterpreter) -> bool { self.pyo3() .and_then(|pyo3| pyo3.stable_abi.as_ref()) - .is_some_and(|stable_abi| match stable_abi.version.min_version() { - Some((major, minor)) => { - (interpreter.major as u8, interpreter.minor as u8) >= (major, minor) + .is_some_and(|stable_abi| { + if !interpreter.has_stable_api(stable_abi.kind) { + return false; + } + if matches!(stable_abi.kind, StableAbiKind::Abi3) && interpreter.gil_disabled { + return false; + }; + match stable_abi.version.min_version() { + Some((major, minor)) => { + (interpreter.major as u8, interpreter.minor as u8) >= (major, minor) + } + None => true, // CurrentPython → compatible when stable ABI is supported } - None => true, // CurrentPython → compatible when stable ABI is supported }) } @@ -392,3 +417,39 @@ impl fmt::Display for BridgeModel { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn stable_abi_kind_display() { + assert_eq!(StableAbiKind::Abi3.to_string(), "abi3"); + assert_eq!(StableAbiKind::Abi3t.to_string(), "abi3t"); + } + + #[test] + fn stable_abi_kind_wheel_tag() { + assert_eq!(StableAbiKind::Abi3.wheel_tag(), "abi3"); + // abi3t wheels are also importable on abi3-capable interpreters, so the + // wheel tag is the compressed form `abi3.abi3t`. + assert_eq!(StableAbiKind::Abi3t.wheel_tag(), "abi3.abi3t"); + } + + #[test] + fn stable_abi_display() { + assert_eq!(StableAbi::from_abi3_version(3, 7).to_string(), "abi3"); + assert_eq!(StableAbi::from_abi3t_version(3, 15).to_string(), "abi3t"); + } + + #[test] + fn stable_abi_constructors() { + let abi3 = StableAbi::from_abi3_version(3, 9); + assert_eq!(abi3.kind, StableAbiKind::Abi3); + assert_eq!(abi3.version, StableAbiVersion::Version(3, 9)); + + let abi3t = StableAbi::from_abi3t_version(3, 15); + assert_eq!(abi3t.kind, StableAbiKind::Abi3t); + assert_eq!(abi3t.version, StableAbiVersion::Version(3, 15)); + } +} diff --git a/src/build_context/builder.rs b/src/build_context/builder.rs index 5024c6f31..7c6b18e7e 100644 --- a/src/build_context/builder.rs +++ b/src/build_context/builder.rs @@ -1,5 +1,7 @@ use crate::auditwheel::{AuditWheelMode, PlatformTag}; -use crate::bridge::{find_bridge, has_windows_import_lib_support, upgrade_bridge_abi3}; +use crate::bridge::{ + StableAbiVersion, find_bridge, has_windows_import_lib_support, upgrade_bridge_stable_abi, +}; use crate::build_options::{BuildOptions, TargetTriple}; use crate::compile::filter_cargo_targets; use crate::metadata::Metadata24; @@ -129,7 +131,7 @@ impl BuildContextBuilder { }); // Detect bridge without conditional pyo3 features — those are - // evaluated after interpreter resolution via upgrade_bridge_abi3. + // evaluated after interpreter resolution via upgrade_bridge_stable_abi. let bridge = find_bridge(&cargo_metadata, bindings)?; if !bridge.is_bin() && project_layout.extension_name.contains('-') { @@ -163,16 +165,26 @@ impl BuildContextBuilder { // (e.g. abi3-py311 gated on python-version>=3.11) match any // of the resolved interpreters. let bridge = if has_conditional_pyo3_features { - upgrade_bridge_abi3(bridge, &cargo_metadata, pyproject, &interpreter)? + upgrade_bridge_stable_abi(bridge, &cargo_metadata, pyproject, &interpreter)? } else { bridge }; debug!("Resolved bridge model: {:?}", bridge); if let Some(stable_abi) = bridge.pyo3().and_then(|p| p.stable_abi.as_ref()) { - eprintln!( - "🔗 Found {bridge} bindings with {} support", - stable_abi.kind - ); + match stable_abi.version { + StableAbiVersion::Version(major, minor) => { + eprintln!( + "🔗 Found {bridge} bindings with {}-py{}.{} support", + stable_abi.kind, major, minor + ); + } + StableAbiVersion::CurrentPython => { + eprintln!( + "🔗 Found {bridge} bindings with {} support", + stable_abi.kind + ); + } + } } else { eprintln!("🔗 Found {bridge} bindings"); } diff --git a/src/build_options.rs b/src/build_options.rs index 2eb64fb42..0c5dc7381 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -155,7 +155,7 @@ impl BuildOptions { #[cfg(test)] mod tests { use super::*; - use crate::bridge::{PyO3, PyO3Crate, StableAbi, find_bridge}; + use crate::bridge::{find_bridge, PyO3, PyO3Crate, StableAbi, StableAbiKind}; use crate::python_interpreter::InterpreterResolver; use crate::test_utils::test_crate_path; use crate::{BridgeModel, Target}; @@ -191,11 +191,11 @@ mod tests { let bridge = BridgeModel::PyO3(PyO3 { crate_name: PyO3Crate::PyO3, - version: semver::Version::new(0, 28, 3), - stable_abi: Some(StableAbi::from_abi3_version(3, 7)), + version: semver::Version::new(0, 29, 0), + stable_abi: Some(StableAbi::from_abi3_version(3, 9)), metadata: Some(PyO3Metadata { cpython: PyO3VersionMetadata { - min_minor: 7, + min_minor: 8, max_minor: 15, }, pypy: PyO3VersionMetadata { @@ -208,6 +208,155 @@ mod tests { assert_eq!(find_bridge(&pyo3_pure, Some("pyo3")).unwrap(), bridge); } + #[test] + fn test_find_bridge_pyo3_abi3t() { + let pyo3_abi3t = MetadataCommand::new() + .manifest_path(test_crate_path("pyo3-abi3t").join("Cargo.toml")) + .exec() + .unwrap(); + + let bridge = find_bridge(&pyo3_abi3t, None).unwrap(); + let pyo3 = match &bridge { + BridgeModel::PyO3(pyo3) => pyo3, + other => panic!("expected PyO3 bridge, got {other:?}"), + }; + assert_eq!( + pyo3.stable_abi, + Some(StableAbi::from_abi3t_version(3, 15)), + "abi3t-py315 should produce a StableAbiKind::Abi3t with min version 3.15" + ); + assert_eq!(pyo3.crate_name, PyO3Crate::PyO3); + + let bridge_explicit = find_bridge(&pyo3_abi3t, Some("pyo3")).unwrap(); + assert_eq!(bridge_explicit, bridge); + } + + #[test] + fn test_find_bridge_pyo3_abi3t_without_version() { + use crate::bridge::StableAbiVersion; + + let pyo3_abi3t_without_version = MetadataCommand::new() + .manifest_path(test_crate_path("pyo3-abi3t-without-version").join("Cargo.toml")) + .exec() + .unwrap(); + + let bridge = find_bridge(&pyo3_abi3t_without_version, None).unwrap(); + let pyo3 = match &bridge { + BridgeModel::PyO3(pyo3) => pyo3, + other => panic!("expected PyO3 bridge, got {other:?}"), + }; + // The `abi3t` feature alone (no `abi3t-py3XY`) should map to CurrentPython. + let stable_abi = pyo3.stable_abi.expect("expected abi3t stable_abi"); + assert!( + matches!(stable_abi.kind, StableAbiKind::Abi3t), + "expected StableAbiKind::Abi3t, got {:?}", + stable_abi.kind + ); + assert_eq!(stable_abi.version, StableAbiVersion::CurrentPython); + } + + /// Mirrors `test_find_bridge_pyo3_abi3t` for a crate that depends on `pyo3-ffi` + /// directly (the FFI-only path, analogous to `pyo3-ffi-pure`). Verifies the + /// crate_name is `PyO3Ffi` and version detection works the same as via `pyo3`. + #[test] + fn test_find_bridge_pyo3_ffi_abi3t_py315() { + let pyo3_ffi_abi3t = MetadataCommand::new() + .manifest_path(test_crate_path("pyo3-ffi-abi3t-py315").join("Cargo.toml")) + .exec() + .unwrap(); + + let bridge = find_bridge(&pyo3_ffi_abi3t, None).unwrap(); + let pyo3 = match &bridge { + BridgeModel::PyO3(pyo3) => pyo3, + other => panic!("expected PyO3 bridge, got {other:?}"), + }; + assert_eq!( + pyo3.stable_abi, + Some(StableAbi::from_abi3t_version(3, 15)), + "abi3t-py315 on pyo3-ffi must produce a Version(3, 15) abi3t bridge" + ); + assert_eq!(pyo3.crate_name, PyO3Crate::PyO3Ffi); + } + + /// `is_abi3_for_interpreter` must distinguish between the abi3 and abi3t kinds: + /// only abi3 kinds may emit the `cp{ver}-abi3-{platform}` linker name. abi3t + /// builds need to fall through to `is_stable_abi_for_interpreter`, which is the + /// kind-agnostic check used to decide whether to define `Py_LIMITED_API`. + #[test] + fn test_stable_abi_for_interpreter_distinguishes_kinds() { + use crate::bridge::{PyO3Metadata, PyO3VersionMetadata}; + use crate::python_interpreter::{InterpreterConfig, InterpreterKind}; + use crate::{PythonInterpreter, Target}; + + let target = Target::from_resolved_target_triple("x86_64-unknown-linux-gnu").unwrap(); + + // GIL-enabled CPython 3.15 - supports abi3 and abi3t + let py315 = PythonInterpreter::from_config( + InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 15), "").unwrap(), + ); + // Free-threaded CPython 3.15 - supports abi3t and does NOT support abi3 + let py315t = PythonInterpreter::from_config( + InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 15), "t").unwrap(), + ); + // Free-threaded CPython 3.14 — does NOT support abi3 or abi3t + let py314t = PythonInterpreter::from_config( + InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 14), "t").unwrap(), + ); + // GIL-enabled CPython 3.14 - supports abi3 and does NOT support abi3t + let py314 = PythonInterpreter::from_config( + InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 14), "").unwrap(), + ); + + let metadata = PyO3Metadata { + cpython: PyO3VersionMetadata { + min_minor: 7, + max_minor: 15, + }, + pypy: PyO3VersionMetadata { + min_minor: 11, + max_minor: 11, + }, + }; + + let abi3_bridge = BridgeModel::PyO3(PyO3 { + crate_name: PyO3Crate::PyO3, + version: semver::Version::new(0, 28, 3), + stable_abi: Some(StableAbi::from_abi3_version(3, 9)), + metadata: Some(metadata.clone()), + }); + let abi3t_bridge = BridgeModel::PyO3(PyO3 { + crate_name: PyO3Crate::PyO3, + version: semver::Version::new(0, 28, 3), + stable_abi: Some(StableAbi::from_abi3t_version(3, 15)), + metadata: Some(metadata), + }); + + assert!(matches!( + abi3t_bridge.pyo3().unwrap().stable_abi.unwrap().kind, + StableAbiKind::Abi3t + )); + + assert!(matches!( + abi3_bridge.pyo3().unwrap().stable_abi.unwrap().kind, + StableAbiKind::Abi3 + )); + + assert!(abi3_bridge.is_stable_abi_for_interpreter(&py315)); + assert!(abi3t_bridge.is_stable_abi_for_interpreter(&py315)); + assert!(abi3t_bridge.is_stable_abi_for_interpreter(&py315t)); + + // abi3 isn't supported for free-threaded interpreters, should fail + assert!(!abi3_bridge.is_stable_abi_for_interpreter(&py315t)); + + // Free-threaded 3.14: no stable api support + assert!(!abi3t_bridge.is_stable_abi_for_interpreter(&py314t)); + assert!(!abi3_bridge.is_stable_abi_for_interpreter(&py314t)); + + // GIL-enabled 3.14 supports abi3 but not abi3t + assert!(!abi3t_bridge.is_stable_abi_for_interpreter(&py314)); + assert!(abi3_bridge.is_stable_abi_for_interpreter(&py314)); + } + #[test] fn test_find_bridge_pyo3_feature() { let pyo3_pure = MetadataCommand::new() @@ -279,7 +428,7 @@ mod tests { #[test] fn test_find_bridge_conditional_abi3_filtered_by_interpreter() { - use crate::bridge::upgrade_bridge_abi3; + use crate::bridge::upgrade_bridge_stable_abi; use crate::python_interpreter::InterpreterConfig; // A pyproject.toml with pyo3/abi3-py311 gated on python-version >= 3.11 @@ -321,7 +470,7 @@ mod tests { ) .unwrap(), ); - let bridge = upgrade_bridge_abi3( + let bridge = upgrade_bridge_stable_abi( bridge, &metadata, Some(&pyproject), @@ -344,7 +493,7 @@ mod tests { .unwrap(), ); let base_bridge = find_bridge(&metadata, None).unwrap(); - let bridge = upgrade_bridge_abi3( + let bridge = upgrade_bridge_stable_abi( base_bridge, &metadata, Some(&pyproject), @@ -359,7 +508,8 @@ mod tests { // 3.10 gets a version-specific wheel, 3.11+ gets the abi3 wheel. let base_bridge = find_bridge(&metadata, None).unwrap(); let bridge = - upgrade_bridge_abi3(base_bridge, &metadata, Some(&pyproject), &[py310, py311]).unwrap(); + upgrade_bridge_stable_abi(base_bridge, &metadata, Some(&pyproject), &[py310, py311]) + .unwrap(); assert!( bridge.has_stable_abi(), "should infer abi3 for mixed [3.10, 3.11] (build_stable_abi_wheels handles the split)" diff --git a/src/build_orchestrator.rs b/src/build_orchestrator.rs index da581e0ed..579412fa2 100644 --- a/src/build_orchestrator.rs +++ b/src/build_orchestrator.rs @@ -287,15 +287,15 @@ impl<'a> BuildOrchestrator<'a> { let interp = &self.context.python.interpreter[0]; match bindings.stable_abi { Some(stable_abi) => { - let wheel_tag = stable_abi.kind.wheel_tag(); + let abi_tag = stable_abi.kind.wheel_tag(); match stable_abi.version { StableAbiVersion::Version(major, minor) => { - vec![format!("cp{major}{minor}-{wheel_tag}-{platform}")] + vec![format!("cp{major}{minor}-{abi_tag}-{platform}")] } StableAbiVersion::CurrentPython => { vec![format!( - "cp{major}{minor}-{wheel_tag}-{platform}", + "cp{major}{minor}-{abi_tag}-{platform}", major = interp.major, minor = interp.minor )] @@ -378,8 +378,9 @@ impl<'a> BuildOrchestrator<'a> { } } - /// Split interpreters into abi3-capable and non-abi3 groups, build the - /// appropriate wheel type for each group, and return all built wheels. + /// Split interpreters into stable-abi-capable and non-stable-abi groups, + /// build the appropriate wheel type for each group, and return all built + /// wheels. #[instrument(skip_all)] pub(crate) fn build_stable_abi_wheels( &self, @@ -393,7 +394,7 @@ impl<'a> BuildOrchestrator<'a> { .interpreter .iter() .filter(|interp| { - interp.has_stable_api() + interp.has_stable_api(stable_abi.kind) && min_version.is_none_or(|(major, minor)| { (interp.major as u8, interp.minor as u8) >= (major, minor) }) @@ -405,7 +406,7 @@ impl<'a> BuildOrchestrator<'a> { .interpreter .iter() .filter(|interp| { - !interp.has_stable_api() + !interp.has_stable_api(stable_abi.kind) || min_version.is_some_and(|(major, minor)| { (interp.major as u8, interp.minor as u8) < (major, minor) }) @@ -427,16 +428,18 @@ impl<'a> BuildOrchestrator<'a> { .collect(); if let Some((major, minor)) = min_version { bail!( - "None of the found Python interpreters ({}) are compatible with the abi3 \ + "None of the found Python interpreters ({}) are compatible with the {} \ minimum version (>= {}.{}). Please install a compatible Python interpreter.", interp_names.join(", "), + stable_abi.kind, major, minor, ); } else { bail!( - "No compatible Python interpreters found for abi3 build. \ + "No compatible Python interpreters found for {} build. \ Found: {}", + stable_abi.kind, interp_names.join(", "), ); } @@ -532,8 +535,8 @@ impl<'a> BuildOrchestrator<'a> { Ok(wheel_path) } - /// For abi3 we only need to build a single wheel and we don't even need a python interpreter - /// for it + /// For abi3 and abi3t we only need to build a single wheel and we don't + /// even need a python interpreter for it #[instrument(skip_all)] pub(crate) fn build_pyo3_wheel_stable_abi( &self, diff --git a/src/compile.rs b/src/compile.rs index 3105f7183..7875c06c0 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -19,6 +19,10 @@ use tracing::{debug, instrument, trace}; /// without `PYO3_NO_PYTHON` environment variable const PYO3_ABI3_NO_PYTHON_VERSION: (u64, u64, u64) = (0, 16, 4); +/// The first version of pyo3 that has a target_abi parameter in build +/// configuration files +const PYO3_TARGET_ABI_PARAMETER_VERSION: (u64, u64, u64) = (0, 29, 0); + /// crate types excluding `bin`, `cdylib` and `proc-macro` pub(crate) const LIB_CRATE_TYPES: [CrateType; 4] = [ CrateType::Lib, @@ -620,10 +624,18 @@ fn configure_macos_pyo3_linker_args( } // install_name is specific to the top-level output, so keep it in cargo_rustc.args - let use_abi3_suffix = - python_interpreter.is_some_and(|i| bridge_model.is_abi3_for_interpreter(i)); - let so_filename = if use_abi3_suffix { - format!("{module_name}.abi3.so") + let stable_abi_suffix = python_interpreter.and_then(|i| { + if bridge_model.is_stable_abi_for_interpreter(i) { + bridge_model + .pyo3() + .and_then(|pyo3| pyo3.stable_abi.map(|stable_abi| format!("{}", stable_abi))) + } else { + None + } + }); + + let so_filename = if let Some(suffix) = stable_abi_suffix { + format!("{module_name}.{suffix}.so") } else { python_interpreter .expect("missing python interpreter for non-abi3 wheel build") @@ -854,10 +866,11 @@ fn configure_pyo3_env( target: &Target, target_triple: &str, ) -> Result<()> { - // Only set PYO3_NO_PYTHON for true abi3 builds where the interpreter meets - // the abi3 minimum version. Version-specific fallback builds (e.g. Python - // 3.10 when abi3 targets ≥ 3.11) must not set PYO3_NO_PYTHON. - if python_interpreter.is_some_and(|i| bridge_model.is_abi3_for_interpreter(i)) { + // Only set PYO3_NO_PYTHON for stable ABI builds where the interpreter meets + // the minimum version supported for stable ABI builds. Version-specific + // fallback builds (e.g. Python 3.10 when abi3 targets ≥ 3.11) must not set + // PYO3_NO_PYTHON. + if python_interpreter.is_some_and(|i| bridge_model.is_stable_abi_for_interpreter(i)) { let is_pypy_or_graalpy = python_interpreter .map(|p| p.interpreter_kind.is_pypy() || p.interpreter_kind.is_graalpy()) .unwrap_or(false); @@ -897,8 +910,14 @@ fn configure_pyo3_env( // and legacy pyo3 versions build_command.env("PYTHON_SYS_EXECUTABLE", &interpreter.executable); } else if bridge_model.is_pyo3() && env::var_os("PYO3_CONFIG_FILE").is_none() { - let use_abi3 = bridge_model.is_abi3_for_interpreter(interpreter); - let pyo3_config = interpreter.pyo3_config_file(target, use_abi3); + let pyo3_ver = pyo3_version(&context.project.cargo_metadata) + .context("Failed to get pyo3 version from cargo metadata")?; + let use_stable_abi = bridge_model.is_stable_abi_for_interpreter(interpreter); + let pyo3_config = interpreter.pyo3_config_file( + target, + use_stable_abi, + pyo3_ver > PYO3_TARGET_ABI_PARAMETER_VERSION, + ); let maturin_target_dir = ensure_target_maturin_dir(&context.project.target_dir); let config_file = maturin_target_dir.join(format!( "pyo3-config-{}-{}.{}.txt", @@ -1133,6 +1152,7 @@ fn compile_target( #[instrument(skip_all)] pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> { let py_init = format!("PyInit_{module_name}"); + let py_modexport = format!("PyModExport_{module_name}"); let fd = File::open(artifact)?; // SAFETY: The caller stages (moves or copies) the artifact into a // private directory before invoking this function, so no concurrent @@ -1158,6 +1178,10 @@ pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> { found = true; break; } + if py_modexport == sym_name.strip_prefix('_').unwrap_or(&sym_name) { + found = true; + break; + } } if !found { for sym in macho.symbols() { @@ -1166,6 +1190,10 @@ pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> { found = true; break; } + if py_modexport == sym_name.strip_prefix('_').unwrap_or(sym_name) { + found = true; + break; + } } } } @@ -1179,7 +1207,7 @@ pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> { goblin::Object::PE(pe) => { for sym in &pe.exports { if let Some(sym_name) = sym.name - && py_init == sym_name + && (py_init == sym_name || py_modexport == sym_name) { found = true; break; @@ -1194,7 +1222,7 @@ pub fn warn_missing_py_init(artifact: &Path, module_name: &str) -> Result<()> { if !found { eprintln!( - "⚠️ Warning: Couldn't find the symbol `{py_init}` in the native library. \ + "⚠️ Warning: Couldn't find the symbol `{py_init}` or `{py_modexport}` in the native library. \ Python will fail to import this module. \ If you're using pyo3, check that `#[pymodule]` uses `{module_name}` as module name" ) diff --git a/src/module_writer/mod.rs b/src/module_writer/mod.rs index afd305fd8..6de52a9d0 100644 --- a/src/module_writer/mod.rs +++ b/src/module_writer/mod.rs @@ -648,6 +648,28 @@ Tag: cp37-abi3-manylinux2014_x86_64 Ok(()) } + #[test] + fn wheel_file_abi3t_expands_to_abi3_and_abi3t() -> Result<()> { + // abi3t wheels declare a compressed `abi3.abi3t` ABI tag because a single + // abi3t shared object is importable on both abi3-capable (GIL-enabled + // 3.15+) and free-threaded interpreters. The WHEEL file must expand the + // compressed tag into one Tag line per ABI. + let expected = format!( + "Wheel-Version: 1.0 +Generator: {name} ({version}) +Root-Is-Purelib: false +Tag: cp315-abi3-manylinux_2_17_x86_64 +Tag: cp315-abi3t-manylinux_2_17_x86_64 +", + name = env!("CARGO_PKG_NAME"), + version = env!("CARGO_PKG_VERSION"), + ); + let actual = wheel_file(&["cp315-abi3.abi3t-manylinux_2_17_x86_64".to_string()])?; + assert_eq!(expected, actual); + + Ok(()) + } + #[cfg(unix)] #[test] #[serial_test::serial] diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs index 96666cb32..c05ae6152 100644 --- a/src/python_interpreter/config.rs +++ b/src/python_interpreter/config.rs @@ -457,23 +457,47 @@ impl InterpreterConfig { } /// Generate pyo3 config file content - pub fn pyo3_config_file(&self, target: &Target, abi3: bool) -> String { + pub fn pyo3_config_file( + &self, + target: &Target, + use_stable_abi: bool, + use_target_abi: bool, + ) -> String { let build_flags = if self.gil_disabled { "Py_GIL_DISABLED" } else { "" }; - let mut content = format!( - r#"implementation={implementation} + let mut content = if use_target_abi { + let abi_kind = match (use_stable_abi, self.gil_disabled) { + (true, true) => "abi3t".to_string(), + (true, false) => "abi3".to_string(), + (false, true) => "free_threaded".to_string(), + (false, false) => "gil_enabled".to_string(), + }; + let target_abi = format!( + "{}-{}-{}.{}", + self.interpreter_kind, abi_kind, self.major, self.minor + ); + format!( + r#"target_abi={target_abi} +shared=true +build_flags={build_flags} +suppress_build_script_link_lines=false"# + ) + } else { + format!( + r#"implementation={implementation} version={major}.{minor} shared=true -abi3={abi3} +abi3={use_stable_abi} build_flags={build_flags} suppress_build_script_link_lines=false"#, - implementation = self.interpreter_kind, - major = self.major, - minor = self.minor, - ); + implementation = self.interpreter_kind, + major = self.major, + minor = self.minor, + ) + }; // On Android, pyo3 forces linking libpython. When abi3 is enabled, // pyo3's fixup_for_abi3_version downgrades the version to the abi3 // minimum (e.g. 3.7) and derives a wrong lib_name like "python3.7m". @@ -483,7 +507,7 @@ suppress_build_script_link_lines=false"#, // See https://github.com/PyO3/pyo3/issues/5960 // See https://github.com/python/cpython/issues/148544 if target.is_android() && self.interpreter_kind == InterpreterKind::CPython { - let lib_name = if abi3 { + let lib_name = if use_stable_abi { format!("python{}", self.major) } else { format!("python{}.{}{}", self.major, self.minor, self.abiflags) @@ -888,7 +912,7 @@ mod tests { let target = Target::from_resolved_target_triple("x86_64-unknown-linux-gnu").unwrap(); let sysconfig = InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 10), "").unwrap(); - let config_file = sysconfig.pyo3_config_file(&target, false); + let config_file = sysconfig.pyo3_config_file(&target, false, false); let expected = expect![[r#" implementation=CPython version=3.10 @@ -898,6 +922,14 @@ mod tests { suppress_build_script_link_lines=false pointer_width=64"#]]; expected.assert_eq(&config_file); + let config_file = sysconfig.pyo3_config_file(&target, false, true); + let expected = expect![[r#" + target_abi=CPython-gil_enabled-3.10 + shared=true + build_flags= + suppress_build_script_link_lines=false + pointer_width=64"#]]; + expected.assert_eq(&config_file); } #[test] @@ -906,7 +938,7 @@ mod tests { let sysconfig = InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 13), "t").unwrap(); assert_eq!(sysconfig.ext_suffix, ".cpython-313t-x86_64-linux-gnu.so"); - let config_file = sysconfig.pyo3_config_file(&target, false); + let config_file = sysconfig.pyo3_config_file(&target, false, false); let expected = expect![[r#" implementation=CPython version=3.13 @@ -916,6 +948,14 @@ mod tests { suppress_build_script_link_lines=false pointer_width=64"#]]; expected.assert_eq(&config_file); + let config_file = sysconfig.pyo3_config_file(&target, false, true); + let expected = expect![[r#" + target_abi=CPython-free_threaded-3.13 + shared=true + build_flags=Py_GIL_DISABLED + suppress_build_script_link_lines=false + pointer_width=64"#]]; + expected.assert_eq(&config_file); } #[test] @@ -924,7 +964,7 @@ mod tests { let sysconfig = InterpreterConfig::lookup_one(&target, InterpreterKind::CPython, (3, 11), "").unwrap(); assert_eq!(sysconfig.ext_suffix, ".cpython-311-x86_64-linux-musl.so"); - let config_file = sysconfig.pyo3_config_file(&target, false); + let config_file = sysconfig.pyo3_config_file(&target, false, false); let expected = expect![[r#" implementation=CPython version=3.11 @@ -934,6 +974,14 @@ mod tests { suppress_build_script_link_lines=false pointer_width=64"#]]; expected.assert_eq(&config_file); + let config_file = sysconfig.pyo3_config_file(&target, false, true); + let expected = expect![[r#" + target_abi=CPython-gil_enabled-3.11 + shared=true + build_flags= + suppress_build_script_link_lines=false + pointer_width=64"#]]; + expected.assert_eq(&config_file); } #[test] @@ -949,7 +997,7 @@ mod tests { gil_disabled: false, }; // Non-abi3: links against version-specific libpython3.14.so - let config_file = config.pyo3_config_file(&target, false); + let config_file = config.pyo3_config_file(&target, false, false); let expected = expect![[r#" implementation=CPython version=3.14 @@ -960,10 +1008,19 @@ mod tests { lib_name=python3.14 pointer_width=64"#]]; expected.assert_eq(&config_file); + let config_file = config.pyo3_config_file(&target, false, true); + let expected = expect![[r#" + target_abi=CPython-gil_enabled-3.14 + shared=true + build_flags= + suppress_build_script_link_lines=false + lib_name=python3.14 + pointer_width=64"#]]; + expected.assert_eq(&config_file); // Abi3: links against unversioned libpython3.so (stable ABI) // See https://github.com/python/cpython/issues/148544 - let config_file = config.pyo3_config_file(&target, true); + let config_file = config.pyo3_config_file(&target, true, false); let expected = expect![[r#" implementation=CPython version=3.14 @@ -974,5 +1031,14 @@ mod tests { lib_name=python3 pointer_width=64"#]]; expected.assert_eq(&config_file); + let config_file = config.pyo3_config_file(&target, true, true); + let expected = expect![[r#" + target_abi=CPython-abi3-3.14 + shared=true + build_flags= + suppress_build_script_link_lines=false + lib_name=python3 + pointer_width=64"#]]; + expected.assert_eq(&config_file); } } diff --git a/src/python_interpreter/discovery.rs b/src/python_interpreter/discovery.rs index 55e3a18a2..e4bcb738f 100644 --- a/src/python_interpreter/discovery.rs +++ b/src/python_interpreter/discovery.rs @@ -716,7 +716,7 @@ mod tests { "#]]; expected.assert_debug_eq(&pythons); - // pyo3 0.23+ should find free-threaded CPython + // pyo3 should find CPython 3.14t and newer (dropped support for 3.13t) let pythons = lookup_target( &target, None, diff --git a/src/python_interpreter/mod.rs b/src/python_interpreter/mod.rs index 75823a95b..6a95f6d15 100644 --- a/src/python_interpreter/mod.rs +++ b/src/python_interpreter/mod.rs @@ -1,6 +1,7 @@ pub use self::config::InterpreterConfig; use crate::Target; use crate::auditwheel::PlatformTag; +use crate::bridge::StableAbiKind; use anyhow::{Result, bail}; use std::fmt; use std::ops::Deref; @@ -113,7 +114,21 @@ impl Deref for PythonInterpreter { impl PythonInterpreter { /// Does this interpreter have PEP 384 stable api aka. abi3 support? - pub fn has_stable_api(&self) -> bool { + pub fn has_abi3(&self) -> bool { + if self.implementation_name.parse::().is_err() { + false + } else { + match self.interpreter_kind { + // Free-threaded python does not support abi3. All supported + // CPython GIL-enabled versions do support abi3 + InterpreterKind::CPython => !self.config.gil_disabled, + InterpreterKind::PyPy | InterpreterKind::GraalPy => false, + } + } + } + + /// Does this interpreter have PEP 803 stable api aka. abi3t support? + pub fn has_abi3t(&self) -> bool { if self.implementation_name.parse::().is_err() { false } else { @@ -127,6 +142,14 @@ impl PythonInterpreter { } } + /// Does this interpreter support either abi3 or abi3t? + pub fn has_stable_api(&self, kind: StableAbiKind) -> bool { + match kind { + StableAbiKind::Abi3 => self.has_abi3(), + StableAbiKind::Abi3t => self.has_abi3t(), + } + } + /// Returns the supported python environment in the PEP 425 format used for the wheel filename: /// {python tag}-{abi tag}-{platform tag} /// diff --git a/src/python_interpreter/resolver.rs b/src/python_interpreter/resolver.rs index 539e65aa8..b82af2651 100644 --- a/src/python_interpreter/resolver.rs +++ b/src/python_interpreter/resolver.rs @@ -18,7 +18,7 @@ use super::{InterpreterConfig, InterpreterKind, PythonInterpreter}; use crate::cross_compile::{ find_build_details, find_sysconfigdata, parse_build_details_json_file, parse_sysconfigdata, }; -use crate::{BridgeModel, Target}; +use crate::{BridgeModel, StableAbiKind, Target}; use anyhow::{Context, Result, bail, format_err}; use pep440_rs::VersionSpecifiers; use std::env; @@ -154,8 +154,8 @@ impl InterpreterSpec { format!("Invalid python interpreter minor version '{minor_str}', expect a digit") })?; - if (major, minor) < (3, 13) && abiflags == "t" { - bail!("Free-threaded Python interpreter is only supported on 3.13 and later."); + if (major, minor) < (3, 14) && abiflags == "t" { + bail!("Free-threaded Python interpreter is only supported on 3.14 and later."); } Ok(Some(InterpreterSpec { @@ -564,7 +564,7 @@ impl<'a> InterpreterResolver<'a> { let (abi3_capable, non_abi3): (Vec<_>, Vec<_>) = candidates .into_iter() - .partition(|c| c.interpreter.has_stable_api()); + .partition(|c| c.interpreter.has_stable_api(StableAbiKind::Abi3)); let mut result = abi3_capable; @@ -637,7 +637,7 @@ impl<'a> InterpreterResolver<'a> { // compatible interpreter on PATH (e.g. manylinux containers where // the system Python is older than the abi3 minimum). let has_compatible = candidates.iter().any(|c| { - c.interpreter.has_stable_api() + c.interpreter.has_stable_api(StableAbiKind::Abi3) && (c.interpreter.major as u8, c.interpreter.minor as u8) >= (major, minor) }); if has_compatible || !self.user_interpreters.is_empty() { @@ -969,10 +969,10 @@ mod tests { assert_eq!(spec.minor, 14); assert_eq!(spec.abiflags, "t"); - let spec = InterpreterSpec::parse("3.13t").unwrap().unwrap(); + let spec = InterpreterSpec::parse("3.14t").unwrap().unwrap(); assert_eq!(spec.kind, InterpreterKind::CPython); assert_eq!(spec.major, 3); - assert_eq!(spec.minor, 13); + assert_eq!(spec.minor, 14); assert_eq!(spec.abiflags, "t"); } @@ -980,7 +980,7 @@ mod tests { fn test_interpreter_spec_free_threaded_too_old() { let err = InterpreterSpec::parse("python3.12t").unwrap_err(); assert!( - err.to_string().contains("3.13"), + err.to_string().contains("3.14"), "expected version constraint in error: {err}" ); } diff --git a/src/templates/Cargo.toml.j2 b/src/templates/Cargo.toml.j2 index 19849f92b..c9aa01dcb 100644 --- a/src/templates/Cargo.toml.j2 +++ b/src/templates/Cargo.toml.j2 @@ -12,7 +12,7 @@ crate-type = ["cdylib"] [dependencies] {% if bindings == "pyo3" -%} -pyo3 = "0.28.3" +pyo3 = "0.29.0" {% elif bindings == "uniffi" -%} uniffi = "0.28.0" diff --git a/test-crates/lib_with_disallowed_lib/Cargo.lock b/test-crates/lib_with_disallowed_lib/Cargo.lock index 21e0dac03..7f58e49cf 100644 --- a/test-crates/lib_with_disallowed_lib/Cargo.lock +++ b/test-crates/lib_with_disallowed_lib/Cargo.lock @@ -69,8 +69,7 @@ dependencies = [ [[package]] name = "pyo3" version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +source = "git+https://github.com/pyo3/pyo3#504d46816eb928110c926aaf4b4ce2bb35f62c32" dependencies = [ "libc", "once_cell", @@ -83,8 +82,7 @@ dependencies = [ [[package]] name = "pyo3-build-config" version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +source = "git+https://github.com/pyo3/pyo3#504d46816eb928110c926aaf4b4ce2bb35f62c32" dependencies = [ "target-lexicon", ] @@ -92,8 +90,7 @@ dependencies = [ [[package]] name = "pyo3-ffi" version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +source = "git+https://github.com/pyo3/pyo3#504d46816eb928110c926aaf4b4ce2bb35f62c32" dependencies = [ "libc", "pyo3-build-config", @@ -102,8 +99,7 @@ dependencies = [ [[package]] name = "pyo3-macros" version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +source = "git+https://github.com/pyo3/pyo3#504d46816eb928110c926aaf4b4ce2bb35f62c32" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -114,12 +110,10 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" version = "0.28.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +source = "git+https://github.com/pyo3/pyo3#504d46816eb928110c926aaf4b4ce2bb35f62c32" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/lib_with_disallowed_lib/Cargo.toml b/test-crates/lib_with_disallowed_lib/Cargo.toml index aad660475..e56c47755 100644 --- a/test-crates/lib_with_disallowed_lib/Cargo.toml +++ b/test-crates/lib_with_disallowed_lib/Cargo.toml @@ -9,4 +9,4 @@ crate-type = ["cdylib"] [dependencies] libz-sys = { version = "1.1.2", default-features = false } -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } diff --git a/test-crates/lib_with_path_dep/Cargo.toml b/test-crates/lib_with_path_dep/Cargo.toml index e8caae3ba..e9081ad8e 100644 --- a/test-crates/lib_with_path_dep/Cargo.toml +++ b/test-crates/lib_with_path_dep/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } some_path_dep = { path = "../some_path_dep" } diff --git a/test-crates/parent_workspace_sdist/crates/pysof/Cargo.lock b/test-crates/parent_workspace_sdist/crates/pysof/Cargo.lock index 8da015cc8..4808a25f6 100644 --- a/test-crates/parent_workspace_sdist/crates/pysof/Cargo.lock +++ b/test-crates/parent_workspace_sdist/crates/pysof/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/parent_workspace_sdist/crates/pysof/Cargo.toml b/test-crates/parent_workspace_sdist/crates/pysof/Cargo.toml index b1f5affde..5e3825532 100644 --- a/test-crates/parent_workspace_sdist/crates/pysof/Cargo.toml +++ b/test-crates/parent_workspace_sdist/crates/pysof/Cargo.toml @@ -11,5 +11,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.28.3", features = ["extension-module"] } +pyo3 = { version = "0.29.0", features = ["extension-module"] } shared_crate = { path = "../shared_crate" } diff --git a/test-crates/pyo3-abi3-without-version/Cargo.lock b/test-crates/pyo3-abi3-without-version/Cargo.lock index 5a30659f2..9de5b1970 100644 --- a/test-crates/pyo3-abi3-without-version/Cargo.lock +++ b/test-crates/pyo3-abi3-without-version/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -58,18 +58,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -89,13 +89,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-abi3-without-version/Cargo.toml b/test-crates/pyo3-abi3-without-version/Cargo.toml index b24d07501..60f3ae10d 100644 --- a/test-crates/pyo3-abi3-without-version/Cargo.toml +++ b/test-crates/pyo3-abi3-without-version/Cargo.toml @@ -5,7 +5,7 @@ authors = ["konstin "] edition = "2021" [dependencies] -pyo3 = { version = "0.28.3", features = ["abi3"] } +pyo3 = { version = "0.29.0", features = ["abi3"] } [lib] name = "pyo3_abi3_without_version" diff --git a/test-crates/pyo3-abi3t-without-version/Cargo.lock b/test-crates/pyo3-abi3t-without-version/Cargo.lock new file mode 100644 index 000000000..a581474e3 --- /dev/null +++ b/test-crates/pyo3-abi3t-without-version/Cargo.lock @@ -0,0 +1,132 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pyo3" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" +dependencies = [ + "libc", + "once_cell", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", +] + +[[package]] +name = "pyo3-abi3t-without-version" +version = "0.1.0" +dependencies = [ + "pyo3", +] + +[[package]] +name = "pyo3-build-config" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" +dependencies = [ + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" diff --git a/test-crates/pyo3-abi3t-without-version/Cargo.toml b/test-crates/pyo3-abi3t-without-version/Cargo.toml new file mode 100644 index 000000000..da864f32c --- /dev/null +++ b/test-crates/pyo3-abi3t-without-version/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "pyo3-abi3t-without-version" +version = "0.1.0" +edition = "2021" + +[dependencies] +pyo3 = { version = "0.29.0", features = ["abi3t"] } + +[lib] +name = "pyo3_abi3t_without_version" +crate-type = ["cdylib"] diff --git a/test-crates/pyo3-abi3t-without-version/src/lib.rs b/test-crates/pyo3-abi3t-without-version/src/lib.rs new file mode 100644 index 000000000..e69de29bb diff --git a/test-crates/pyo3-abi3t/Cargo.lock b/test-crates/pyo3-abi3t/Cargo.lock new file mode 100644 index 000000000..e5f7332fc --- /dev/null +++ b/test-crates/pyo3-abi3t/Cargo.lock @@ -0,0 +1,132 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pyo3" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" +dependencies = [ + "libc", + "once_cell", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", +] + +[[package]] +name = "pyo3-abi3t" +version = "0.1.0" +dependencies = [ + "pyo3", +] + +[[package]] +name = "pyo3-build-config" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" +dependencies = [ + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" diff --git a/test-crates/pyo3-abi3t/Cargo.toml b/test-crates/pyo3-abi3t/Cargo.toml new file mode 100644 index 000000000..e0963f727 --- /dev/null +++ b/test-crates/pyo3-abi3t/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "pyo3-abi3t" +version = "0.1.0" +edition = "2021" +description = "Free-threaded stable ABI (abi3t) test crate for maturin" +license = "MIT" + +[dependencies] +pyo3 = { version = "0.29.0", features = [ + "abi3t-py315", + "generate-import-lib", +] } + +[lib] +name = "pyo3_abi3t" +crate-type = ["cdylib"] diff --git a/test-crates/pyo3-abi3t/README.md b/test-crates/pyo3-abi3t/README.md new file mode 100644 index 000000000..129ac29da --- /dev/null +++ b/test-crates/pyo3-abi3t/README.md @@ -0,0 +1,6 @@ +# pyo3-abi3t + +Test crate for the free-threaded stable ABI (`abi3t`) support in maturin. + +Requires the `opaque-pyobject` branch of https://github.com/ngoldbaum/pyo3, which provides the +`abi3t` and `abi3t-py3XY` features that maturin tests detect. diff --git a/test-crates/pyo3-abi3t/check_installed/check_installed.py b/test-crates/pyo3-abi3t/check_installed/check_installed.py new file mode 100644 index 000000000..5aa4c624b --- /dev/null +++ b/test-crates/pyo3-abi3t/check_installed/check_installed.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import pyo3_abi3t + +assert pyo3_abi3t.DummyClass.get_42() == 42 + +print("SUCCESS") diff --git a/test-crates/pyo3-abi3t/pyproject.toml b/test-crates/pyo3-abi3t/pyproject.toml new file mode 100644 index 000000000..00c3b4bea --- /dev/null +++ b/test-crates/pyo3-abi3t/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = ["maturin>=1.0,<2.0"] +build-backend = "maturin" + +[tool.maturin] +bindings = "pyo3" +editable-profile = "dev" + +[tool.maturin.target."x86_64-apple-darwin"] +macos-deployment-target = "10.12" + +[tool.maturin.target."aarch64-apple-darwin"] +macos-deployment-target = "11.0" + +[project] +name = "pyo3_abi3t" +version = "0.1.0" +classifiers = [ + "Programming Language :: Rust" +] +description = "Implements a dummy function in Rust using the free-threaded stable ABI" +readme = "README.md" +license = { text = "MIT" } diff --git a/test-crates/pyo3-abi3t/src/lib.rs b/test-crates/pyo3-abi3t/src/lib.rs new file mode 100644 index 000000000..865299cd8 --- /dev/null +++ b/test-crates/pyo3-abi3t/src/lib.rs @@ -0,0 +1,20 @@ +use pyo3::prelude::*; + +#[pyclass] +struct DummyClass {} + +#[pymethods] +impl DummyClass { + #[staticmethod] + fn get_42() -> PyResult { + Ok(42) + } +} + +#[pymodule] +fn pyo3_abi3t(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_class::()?; + m.add("fourtytwo", 42)?; + + Ok(()) +} diff --git a/test-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py b/test-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py new file mode 100644 index 000000000..c5e74c8ab --- /dev/null +++ b/test-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import pyo3_abi3t + +import pytest + + +def test_static(): + assert pyo3_abi3t.fourtytwo == 42 + + +def test_class(): + assert pyo3_abi3t.DummyClass.get_42() == 42 + + +def test_function(): + with pytest.raises(AssertionError): + assert pyo3_abi3t.DummyClass == 42 diff --git a/test-crates/pyo3-bin/Cargo.lock b/test-crates/pyo3-bin/Cargo.lock index f82bda9ce..29a99db9f 100644 --- a/test-crates/pyo3-bin/Cargo.lock +++ b/test-crates/pyo3-bin/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -58,18 +58,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -89,13 +89,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-bin/Cargo.toml b/test-crates/pyo3-bin/Cargo.toml index 19a43a1ef..b0c6aead1 100644 --- a/test-crates/pyo3-bin/Cargo.toml +++ b/test-crates/pyo3-bin/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -pyo3 = { version = "0.28.3", features = ["auto-initialize"] } +pyo3 = { version = "0.29.0", features = ["auto-initialize"] } diff --git a/test-crates/pyo3-feature/Cargo.lock b/test-crates/pyo3-feature/Cargo.lock index fa7669fd3..750c6c7dd 100644 --- a/test-crates/pyo3-feature/Cargo.lock +++ b/test-crates/pyo3-feature/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] @@ -67,9 +67,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -89,13 +89,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-feature/Cargo.toml b/test-crates/pyo3-feature/Cargo.toml index 108d01d78..fbda4220c 100644 --- a/test-crates/pyo3-feature/Cargo.toml +++ b/test-crates/pyo3-feature/Cargo.toml @@ -5,4 +5,4 @@ version = "0.7.3" edition = "2021" [dependencies] -pyo3 = { version = "0.28.3", optional = true } +pyo3 = { version = "0.29.0", optional = true } diff --git a/test-crates/pyo3-ffi-abi3t-py315/Cargo.lock b/test-crates/pyo3-ffi-abi3t-py315/Cargo.lock new file mode 100644 index 000000000..99d745998 --- /dev/null +++ b/test-crates/pyo3-ffi-abi3t-py315/Cargo.lock @@ -0,0 +1,41 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "pyo3-build-config" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" +dependencies = [ + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-ffi-abi3t-py315" +version = "0.1.0" +dependencies = [ + "pyo3-ffi", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" diff --git a/test-crates/pyo3-ffi-abi3t-py315/Cargo.toml b/test-crates/pyo3-ffi-abi3t-py315/Cargo.toml new file mode 100644 index 000000000..234ef9d06 --- /dev/null +++ b/test-crates/pyo3-ffi-abi3t-py315/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "pyo3-ffi-abi3t-py315" +version = "0.1.0" +edition = "2021" + +[dependencies] +pyo3-ffi = { version = "0.29.0", features = ["abi3t-py315"] } + +[lib] +name = "pyo3_ffi_abi3t_py315" +crate-type = ["cdylib"] diff --git a/test-crates/pyo3-ffi-abi3t-py315/src/lib.rs b/test-crates/pyo3-ffi-abi3t-py315/src/lib.rs new file mode 100644 index 000000000..e69de29bb diff --git a/test-crates/pyo3-ffi-pure/Cargo.lock b/test-crates/pyo3-ffi-pure/Cargo.lock index 1d6420e19..04fe455b5 100644 --- a/test-crates/pyo3-ffi-pure/Cargo.lock +++ b/test-crates/pyo3-ffi-pure/Cargo.lock @@ -10,18 +10,18 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", diff --git a/test-crates/pyo3-ffi-pure/Cargo.toml b/test-crates/pyo3-ffi-pure/Cargo.toml index 60acfa675..e54666a63 100644 --- a/test-crates/pyo3-ffi-pure/Cargo.toml +++ b/test-crates/pyo3-ffi-pure/Cargo.toml @@ -4,10 +4,10 @@ version = "1.0.0" edition = "2021" [dependencies] -pyo3-ffi = { version = "0.28.3", features = ["abi3-py39"] } +pyo3-ffi = { version = "0.29.0", features = ["abi3-py39", "abi3t-py315"] } [build-dependencies] -pyo3-build-config = "0.28.3" +pyo3-build-config = { version = "0.29.0" } [lib] name = "pyo3_ffi_pure" diff --git a/test-crates/pyo3-ffi-pure/src/lib.rs b/test-crates/pyo3-ffi-pure/src/lib.rs index b8d3c0ba4..809a28e80 100644 --- a/test-crates/pyo3-ffi-pure/src/lib.rs +++ b/test-crates/pyo3-ffi-pure/src/lib.rs @@ -1,7 +1,9 @@ -use std::ptr; +#[cfg(Py_3_15)] +use std::ffi::c_void; use pyo3_ffi::*; +#[cfg(not(Py_3_15))] static mut MODULE_DEF: PyModuleDef = PyModuleDef { m_base: PyModuleDef_HEAD_INIT, m_name: c"string_sum".as_ptr(), @@ -27,9 +29,31 @@ static mut METHODS: [PyMethodDef; 2] = [ PyMethodDef::zeroed(), ]; +#[cfg(Py_3_15)] +PyABIInfo_VAR!(ABI_INFO); + const SLOTS_LEN: usize = - 1 + if cfg!(Py_3_12) { 1 } else { 0 } + if cfg!(Py_GIL_DISABLED) { 1 } else { 0 }; + 1 + cfg!(Py_3_12) as usize + cfg!(Py_GIL_DISABLED) as usize + 4 * (cfg!(Py_3_15) as usize); + +#[cfg(Py_3_15)] +static mut SLOTS: [PySlot; SLOTS_LEN] = [ + PySlot_STATIC_DATA(Py_mod_abi, (&raw mut ABI_INFO).cast()), + PySlot_STATIC_DATA(Py_mod_name, c"string_sum".as_ptr() as *mut c_void), + PySlot_STATIC_DATA( + Py_mod_doc, + c"A Python module written in Rust.".as_ptr() as *mut c_void, + ), + PySlot_STATIC_DATA(Py_mod_methods, (&raw mut METHODS).cast()), + PySlot_DATA( + Py_mod_multiple_interpreters, + Py_MOD_PER_INTERPRETER_GIL_SUPPORTED, + ), + #[cfg(Py_GIL_DISABLED)] + PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED), + PySlot_END(), +]; +#[cfg(not(Py_3_15))] static mut SLOTS: [PyModuleDef_Slot; SLOTS_LEN] = [ // NB: only include this slot if the module does not store any global state in `static` variables // or other data which could cross between subinterpreters @@ -46,17 +70,25 @@ static mut SLOTS: [PyModuleDef_Slot; SLOTS_LEN] = [ }, PyModuleDef_Slot { slot: 0, - value: ptr::null_mut(), + value: std::ptr::null_mut(), }, ]; -// The module initialization function, which must be named `PyInit_`. -#[allow(non_snake_case)] +// The module initialization function +#[cfg(not(Py_3_15))] +#[allow(non_snake_case, reason = "must be named `PyInit_`")] #[no_mangle] pub unsafe extern "C" fn PyInit_pyo3_ffi_pure() -> *mut PyObject { - PyModuleDef_Init(ptr::addr_of_mut!(MODULE_DEF)) + PyModuleDef_Init(&raw mut MODULE_DEF) } +#[cfg(Py_3_15)] +#[allow(non_snake_case, reason = "must be named `PyModExport_`")] +#[no_mangle] +pub unsafe extern "C" fn PyModExport_pyo3_ffi_pure() -> *mut PyModuleDef_Slot { + (&raw mut SLOTS).cast() +} // The module initialization function, which must be named `PyInit_`. + #[no_mangle] pub unsafe extern "C" fn sum( _self: *mut PyObject, diff --git a/test-crates/pyo3-mixed-include-exclude/Cargo.lock b/test-crates/pyo3-mixed-include-exclude/Cargo.lock index 844bcddc7..6c8f0ac97 100644 --- a/test-crates/pyo3-mixed-include-exclude/Cargo.lock +++ b/test-crates/pyo3-mixed-include-exclude/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "cc" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" -dependencies = [ - "libc", -] - [[package]] name = "heck" version = "0.5.0" @@ -46,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -60,19 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -80,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -92,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] @@ -110,15 +99,6 @@ dependencies = [ "pyo3", ] -[[package]] -name = "python3-dll-a" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b" -dependencies = [ - "cc", -] - [[package]] name = "quote" version = "1.0.45" diff --git a/test-crates/pyo3-mixed-include-exclude/Cargo.toml b/test-crates/pyo3-mixed-include-exclude/Cargo.toml index 5d5f6b377..5379fc5a9 100644 --- a/test-crates/pyo3-mixed-include-exclude/Cargo.toml +++ b/test-crates/pyo3-mixed-include-exclude/Cargo.toml @@ -6,7 +6,7 @@ description = "Implements a dummy function combining rust and python" edition = "2021" [dependencies] -pyo3 = { version = "0.28.3", features = ["generate-import-lib"] } +pyo3 = { version = "0.29.0", features = ["generate-import-lib"] } [lib] name = "pyo3_mixed_include_exclude" diff --git a/test-crates/pyo3-mixed-py-subdir/Cargo.lock b/test-crates/pyo3-mixed-py-subdir/Cargo.lock index 0b37fa99b..65b41a37c 100644 --- a/test-crates/pyo3-mixed-py-subdir/Cargo.lock +++ b/test-crates/pyo3-mixed-py-subdir/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-mixed-py-subdir/Cargo.toml b/test-crates/pyo3-mixed-py-subdir/Cargo.toml index eea0ccdea..ec0e4fe0d 100644 --- a/test-crates/pyo3-mixed-py-subdir/Cargo.toml +++ b/test-crates/pyo3-mixed-py-subdir/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" edition = "2021" [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } [lib] name = "pyo3_mixed_py_subdir" diff --git a/test-crates/pyo3-mixed-src/rust/Cargo.lock b/test-crates/pyo3-mixed-src/rust/Cargo.lock index f8e5eeef1..9bc19d354 100644 --- a/test-crates/pyo3-mixed-src/rust/Cargo.lock +++ b/test-crates/pyo3-mixed-src/rust/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - [[package]] name = "heck" version = "0.5.0" @@ -43,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -57,19 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -77,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -89,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] @@ -107,15 +99,6 @@ dependencies = [ "pyo3", ] -[[package]] -name = "python3-dll-a" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b" -dependencies = [ - "cc", -] - [[package]] name = "quote" version = "1.0.45" diff --git a/test-crates/pyo3-mixed-src/rust/Cargo.toml b/test-crates/pyo3-mixed-src/rust/Cargo.toml index 12ecfd112..3dd63e936 100644 --- a/test-crates/pyo3-mixed-src/rust/Cargo.toml +++ b/test-crates/pyo3-mixed-src/rust/Cargo.toml @@ -6,7 +6,7 @@ description = "Implements a dummy function combining rust and python" edition = "2021" [dependencies] -pyo3 = { version = "0.28.3", features = ["generate-import-lib"] } +pyo3 = { version = "0.29.0", features = ["generate-import-lib"] } [lib] name = "pyo3_mixed_src" diff --git a/test-crates/pyo3-mixed-workspace/rust/Cargo.lock b/test-crates/pyo3-mixed-workspace/rust/Cargo.lock index 5d228353b..c2548336b 100644 --- a/test-crates/pyo3-mixed-workspace/rust/Cargo.lock +++ b/test-crates/pyo3-mixed-workspace/rust/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "heck" version = "0.5.0" @@ -46,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -60,19 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -80,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -92,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] @@ -115,15 +104,6 @@ dependencies = [ "pyo3-mixed-workspace", ] -[[package]] -name = "python3-dll-a" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b" -dependencies = [ - "cc", -] - [[package]] name = "quote" version = "1.0.45" diff --git a/test-crates/pyo3-mixed-workspace/rust/python/pyo3-mixed-workspace-py/Cargo.toml b/test-crates/pyo3-mixed-workspace/rust/python/pyo3-mixed-workspace-py/Cargo.toml index d6963f9ed..cc6ecdae1 100644 --- a/test-crates/pyo3-mixed-workspace/rust/python/pyo3-mixed-workspace-py/Cargo.toml +++ b/test-crates/pyo3-mixed-workspace/rust/python/pyo3-mixed-workspace-py/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] pyo3-mixed-workspace = { path = "../../pyo3-mixed-workspace" } -pyo3 = { version = "0.28.3", features = ["generate-import-lib", ] } +pyo3 = { version = "0.29.0", features = ["generate-import-lib", ] } [lib] name = "pyo3_mixed_workspace_py" diff --git a/test-crates/pyo3-mixed/Cargo.lock b/test-crates/pyo3-mixed/Cargo.lock index 84a98c7c5..2fbcfa35c 100644 --- a/test-crates/pyo3-mixed/Cargo.lock +++ b/test-crates/pyo3-mixed/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "cc" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" -dependencies = [ - "libc", -] - [[package]] name = "heck" version = "0.5.0" @@ -46,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -60,19 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -80,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -92,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] @@ -110,15 +99,6 @@ dependencies = [ "pyo3", ] -[[package]] -name = "python3-dll-a" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b" -dependencies = [ - "cc", -] - [[package]] name = "quote" version = "1.0.45" diff --git a/test-crates/pyo3-mixed/Cargo.toml b/test-crates/pyo3-mixed/Cargo.toml index cb6aaa32e..30146ed97 100644 --- a/test-crates/pyo3-mixed/Cargo.toml +++ b/test-crates/pyo3-mixed/Cargo.toml @@ -6,7 +6,7 @@ description = "Implements a dummy function combining rust and python" edition = "2021" [dependencies] -pyo3 = { version = "0.28.3", features = ["generate-import-lib"] } +pyo3 = { version = "0.29.0", features = ["generate-import-lib"] } [lib] name = "pyo3_mixed" diff --git a/test-crates/pyo3-pure/Cargo.lock b/test-crates/pyo3-pure/Cargo.lock index 9159ce251..b95fb0447 100644 --- a/test-crates/pyo3-pure/Cargo.lock +++ b/test-crates/pyo3-pure/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "cc" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" -dependencies = [ - "libc", -] - [[package]] name = "heck" version = "0.5.0" @@ -50,9 +41,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -64,19 +55,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ - "python3-dll-a", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -84,9 +74,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -96,13 +86,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] @@ -114,15 +103,6 @@ dependencies = [ "pyo3", ] -[[package]] -name = "python3-dll-a" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b" -dependencies = [ - "cc", -] - [[package]] name = "quote" version = "1.0.45" diff --git a/test-crates/pyo3-pure/Cargo.toml b/test-crates/pyo3-pure/Cargo.toml index 046044843..b2240d582 100644 --- a/test-crates/pyo3-pure/Cargo.toml +++ b/test-crates/pyo3-pure/Cargo.toml @@ -7,8 +7,8 @@ description = "Implements a dummy function (get_fortytwo.DummyClass.get_42()) in license = "MIT" [dependencies] -pyo3 = { version = "0.28.3", features = [ - "abi3-py37", +pyo3 = { version = "0.29.0", features = [ + "abi3-py39", "generate-import-lib", ] } diff --git a/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.lock b/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.lock index 0b37fa99b..65b41a37c 100644 --- a/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.lock +++ b/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.toml b/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.toml index 3ce71b6ba..f131e31d8 100644 --- a/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.toml +++ b/test-crates/pyo3-stub-generation-mixed-py-subdir/Cargo.toml @@ -6,7 +6,7 @@ description = "Implements a dummy function combining rust and python" edition = "2024" [dependencies] -pyo3 = { version = "0.28.3", features = ["experimental-inspect"] } +pyo3 = { version = "0.29.0", features = ["experimental-inspect"] } [lib] name = "pyo3_mixed_py_subdir" diff --git a/test-crates/pyo3-stub-generation-mixed/Cargo.lock b/test-crates/pyo3-stub-generation-mixed/Cargo.lock index 769a17325..85c611a65 100644 --- a/test-crates/pyo3-stub-generation-mixed/Cargo.lock +++ b/test-crates/pyo3-stub-generation-mixed/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-stub-generation-mixed/Cargo.toml b/test-crates/pyo3-stub-generation-mixed/Cargo.toml index e7f2040cf..38146a69f 100644 --- a/test-crates/pyo3-stub-generation-mixed/Cargo.toml +++ b/test-crates/pyo3-stub-generation-mixed/Cargo.toml @@ -6,7 +6,7 @@ description = "Implements a dummy function combining rust and python" edition = "2024" [dependencies] -pyo3 = { version = "0.28.3", features = ["experimental-inspect"] } +pyo3 = { version = "0.29.0", features = ["experimental-inspect"] } [lib] name = "pyo3_stub_generation_mixed" diff --git a/test-crates/pyo3-stub-generation-pure/Cargo.lock b/test-crates/pyo3-stub-generation-pure/Cargo.lock index b23baf14e..a37962c1c 100644 --- a/test-crates/pyo3-stub-generation-pure/Cargo.lock +++ b/test-crates/pyo3-stub-generation-pure/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/pyo3-stub-generation-pure/Cargo.toml b/test-crates/pyo3-stub-generation-pure/Cargo.toml index e67081dc8..bbfb7b828 100644 --- a/test-crates/pyo3-stub-generation-pure/Cargo.toml +++ b/test-crates/pyo3-stub-generation-pure/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" edition = "2024" [dependencies] -pyo3 = { version = "0.28.3", features = ["experimental-inspect"] } +pyo3 = { version = "0.29.0", features = ["experimental-inspect"] } [lib] name = "pyo3_stub_generation_pure" diff --git a/test-crates/readme-duplication/Cargo.lock b/test-crates/readme-duplication/Cargo.lock index 2a5b969a8..8844e8741 100644 --- a/test-crates/readme-duplication/Cargo.lock +++ b/test-crates/readme-duplication/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/readme-duplication/readme-py/Cargo.toml b/test-crates/readme-duplication/readme-py/Cargo.toml index a21aff1b3..11b25c155 100644 --- a/test-crates/readme-duplication/readme-py/Cargo.toml +++ b/test-crates/readme-duplication/readme-py/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["cdylib"] [dependencies] readme-rs = { path = "../readme-rs" } -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } diff --git a/test-crates/sdist_with_path_dep/Cargo.lock b/test-crates/sdist_with_path_dep/Cargo.lock index 3b30bd38c..9d2186d03 100644 --- a/test-crates/sdist_with_path_dep/Cargo.lock +++ b/test-crates/sdist_with_path_dep/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/sdist_with_path_dep/Cargo.toml b/test-crates/sdist_with_path_dep/Cargo.toml index 36b66ea7d..2242a8de1 100644 --- a/test-crates/sdist_with_path_dep/Cargo.toml +++ b/test-crates/sdist_with_path_dep/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } some_path_dep = { path = "../some_path_dep" } diff --git a/test-crates/sdist_with_target_path_dep/Cargo.lock b/test-crates/sdist_with_target_path_dep/Cargo.lock index 220362121..d738787ca 100644 --- a/test-crates/sdist_with_target_path_dep/Cargo.lock +++ b/test-crates/sdist_with_target_path_dep/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -51,18 +51,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -82,13 +82,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/sdist_with_target_path_dep/Cargo.toml b/test-crates/sdist_with_target_path_dep/Cargo.toml index 4fd20e84f..83dbb2450 100644 --- a/test-crates/sdist_with_target_path_dep/Cargo.toml +++ b/test-crates/sdist_with_target_path_dep/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } [target.'cfg(not(target_endian = "all-over-the-place"))'.dependencies] some_path_dep = { path = "../some_path_dep" } diff --git a/test-crates/workspace-inheritance/Cargo.lock b/test-crates/workspace-inheritance/Cargo.lock index 4a594bb78..cc252e93e 100644 --- a/test-crates/workspace-inheritance/Cargo.lock +++ b/test-crates/workspace-inheritance/Cargo.lock @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -79,18 +79,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -98,9 +98,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -110,13 +110,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/workspace-inheritance/python/Cargo.toml b/test-crates/workspace-inheritance/python/Cargo.toml index 9d5df7022..9f7f30c15 100644 --- a/test-crates/workspace-inheritance/python/Cargo.toml +++ b/test-crates/workspace-inheritance/python/Cargo.toml @@ -9,7 +9,7 @@ name = "workspace_inheritance" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } generic_lib.workspace = true [dependencies.libc] diff --git a/test-crates/workspace-inverted-order/Cargo.lock b/test-crates/workspace-inverted-order/Cargo.lock index 46003383e..562b003cb 100644 --- a/test-crates/workspace-inverted-order/Cargo.lock +++ b/test-crates/workspace-inverted-order/Cargo.lock @@ -45,9 +45,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -59,18 +59,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -90,13 +90,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/workspace-inverted-order/path-dep-with-root/Cargo.toml b/test-crates/workspace-inverted-order/path-dep-with-root/Cargo.toml index 42fc6216b..6c87028d5 100644 --- a/test-crates/workspace-inverted-order/path-dep-with-root/Cargo.toml +++ b/test-crates/workspace-inverted-order/path-dep-with-root/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["lib", "cdylib"] [dependencies] top_level = { path = "../" } -pyo3 = { version = "0.28.3", features = [ +pyo3 = { version = "0.29.0", features = [ "abi3", "abi3-py38", ] } diff --git a/test-crates/workspace_with_path_dep/Cargo.lock b/test-crates/workspace_with_path_dep/Cargo.lock index b8e44576a..a44a3a864 100644 --- a/test-crates/workspace_with_path_dep/Cargo.lock +++ b/test-crates/workspace_with_path_dep/Cargo.lock @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12" +checksum = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c" dependencies = [ "libc", "once_cell", @@ -62,18 +62,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e" +checksum = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e" +checksum = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b" dependencies = [ "libc", "pyo3-build-config", @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813" +checksum = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -93,13 +93,12 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.28.3" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb" +checksum = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362" dependencies = [ "heck", "proc-macro2", - "pyo3-build-config", "quote", "syn", ] diff --git a/test-crates/workspace_with_path_dep/python/Cargo.toml b/test-crates/workspace_with_path_dep/python/Cargo.toml index 708ab2727..071e59884 100644 --- a/test-crates/workspace_with_path_dep/python/Cargo.toml +++ b/test-crates/workspace_with_path_dep/python/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.3" +pyo3 = { version = "0.29.0" } generic_lib = { path = "../generic_lib" } diff --git a/tests/common/mod.rs b/tests/common/mod.rs index 4b29b080a..d5d97bece 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -215,6 +215,36 @@ pub fn test_python_implementation() -> Result { get_python_implementation(&python) } +/// Returns `(major, minor)` of the current tested Python interpreter. +pub fn test_python_version() -> Result<(u32, u32)> { + let python = test_python_path().map(PathBuf::from).unwrap_or_else(|| { + let target = Target::from_target_triple(None).unwrap(); + target.get_python() + }); + let code = "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}', end='')"; + let output = Command::new(&python).arg("-c").arg(code).output()?; + let version = str::from_utf8(&output.stdout)?.trim(); + let (major, minor) = version + .split_once('.') + .with_context(|| format!("unexpected python version output: {version:?}"))?; + Ok((major.parse()?, minor.parse()?)) +} + +/// Returns true when the current tested Python supports the abi3t stable ABI +/// (CPython >= 3.15). PyPy / GraalPy never support abi3t. +pub fn test_python_supports_abi3t() -> bool { + if test_python_implementation() + .map(|impl_name| impl_name != "cpython") + .unwrap_or(true) + { + return false; + } + match test_python_version() { + Ok((major, minor)) => (major, minor) >= (3, 15), + Err(_) => false, + } +} + /// Create virtualenv pub fn create_virtualenv(name: &str, python_interp: Option) -> Result<(PathBuf, PathBuf)> { let interp = python_interp.or_else(|| test_python_path().map(PathBuf::from)); diff --git a/tests/common/other.rs b/tests/common/other.rs index de7d46fdf..3a0e5ab3d 100644 --- a/tests/common/other.rs +++ b/tests/common/other.rs @@ -465,6 +465,7 @@ pub fn abi3_python_interpreter_args() -> Result<()> { } pub fn abi3_without_version() -> Result<()> { + let python = crate::common::test_python_path().unwrap_or_else(|| "python3".to_string()); // The first argument is ignored by clap let cli = vec![ "build", @@ -472,7 +473,7 @@ pub fn abi3_without_version() -> Result<()> { "test-crates/pyo3-abi3-without-version/Cargo.toml", "--quiet", "--interpreter", - "python3", + python.as_str(), "--target-dir", "test-targets/wheels/abi3_without_version", ]; @@ -488,6 +489,31 @@ pub fn abi3_without_version() -> Result<()> { Ok(()) } +pub fn abi3t_without_version() -> Result<()> { + let python = crate::common::test_python_path().unwrap_or_else(|| "python3".to_string()); + // The first argument is ignored by clap + let cli = vec![ + "build", + "--manifest-path", + "test-crates/pyo3-abi3t-without-version/Cargo.toml", + "--quiet", + "--interpreter", + python.as_str(), + "--target-dir", + "test-targets/wheels/abi3t_without_version", + ]; + + let options = BuildOptions::try_parse_from(cli)?; + let result = options + .into_build_context() + .strip(Some(cfg!(feature = "faster-tests"))) + .editable(false) + .build(); + assert!(result.is_ok()); + + Ok(()) +} + /// Test that builds succeed even when there are unreadable directories in the project root. /// /// See https://github.com/PyO3/maturin/issues/2777 diff --git a/tests/run/errors.rs b/tests/run/errors.rs index 828bbdc29..4c75351ab 100644 --- a/tests/run/errors.rs +++ b/tests/run/errors.rs @@ -1,4 +1,4 @@ -use crate::common::{errors, handle_result, test_python_implementation}; +use crate::common::{errors, handle_result, test_python_implementation, test_python_version}; #[test] #[cfg_attr( @@ -17,7 +17,9 @@ use crate::common::{errors, handle_result, test_python_implementation}; ignore )] fn pyo3_no_extension_module() { - if test_python_implementation().unwrap() == "cpython" { + if test_python_implementation().unwrap() == "cpython" + && test_python_version().unwrap() < (3, 15) + { handle_result(errors::pyo3_no_extension_module()) } } diff --git a/tests/run/integration.rs b/tests/run/integration.rs index b58e24205..ba1a1db71 100644 --- a/tests/run/integration.rs +++ b/tests/run/integration.rs @@ -3,7 +3,7 @@ use crate::common::other; use crate::common::{ CFFI_MIXED_IMPLICIT_COPY, CFFI_MIXED_INCLUDE_EXCLUDE_COPY, CFFI_MIXED_PY_SUBDIR_COPY, CFFI_MIXED_SRC_COPY, CFFI_MIXED_SUBMODULE_COPY, CFFI_MIXED_WITH_PATH_DEP_COPY, handle_result, - has_conda, has_uniffi_bindgen, is_ci, test_python_implementation, + has_conda, has_uniffi_bindgen, is_ci, test_python_implementation, test_python_supports_abi3t, }; use std::path::Path; @@ -168,6 +168,28 @@ fn abi3_without_version() { handle_result(other::abi3_without_version()) } +#[test] +fn abi3t_without_version() { + // abi3t requires CPython >= 3.15 (PEP 803). On older runners the build + // would reject the only available interpreter, so skip cleanly. + if !test_python_supports_abi3t() { + return; + } + handle_result(other::abi3t_without_version()) +} + +#[test] +fn integration_pyo3_abi3t() { + // abi3t requires CPython >= 3.15 (PEP 803). + if !test_python_supports_abi3t() { + return; + } + handle_result(integration::test_integration(&IntegrationCase::new( + "integration-pyo3-abi3t", + "test-crates/pyo3-abi3t", + ))); +} + #[test] fn abi3_python_interpreter_args() { handle_result(other::abi3_python_interpreter_args()); diff --git a/tests/run/sdist.rs b/tests/run/sdist.rs index 5834e667c..2e21e89a2 100644 --- a/tests/run/sdist.rs +++ b/tests/run/sdist.rs @@ -2,7 +2,7 @@ use crate::common::{handle_result, other}; use expect_test::expect; use indoc::indoc; use maturin::pyproject_toml::SdistGenerator; -use maturin::{BuildOptions, BuildOrchestrator, CargoOptions, OutputOptions, unpack_sdist}; +use maturin::{unpack_sdist, BuildOptions, BuildOrchestrator, CargoOptions, OutputOptions}; use std::path::{Path, PathBuf}; use std::process::Command; use url::Url; @@ -486,8 +486,8 @@ fn workspace_members_non_local_dep_sdist() { readme = "README.md" [dependencies] - pyo3 = { version = "0.28.3", features = [ - "abi3-py37", + pyo3 = { version = "0.29.0", features = [ + "abi3-py39", "generate-import-lib", ] } @@ -558,7 +558,7 @@ fn lib_with_target_path_dep_sdist() { crate-type = ["cdylib"] [dependencies] - pyo3 = "0.28.3" + pyo3 = { version = "0.29.0" } [target.'cfg(not(target_endian = "all-over-the-place"))'.dependencies] some_path_dep = { path = "../some_path_dep" } @@ -661,39 +661,33 @@ fn lib_with_parent_workspace_git_dep_sdist() { ) .unwrap(); fs_err::write(git_dep_dir.join("src/lib.rs"), "pub fn from_git() {}\n").unwrap(); - assert!( - Command::new("git") - .args(["init", "--initial-branch=main", "-q"]) - .current_dir(&git_dep_dir) - .status() - .unwrap() - .success() - ); - assert!( - Command::new("git") - .args(["add", "."]) - .current_dir(&git_dep_dir) - .status() - .unwrap() - .success() - ); - assert!( - Command::new("git") - .args([ - "-c", - "user.name=maturin-tests", - "-c", - "user.email=maturin-tests@example.com", - "commit", - "-q", - "-m", - "init", - ]) - .current_dir(&git_dep_dir) - .status() - .unwrap() - .success() - ); + assert!(Command::new("git") + .args(["init", "--initial-branch=main", "-q"]) + .current_dir(&git_dep_dir) + .status() + .unwrap() + .success()); + assert!(Command::new("git") + .args(["add", "."]) + .current_dir(&git_dep_dir) + .status() + .unwrap() + .success()); + assert!(Command::new("git") + .args([ + "-c", + "user.name=maturin-tests", + "-c", + "user.email=maturin-tests@example.com", + "commit", + "-q", + "-m", + "init", + ]) + .current_dir(&git_dep_dir) + .status() + .unwrap() + .success()); let git_dep_url = Url::from_directory_path(&git_dep_dir) .expect("git dependency path should convert to file:// URL") @@ -763,7 +757,7 @@ fn lib_with_parent_workspace_git_dep_sdist() { crate-type = ["cdylib"] [dependencies] - pyo3 = { version = "0.28.3", features = ["extension-module"] } + pyo3 = { version = "0.29.0", features = ["extension-module"] } shared_crate = { path = "../shared_crate" } "# ), @@ -906,7 +900,7 @@ fn lib_with_parent_workspace_lints_sdist() { crate-type = ["cdylib"] [dependencies] - pyo3 = { version = "0.28.3", features = ["extension-module"] } + pyo3 = { version = "0.29.0", features = ["extension-module"] } shared_crate = { path = "../shared_crate" } "# ),