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-107801: Improve the accuracy of io.TextIOWrapper.seek docs by erlend-aasland · Pull Request #107933 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Aug 14, 2023 •
edited by github-actions Bot
Loading

Uh oh!

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

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
  • Issue: Docs and docstrings for io.*.seek are inconsistent #107801

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@erlend-aasland
pythongh-107801: Improve the accuracy of io.TextIOWrapper.seek docs
89607fb
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
@erlend-aasland erlend-aasland added the skip news label Aug 14, 2023
@bedevere-bot bedevere-bot mentioned this pull request Aug 14, 2023
Docs and docstrings for io.*.seek are inconsistent #107801
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Aug 14, 2023
@erlend-aasland erlend-aasland added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Aug 14, 2023
@erlend-aasland
erlend-aasland requested review from AA-Turner, pitrou and serhiy-storchaka August 14, 2023 10:57
erlend-aasland added 2 commits August 14, 2023 12:58
@erlend-aasland
tell is not documented yet
fe7e7e5
@erlend-aasland
Sphinx syntax
b718c67
erlend-aasland
erlend-aasland commented Aug 14, 2023
View reviewed changes
Comment thread Doc/library/io.rst Resolved

Uh oh!

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

pitrou
pitrou reviewed Aug 14, 2023
View reviewed changes
Comment thread Doc/library/io.rst Resolved

Uh oh!

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

pitrou
pitrou reviewed Aug 14, 2023
View reviewed changes
Comment thread Doc/library/io.rst Resolved

Uh oh!

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

AA-Turner
AA-Turner approved these changes Aug 14, 2023
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

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.

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

A

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with hooray emoji
All reactions
  • 🎉 1 reaction
Comment thread Doc/library/io.rst Resolved

Uh oh!

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

Comment thread Doc/library/io.rst Resolved

Uh oh!

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

Comment thread Modules/_io/textio.c Resolved

Uh oh!

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

@erlend-aasland
Address first batch of reviews
fb86f3b
@erlend-aasland

erlend-aasland commented Aug 14, 2023

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.

AA-Turner reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

AA-Turner
AA-Turner reviewed Aug 14, 2023
View reviewed changes
Comment thread Doc/library/io.rst Resolved

Uh oh!

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

erlend-aasland added 2 commits August 14, 2023 23:22
@erlend-aasland
Break the first sentence up, and remember to include the default value
56d196b
@erlend-aasland
Pull in main
729a118
@erlend-aasland
erlend-aasland requested a review from AA-Turner August 19, 2023 16:09
@erlend-aasland

erlend-aasland commented Aug 19, 2023

Copy link
Copy Markdown
Contributor Author

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

AA-Turner reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

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

AA-Turner
AA-Turner approved these changes Aug 19, 2023
View reviewed changes
@erlend-aasland
erlend-aasland merged commit 7f87ebb into python:main Aug 22, 2023
@miss-islington

miss-islington commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting core review label Aug 22, 2023
@erlend-aasland
erlend-aasland deleted the docs/textiowrapper.seek branch August 22, 2023 07:37
@miss-islington

miss-islington commented Aug 22, 2023

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned erlend-aasland Aug 22, 2023
@miss-islington

miss-islington commented Aug 22, 2023

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Aug 22, 2023

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Aug 22, 2023

Copy link
Copy Markdown

GH-108262 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-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
@erlend-aasland
[3.12] pythongh-107801: Improve the accuracy of io.TextIOWrapper.seek…
2b744f2
… 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
@erlend-aasland
[3.11] pythongh-107801: Improve the accuracy of io.TextIOWrapper.seek…
2143d7e
… 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

bedevere-bot commented Aug 22, 2023

Copy link
Copy Markdown

GH-108264 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-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
@erlend-aasland
[3.11] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#…
cc42182
…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
@erlend-aasland
[3.12] gh-107801: Improve the accuracy of io.TextIOWrapper.seek docs (#…
ef4d427
…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

Reviewers

@pitrou pitrou pitrou left review comments
@AA-Turner AA-Turner AA-Turner approved these changes
@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka

Uh oh!

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

Assignees

@erlend-aasland erlend-aasland

Labels

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.

5 participants

@erlend-aasland @miss-islington @bedevere-bot @pitrou @AA-Turner
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.