PyO3 / PyO3/pyo3

Better document that frozen pyclasses can use interior mutability

Open
#4,980 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

For example, with a mutex. This also leaves open the possibility for users to add their own Sync implementations if they want to manage e.g. an UnsafeCell themselves.

This provides a nice migration route for people with mutable state stored in a pyclass who don't want runtime borrow checking.

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

No file or test is named. Start by locating the documentation for frozen pyclasses and their Sync requirements, then review how interior mutability with a mutex and user-provided Sync implementations should be described. Done means the migration route for pyclasses with mutable state is clearly documented without implying runtime borrow checking is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.