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
5 changes: 5 additions & 0 deletions pyo3-bytes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 0.7.1 - 2026-06-17

Add `#[derive(Clone)]` and `#[derive(Default)]` to `PyBytes`.
2 changes: 1 addition & 1 deletion pyo3-bytes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3-bytes"
version = "0.7.0"
version = "0.7.1"
authors = [
"Kyle Barron <kyle@developmentseed.org>",
"jesse rubin <jesse@dgi.com>",
Expand Down
11 changes: 9 additions & 2 deletions pyo3-bytes/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ use pyo3::{ffi, IntoPyObjectExt};
/// data view without copies. In Python, this `PyBytes` object can be passed to Python `bytes` or
/// `memoryview` constructors, `numpy.frombuffer`, or any other function that supports buffer
/// protocol input.
#[pyclass(name = "Bytes", subclass, frozen, sequence, weakref)]
#[derive(Hash, PartialEq, PartialOrd, Eq, Ord)]
#[pyclass(
name = "Bytes",
subclass,
frozen,
sequence,
weakref,
skip_from_py_object
)]
#[derive(Clone, Default, Hash, PartialEq, PartialOrd, Eq, Ord)]
pub struct PyBytes(Bytes);

impl AsRef<Bytes> for PyBytes {
Expand Down
Loading