PyO3 / PyO3/pyo3

Extend `impl FromPyObject<'a> for Cow<'a, [u8]>` to handle buffer protocol

Open
#2,973 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

blocked performance
Dominant language
Rust
Stars
16.2k
Forks
1k
Avg merge
2d 6h
Merged PRs (30d)
66

Description

In #2899, we temporarily introduced support for handling any Python object implementing the buffer protocol via impl FromPyObject<'a> for Cow<'a, [u8]> in 228cfd009c0fd35b7b3c199e67d56d3ff404ba8e.

We decided to remove this as it would only be available in CPython 3.11 or later or when the full API is enabled. When we drop support for CPython 3.10 or earlier, we should look into re-enabling this unconditionally.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the implementation introduced in commit 228cfd009c0fd35b7b3c199e67d56d3ff404ba8e for FromPyObject<'a> for Cow<'a, [u8]>. Confirm the supported CPython versions and API configuration, then determine whether the buffer-protocol support can be re-enabled once CPython 3.10 support is dropped.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.