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-107801: Improve the accuracy of io.TextIOWrapper.seek docs #107933

Merged
merged 6 commits into from
Aug 22, 2023

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Aug 14, 2023

Clearly document the supported seek() operations:

  • Rewind to the start of the stream
  • Restore a previous strema position (given by tell())
  • Fast-forward to the end of the stream

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

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous strema position (given by tell())
- Fast-forward to the end of the stream
Doc/library/io.rst Outdated Show resolved Hide resolved
Doc/library/io.rst Outdated Show resolved Hide resolved
Doc/library/io.rst Outdated Show resolved Hide resolved
Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

I like this presentational approach, I think it's a significant improvement over the status quo!

A

Doc/library/io.rst Outdated Show resolved Hide resolved
Doc/library/io.rst Outdated Show resolved Hide resolved
Modules/_io/textio.c Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

Thanks for the reviews, Antoine and Adam; highly appreciated.

I think we're almost there, but I don't like the repetition in the summary sentence. I thought of changing it to "Set and return ...", but perhaps that is not accurate enough.

Doc/library/io.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

It seems the review comments of @pitrou have been addressed. I'll land this next week.

@erlend-aasland erlend-aasland merged commit 7f87ebb into python:main Aug 22, 2023
22 checks passed
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@erlend-aasland erlend-aasland deleted the docs/textiowrapper.seek branch August 22, 2023 07:37
@miss-islington
Copy link
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7f87ebbc3f52680c939791f397b9a478edf0c8d4 3.12

@miss-islington
Copy link
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7f87ebbc3f52680c939791f397b9a478edf0c8d4 3.11

@erlend-aasland
Copy link
Contributor Author

I will create a follow-up PR for documenting tell().

@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Aug 22, 2023
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Aug 22, 2023
… docs (python#107933)

(cherry picked from commit 7f87ebb)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Aug 22, 2023
… docs (python#107933)

(cherry picked from commit 7f87ebb)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 22, 2023
erlend-aasland added a commit that referenced this pull request Aug 22, 2023
…107933) (#108264)

(cherry picked from commit 7f87ebb)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
Yhg1s pushed a commit that referenced this pull request Aug 22, 2023
…107933) (#108262)

(cherry picked from commit 7f87ebb)

Clearly document the supported seek() operations:

- Rewind to the start of the stream
- Restore a previous stream position (given by tell())
- Fast-forward to the end of the stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants