Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/notes/2.32.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ The version of [Pex](https://github.com/pex-tool/pex) used by the Python backend

### Plugin API changes

PyO3, the interface crate between Rust and Python, has been upgraded to v0.28.3.

## Full Changelog

For the full changelog, see the individual GitHub Releases for this series: <https://github.com/pantsbuild/pants/releases>
44 changes: 13 additions & 31 deletions src/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ prodash = { git = "https://github.com/stuhood/prodash", rev = "stuhood/raw-messa
prost = "0.13"
prost-build = "0.13"
prost-types = "0.13"
pyo3 = { version = "0.27.2", features = ["parking_lot"] }
pyo3-build-config = "0.27.2"
pyo3 = { version = "0.28.3", features = ["parking_lot"] }
pyo3-build-config = "0.28.3"
rand = "0.10.0"
regex = "1.12.3"
reqwest = { version = "0.12", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ fn split_on_longest_dir_prefix<'a, 'b>(
matched
}

#[pyclass(name = "Address")]
#[pyclass(name = "Address", from_py_object)]
#[derive(Clone, Hash, Eq, PartialEq, Ord, PartialOrd)]
pub struct Address {
// NB: Field ordering is deliberate, so that Ord will roughly match `self.spec`.
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/src/externs/dep_inference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub(crate) fn register(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<PyInferenceMetadata>()
}

#[pyclass(name = "InferenceMetadata")]
#[pyclass(name = "InferenceMetadata", from_py_object)]
#[derive(Clone, Debug, PartialEq)]
pub struct PyInferenceMetadata(pub dependency_inference_request::Metadata);

Expand Down Expand Up @@ -78,7 +78,7 @@ impl PyInferenceMetadata {
}
}

#[pyclass(name = "NativeDependenciesRequest")]
#[pyclass(name = "NativeDependenciesRequest", from_py_object)]
#[derive(Clone, Debug, PartialEq)]
pub struct PyNativeDependenciesRequest {
pub directory_digest: DirectoryDigest,
Expand Down
22 changes: 17 additions & 5 deletions src/rust/engine/src/externs/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn possible_store_missing_digest(e: store::StoreError) -> PyErr {
failure.into()
}

#[pyclass(name = "Digest")]
#[pyclass(name = "Digest", from_py_object)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct PyDigest(pub DirectoryDigest);

Expand Down Expand Up @@ -114,7 +114,7 @@ impl PyDigest {
}
}

#[pyclass(name = "FileDigest")]
#[pyclass(name = "FileDigest", from_py_object)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PyFileDigest(pub Digest);

Expand Down Expand Up @@ -501,7 +501,12 @@ impl PyFilespecMatcher {
// -----------------------------------------------------------------------------

/// The kind of path (e.g., file, directory, symlink) as identified in `PathMetadata`
#[pyclass(name = "PathMetadataKind", rename_all = "UPPERCASE", eq)]
#[pyclass(
name = "PathMetadataKind",
rename_all = "UPPERCASE",
eq,
from_py_object
)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum PyPathMetadataKind {
File,
Expand Down Expand Up @@ -530,7 +535,7 @@ impl From<PyPathMetadataKind> for fs::PathMetadataKind {
}

/// Expanded version of `Stat` when access to additional filesystem attributes is necessary.
#[pyclass(name = "PathMetadata")]
#[pyclass(name = "PathMetadata", from_py_object)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PyPathMetadata(pub fs::PathMetadata);

Expand Down Expand Up @@ -652,7 +657,14 @@ impl PyPathMetadata {
}

/// The path's namespace (to separate buildroot and system paths)
#[pyclass(name = "PathNamespace", rename_all = "UPPERCASE", frozen, eq, hash)]
#[pyclass(
name = "PathNamespace",
rename_all = "UPPERCASE",
frozen,
eq,
hash,
from_py_object
)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum PyPathNamespace {
Workspace,
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ create_exception!(native_engine, EngineError, PyException);
create_exception!(native_engine, IntrinsicError, EngineError);
create_exception!(native_engine, IncorrectProductError, EngineError);

#[pyclass(from_py_object)]
#[derive(Clone)]
#[pyclass]
pub struct PyFailure(pub Failure);

#[pymethods]
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) fn register(m: &Bound<'_, PyModule>) -> PyResult<()> {
Ok(())
}

#[pyclass(name = "ProcessExecutionEnvironment")]
#[pyclass(name = "ProcessExecutionEnvironment", from_py_object)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PyProcessExecutionEnvironment {
pub environment: ProcessExecutionEnvironment,
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn validate_choices(
Ok(())
}

#[pyclass(name = "_NoValue")]
#[pyclass(name = "_NoValue", from_py_object)]
#[derive(Clone)]
struct NoFieldValue;

Expand Down
Loading