PyO3 / PyO3/pyo3

Placing version identifers in the docs

Open
#5,271 2 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

The docs as published don't contain any version switchers or even any identifiers for which version the docs you are consuming apply to. I don't know how to access the guide for past versions.

For example:

Python::attach is available in 0.26-dev.
Python::attach is not available in stable 0.25

The user guide for stable pyo3 points to https://pyo3.rs/ which redirects to https://pyo3.rs/main, which seems to be the dev branch, so the guide for stable is not actually the guide for stable.

And it includes lots examples that don't seem to work:

use pyo3::prelude::*;

fn main() -> PyResult<()> {
    Python::attach(|py| {
        let builtins = PyModule::import(py, "builtins")?;
        let total: i32 = builtins
            .getattr("sum")?
            .call1((vec![1, 2, 3],))?
            .extract()?;
        assert_eq!(total, 6);
        Ok(())
    })
}
error[E0599]: no function or associated item named `attach` found for struct `pyo3::Python` in the current scope                                                                                                                                          
   --> rust\main.rs:19:13
    |
19  |     Python::attach(|py| {
    |             ^^^^^^ function or associated item not found in `Python<'_>`

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

Start by comparing the stable documentation link at https://pyo3.rs/ with https://pyo3.rs/main and checking where the published guide identifies its version. Verify the documented Python::attach example against stable 0.25; done means stable and development docs are distinguishable and examples match the version they document.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
documentation, release
Issue type
Documentation
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.