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

GH-119054: Add "Reading and writing files" section to pathlib docs #119524

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented May 24, 2024

Add a dedicated subsection for open(), read_text(), read_bytes(), write_text() and write_bytes().


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

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

And backport to 3.12?

@barneygale
Copy link
Contributor Author

And backport to 3.12?

The docs in 3.12 aren't wrong, they're just a bit disorganised! I guess I'm trying to apply the bugfix vs feature/performance improvement distinction here. But I don't know much about the docs workflow 😅. Do you think backporting is the right thing to do here? If so I'll backport #119055 too.

@hugovk
Copy link
Member

hugovk commented Jun 2, 2024

In general, it's good to backport docs.

That's because the default https://docs.python.org/ redirects to https://docs.python.org/3/ which is the latest stable, currently 3.12. Most people visit this default.

If we only merge it to main, it is only seen at https://docs.python.org/3.14/, until 3.14 is released and it becomes default in October 2025, so most people won't benefit from these changes for 16 months!

Therefore, it makes sense to backport docs changes, even if they're not "bug fixes" as such, but improvements like better organisation. Plus backporting keeps each branch closer in sync, making it easier to backport other things.

@barneygale barneygale added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 2, 2024
@barneygale barneygale enabled auto-merge (squash) June 2, 2024 19:38
@barneygale
Copy link
Contributor Author

barneygale commented Jun 2, 2024

Thanks very much for the explanation, and the review! :)

@barneygale barneygale merged commit bd6d4ed into python:main Jun 2, 2024
34 checks passed
@miss-islington-app
Copy link

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 2, 2024
…ocs (pythonGH-119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
(cherry picked from commit bd6d4ed)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 2, 2024

GH-119954 is a backport of this pull request to the 3.13 branch.

@miss-islington-app
Copy link

Sorry, @barneygale, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bd6d4ed6454378e48dab06f50a9be0bae6baa3a2 3.12

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 2, 2024
barneygale added a commit to barneygale/cpython that referenced this pull request Jun 2, 2024
…ocs (python#119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed)
barneygale added a commit to barneygale/cpython that referenced this pull request Jun 2, 2024
…thlib docs (pythonGH-119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`..
(cherry picked from commit bd6d4ed)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 2, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 2, 2024
barneygale added a commit that referenced this pull request Jun 2, 2024
…docs (GH-119524) (#119954)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
barneygale added a commit that referenced this pull request Jun 2, 2024
…docs (GH-119524) (#119955)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed)
mliezun pushed a commit to mliezun/cpython that referenced this pull request Jun 3, 2024
…ocs (python#119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
barneygale added a commit to barneygale/cpython that referenced this pull request Jun 5, 2024
…ocs (python#119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ocs (python#119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ocs (python#119524)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
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 skip news topic-pathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants