-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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: Document SEEK_HOLE and SEEK_DATA #107936
gh-107801: Document SEEK_HOLE and SEEK_DATA #107936
Conversation
I tried to keep this as simple as possible; since this is the reference, digressing deep into the explanation of the file hole/data concept and its use is out of place for a reference. |
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.
All good!
A
Co-authored-by: Adam Turner <[email protected]>
Thanks for the reviews, Antoine and Adam; highly appreciated. |
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.
It is weird that the semantic of SEEK_HOLE
and SEEK_DATA
is described here, but the semantic of other three SEEK_*
constants is described in other places. The latter in understandable, because it subtly differs for different types of streams. But I think that the documentation for all SEEK_*
should be more unified.
-
One way, do not document the semantic here, but only document it in
lseek()
description, in a single item list (or two similar item lists). -
Other way, add very general descriptions of traditional
SEEK_*
constants here (which works for all types of streams), more detailed description of new constants, and in thelseek()
documentation andseek()
methods documentation only document in details the behavior for traditionalSEEK_*
constants, and a reference for newSEEK_*
constants.
In any case I think that changes in SEEK_*
and lseek()
documentations should be made in a single PR, because they are not independent.
I think it is fine to document these in a separate PR. Small and incremental changes are aligns well with the recommendations of the Diátaxis, which we are using. More important: |
I agree with this, the previous PR got held up due to doing too much, I think these smaller PRs are easier -- noting that A |
Thanks, @AA-Turner and @pitrou; PTAL. |
It looks to me all remarks have been addressed; I'm landing this later today, @pitrou. If further adjustments are needed, we can easily make a follow-up PR. |
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
GH-108086 is a backport of this pull request to the 3.12 branch. |
GH-108087 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 8a19f22) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]>
(cherry picked from commit 8a19f22) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]>
(cherry picked from commit 8a19f22) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]>
gh-107801: Document SEEK_HOLE and SEEK_DATA (GH-107936) (cherry picked from commit 8a19f22) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]>
📚 Documentation preview 📚: https://cpython-previews--107936.org.readthedocs.build/