GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-115986 Fix `pprint` documentation by Privat33r-dev · Pull Request #116019 · python/cpython

Conversation

@Privat33r-dev

@Privat33r-dev Privat33r-dev commented Feb 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I decided to separate the solution in 2 PRs. One PR is for fixing positions, references and including information that pprint.pprint function is unintuitive. And the other one would include setting up pp as default.

At first I thought that message about pprint.pprint being unintuitive might be divisive/hard to write, but later I figured out that it's a small change and fits current PR. Examples with pprint.pp might be divisive though, so once this PR is accepted, another PR is going to be introduced with the change.

  • Issue: Improve documentation for pprint module #115986

📚 Documentation preview 📚: https://cpython-previews--116019.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added the awaiting review label Feb 28, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 28, 2024
Improve documentation for pprint module #115986
Closed
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Feb 28, 2024
@Privat33r-dev
Privat33r-dev force-pushed the fix-docs-115986 branch 2 times, most recently from 36ff421 to 1745629 Compare February 28, 2024 02:24
@Privat33r-dev
Privat33r-dev requested a review from isidentical as a code owner February 28, 2024 02:24
@Privat33r-dev
Privat33r-dev force-pushed the fix-docs-115986 branch from 1745629 to 70b93ac Compare February 28, 2024 02:32
@Privat33r-dev

Privat33r-dev commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

Sorry for assignments, git acted a bit funny, likely due to the fact the I pulled locally, but haven't updated repo on github, so it decided to include some other changes as part of the PR. Looks like it was resolved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Privat33r-dev
Privat33r-dev force-pushed the fix-docs-115986 branch from 70b93ac to 935b04a Compare February 28, 2024 09:53
Privat33r-dev added 2 commits February 28, 2024 10:58
@Privat33r-dev
pythonGH-115986 Doc: change 'pprint' module documentation's structure
ff430ea
Ensure `pp` and `pprint` are positioned prominently at the top of the page.
@Privat33r-dev
Doc: fix links in 'pprint' documentation
7f5be79
Before links pointed out to the module `pprint` instead of the `pprint.pprint` function.
@Privat33r-dev
Privat33r-dev force-pushed the fix-docs-115986 branch from 935b04a to 7f5be79 Compare February 28, 2024 09:59
@hugovk
hugovk removed the request for review from isidentical February 28, 2024 10:10
@hugovk

hugovk commented Feb 28, 2024

Copy link
Copy Markdown
Member

Please don't force-push PRs, it can make things harder to review, and everything will be squash-merged at the end. Thanks!

https://devguide.python.org/getting-started/pull-request-lifecycle/

Privat33r-dev and erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Privat33r-dev added 2 commits February 28, 2024 12:04
@Privat33r-dev
Add warning to use 'pp' instead of 'pprint'
7001ac5
As `pprint` might have unintended consequences with dict sorting.
@Privat33r-dev
Fix typo
9f7e077
@Privat33r-dev

Privat33r-dev commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

Please don't force-push PRs, it can make things harder to review, and everything will be squash-merged at the end. Thanks!

https://devguide.python.org/getting-started/pull-request-lifecycle/

Thanks for the advice. Earlier I worked on projects with different workflow where rebase was a standard procedure.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

I decided to separate the solution in 2 PRs [...]

Thanks; it is better to do multiple PRs of atomic changes, than one giant PR with lots of changes. This holds both for code and docs changes.

AlexWaygood and Privat33r-dev reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland
erlend-aasland reviewed Feb 28, 2024
View reviewed changes
Comment thread Doc/library/pprint.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/pprint.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/pprint.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Privat33r-dev added 3 commits February 28, 2024 18:13
@Privat33r-dev
Add prefix to 'pprint.pprint' references
a9298cd
@Privat33r-dev
Improve formatting for sys.stdout
6f4cf93
Suggested-by: @erlend-aasland
@Privat33r-dev
Improve 'pprint.pp' formatting
65d20b5
erlend-aasland
erlend-aasland reviewed Feb 28, 2024
View reviewed changes
Comment thread Doc/library/pprint.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Privat33r-dev
Remove references from other than first occurences of sys.stdout
f126b36
@erlend-aasland

erlend-aasland commented Feb 28, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

One more thing: please do not mention GitHub accounts in commit messages (such as 6f4cf93); they turn up as notifications and thus end up as noise.

Privat33r-dev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Privat33r-dev

Privat33r-dev commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

One more thing: please do not mention GitHub accounts in commit messages (such as 6f4cf93); they turn up as notifications and thus end up as noise.

Should I rebase now or is it just for the future?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

Should I rebase now or is it just for the future?

For the future. Also, do a git merge --no-ff main -m "Pull in main" instead of rebasing.

Privat33r-dev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland
erlend-aasland previously approved these changes Feb 28, 2024
View reviewed changes

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Privat33r-dev reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-app bedevere-app Bot removed the awaiting review label Feb 28, 2024
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 28, 2024
@erlend-aasland erlend-aasland added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Feb 28, 2024
@erlend-aasland
erlend-aasland merged commit 6c1c94d into python:main Feb 28, 2024
@miss-islington-app

This comment was marked as outdated.

Sign in to view
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 28, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 28, 2024
@Privat33r-dev @miss-islington
pythonGH-115986 Reorder pprint docs and amend some references (python…
4bcf49a
…GH-116019)

Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.

Also:
- Fix pprint.pprint() references so they properly link to the module
  level function.
- Add links to sys.stdout.
(cherry picked from commit 6c1c94d)

Co-authored-by: Kerim Kabirov <[email protected]>
@miss-islington-app

This comment was marked as outdated.

Sign in to view
@miss-islington-app miss-islington-app Bot assigned erlend-aasland Feb 28, 2024
@bedevere-app

bedevere-app Bot commented Feb 28, 2024

Copy link
Copy Markdown

GH-116061 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Feb 28, 2024
@bedevere-app

bedevere-app Bot commented Feb 28, 2024

Copy link
Copy Markdown

GH-116064 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Feb 28, 2024
erlend-aasland pushed a commit that referenced this pull request Feb 28, 2024
@miss-islington @Privat33r-dev
[3.12] GH-115986 Reorder pprint docs and amend some references (GH-11…
91e680b
…6019) (#116061)

GH-115986 Reorder pprint docs and amend some references (GH-116019)

Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.

Also:
- Fix pprint.pprint() references so they properly link to the module
  level function.
- Add links to sys.stdout.
(cherry picked from commit 6c1c94d)

Co-authored-by: Kerim Kabirov <[email protected]>
erlend-aasland added a commit that referenced this pull request Feb 28, 2024
@erlend-aasland @Privat33r-dev
[3.11] GH-115986 Reorder pprint docs and amend some references (#116019…
02bb367
…) (#116064)

(cherry picked from commit 6c1c94d)

Introduce a new subsubsection, 'Functions', for module level functions,
and place it before the PrettyPrinter class reference.

Also:
- Fix pprint.pprint() references so they properly link to the module
  level function.
- Add links to sys.stdout.

Co-authored-by: Kerim Kabirov <[email protected]>
@Privat33r-dev
Privat33r-dev deleted the fix-docs-115986 branch February 29, 2024 09:02
@Privat33r-dev Privat33r-dev mentioned this pull request Feb 29, 2024
gh-115986: Fix inaccuracies in pprint docs #116104
Merged
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
@Privat33r-dev @woodruffw
pythonGH-115986 Reorder pprint docs and amend some references (python…
f002b2b
…#116019)

Introduce a new subsubsection, 'Functions', for module level functions,                                   
and place it before the PrettyPrinter class reference.                                                    
                                                                                                          
Also:
- Fix pprint.pprint() references so they properly link to the module                                   
  level function.
- Add links to sys.stdout.
erlend-aasland pushed a commit that referenced this pull request Mar 5, 2024
@Privat33r-dev
gh-115986: Fix inaccuracies in pprint docs (#116104)
e205c5c
Amend wording after gh-116019 was merged.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2024
@Privat33r-dev @miss-islington
pythongh-115986: Fix inaccuracies in pprint docs (pythonGH-116104)
a2e84fe
Amend wording after pythongh-116019 was merged.
(cherry picked from commit e205c5c)

Co-authored-by: Kerim Kabirov <[email protected]>
This was referenced Mar 5, 2024
[3.12] gh-115986: Fix inaccuracies in pprint docs (GH-116104) #116382
Merged
[3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) #116383
Merged
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2024
@Privat33r-dev @miss-islington
pythongh-115986: Fix inaccuracies in pprint docs (pythonGH-116104)
554853f
Amend wording after pythongh-116019 was merged.
(cherry picked from commit e205c5c)

Co-authored-by: Kerim Kabirov <[email protected]>
erlend-aasland pushed a commit that referenced this pull request Mar 5, 2024
@miss-islington @Privat33r-dev
[3.12] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116382)
23a9ba4
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5c)

Co-authored-by: Kerim Kabirov <[email protected]>
erlend-aasland pushed a commit that referenced this pull request Mar 5, 2024
@miss-islington @Privat33r-dev
[3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) (#116383)
8675e7f
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5c)

Co-authored-by: Kerim Kabirov <[email protected]>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
@Privat33r-dev @adorilson
pythonGH-115986 Reorder pprint docs and amend some references (python…
1c688fe
…#116019)

Introduce a new subsubsection, 'Functions', for module level functions,                                   
and place it before the PrettyPrinter class reference.                                                    
                                                                                                          
Also:
- Fix pprint.pprint() references so they properly link to the module                                   
  level function.
- Add links to sys.stdout.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
@Privat33r-dev @adorilson
pythongh-115986: Fix inaccuracies in pprint docs (python#116104)
d2013fd
Amend wording after pythongh-116019 was merged.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@Privat33r-dev @diegorusso
pythonGH-115986 Reorder pprint docs and amend some references (python…
64cc634
…#116019)

Introduce a new subsubsection, 'Functions', for module level functions,                                   
and place it before the PrettyPrinter class reference.                                                    
                                                                                                          
Also:
- Fix pprint.pprint() references so they properly link to the module                                   
  level function.
- Add links to sys.stdout.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@Privat33r-dev @diegorusso
pythongh-115986: Fix inaccuracies in pprint docs (python#116104)
d31ac2f
Amend wording after pythongh-116019 was merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@erlend-aasland erlend-aasland

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Privat33r-dev @hugovk @erlend-aasland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.