]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120754: Refactor I/O modules to stash whole stat result rather than individual...
authorCody Maloney <cmaloney@users.noreply.github.com>
Wed, 18 Sep 2024 15:47:57 +0000 (08:47 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Sep 2024 15:47:57 +0000 (17:47 +0200)
commit8b6c7c7877c26f0201f37f69d4db2f35d7abd760
tree5b147443becd83f34e147460c686e899034c0f8e
parent96f619faa74a8a32c2c297833cdeb0393c0b6b13
gh-120754: Refactor I/O modules to stash whole stat result rather than individual members (#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.
Lib/_pyio.py
Modules/_io/fileio.c