Skip to content

gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs - #107933

Merged
erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:docs/textiowrapper.seek
Aug 22, 2023
Merged

erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:docs/textiowrapper.seek

Conversation

@erlend-aasland

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

Copy link
Copy Markdown
Contributor

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
Comment thread Doc/library/io.rst Resolved
Comment thread Doc/library/io.rst Resolved
Comment thread Doc/library/io.rst Resolved

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

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

Comment thread Doc/library/io.rst Resolved
Comment thread Doc/library/io.rst Resolved
Comment thread Modules/_io/textio.c Resolved
@erlend-aasland

Copy link
Copy Markdown
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.

Comment thread Doc/library/io.rst Resolved
@erlend-aasland

Copy link
Copy Markdown
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
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@bedevere-bot

Copy link
Copy Markdown

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 only 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
Copy Markdown

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

5 participants