gh-107801: Document SEEK_HOLE and SEEK_DATA#107936
gh-107801: Document SEEK_HOLE and SEEK_DATA#107936erlend-aasland merged 14 commits intopython:mainfrom
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. |
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
Thanks for the reviews, Antoine and Adam; highly appreciated. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
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 <erlend@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Antoine Pitrou <antoine@python.org>
(cherry picked from commit 8a19f22) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Antoine Pitrou <antoine@python.org>
📚 Documentation preview 📚: https://cpython-previews--107936.org.readthedocs.build/