Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated pprint.pp doc example about pypi sampleproject version #126731

Closed
Wulian233 opened this issue Nov 12, 2024 · 2 comments
Closed

Outdated pprint.pp doc example about pypi sampleproject version #126731

Wulian233 opened this issue Nov 12, 2024 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@Wulian233
Copy link
Contributor

Wulian233 commented Nov 12, 2024

Documentation

Currently, the examples in pprint that demonstrate the pprint.pp function are outdated. The last edit was in 2018, six years ago, and the JSON link in the example now points to sampleproject (see #10201). The documentation currently references version 1.2 of sampleproject, which was released in 2015 (https://pypi.org/project/sampleproject/#history). The latest version is now 4.0, released last week. Thus, the information in the documentation no longer matches the current state, and I have submitted a PR to address this. The information varies widely over the past nine years

A possible question might be: do we need to frequently update this example? The answer is no—it changes infrequently and thus won’t increase maintenance overhead.

Linked PRs

@brianschubert
Copy link
Contributor

Perhaps we should pin the version in the URL so that the example won't become stale again in the future? For example:

with urlopen('https://pypi.org/pypi/sampleproject/1.2.0/json') as resp:
    ...

@Wulian233
Copy link
Contributor Author

A great suggetsion, I will add it to 4.0.0

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 14, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 14, 2024
hauntsaninja pushed a commit that referenced this issue Nov 14, 2024
…doc (GH-126732) (#126818)

gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1a)

Co-authored-by: Wulian <[email protected]>
hauntsaninja pushed a commit that referenced this issue Nov 14, 2024
…doc (GH-126732) (#126819)

gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1a)

Co-authored-by: Wulian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

3 participants