Skip to content

GH-115986 Fix pprint documentation - #116019

Merged
erlend-aasland merged 10 commits into
python:mainfrom
Privat33r-dev:fix-docs-115986
Feb 28, 2024
Merged

GH-115986 Fix pprint documentation#116019
erlend-aasland merged 10 commits into
python:mainfrom
Privat33r-dev:fix-docs-115986

Conversation

@Privat33r-dev

@Privat33r-devPrivat33r-dev commented Feb 28, 2024

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.


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

@Privat33r-dev

Copy link
Copy Markdown
ContributorAuthor

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.

Ensure `pp` and `pprint` are positioned prominently at the top of the page.
Before links pointed out to the module `pprint` instead of the `pprint.pprint` function.
@hugovk
hugovk removed the request for review from isidenticalFebruary 28, 2024 10:10
@hugovk

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/

As `pprint` might have unintended consequences with dict sorting.
@Privat33r-dev

Copy link
Copy Markdown
ContributorAuthor

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.

@erlend-aasland

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.

Comment threadDoc/library/pprint.rst Outdated
Comment threadDoc/library/pprint.rst Outdated
Comment threadDoc/library/pprint.rst Outdated
Comment threadDoc/library/pprint.rst Outdated
@erlend-aasland

erlend-aasland commented Feb 28, 2024

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

Copy link
Copy Markdown
ContributorAuthor

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?

@erlend-aasland

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.

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

@erlend-aaslanderlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM; thanks!

@erlend-aaslanderlend-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:mainFeb 28, 2024
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 28, 2024
…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 <39376984+Privat33r-dev@users.noreply.github.com>
@miss-islington-app

This comment was marked as outdated.

@bedevere-app

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot 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
…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 <39376984+Privat33r-dev@users.noreply.github.com>
erlend-aasland added a commit that referenced this pull request Feb 28, 2024
…) (#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 <39376984+Privat33r-dev@users.noreply.github.com>
@Privat33r-dev
Privat33r-dev deleted the fix-docs-115986 branch February 29, 2024 09:02
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…#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
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2024
Amend wording after pythongh-116019 was merged.
(cherry picked from commit e205c5c)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2024
Amend wording after pythongh-116019 was merged.
(cherry picked from commit e205c5c)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
erlend-aasland pushed a commit that referenced this pull request Mar 5, 2024
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5c)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
erlend-aasland pushed a commit that referenced this pull request Mar 5, 2024
Amend wording after gh-116019 was merged.
(cherry picked from commit e205c5c)
Co-authored-by: Kerim Kabirov <39376984+Privat33r-dev@users.noreply.github.com>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…#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
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…#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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Privat33r-dev@hugovk@erlend-aasland