◐ Shell
clean mode source ↗

gh-120754: Refactor I/O modules to stash whole stat result rather than individual members by cmaloney · Pull Request #123412 · python/cpython

added 2 commits

August 27, 2024 16:53
Multiple places in the I/O stack optimize common cases by using the
information from stat. Currently individual members are extracted from
the stat and stored into the fileio struct. Refactor the code to store
the whole stat struct instead.
Parallels the changes to _io. The `stat` Python object doesn't allow
changing members, so rather than modifying estimated_size, just clear
the value.

vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

@cmaloney

@zware zware mentioned this pull request

Sep 18, 2024

gpshead

savannahostrowski pushed a commit to savannahostrowski/cpython that referenced this pull request

Sep 22, 2024
…er than individual members (python#123412)

Multiple places in the I/O stack optimize common cases by using the
information from stat. Currently individual members are extracted from
the stat and stored into the fileio struct. Refactor the code to store
the whole stat struct instead.

Parallels the changes to _io. The `stat` Python object doesn't allow
changing members, so rather than modifying estimated_size, just clear
the value.

This was referenced

Oct 3, 2024