]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120754: _io Ensure stat cache is cleared on fd change (#125166)
authorCody Maloney <cmaloney@users.noreply.github.com>
Fri, 1 Nov 2024 21:50:49 +0000 (14:50 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 21:50:49 +0000 (22:50 +0100)
commit72dd4714f944e5927656aa25f5cd9bdcd3b00a76
tree965ced6971f92758a31d3f37e6625d7048861d62
parentc84a136511c673f495f466887716b55c13b7e3ac
gh-120754: _io Ensure stat cache is cleared on fd change (#125166)

Performed an audit of `fileio.c` and `_pyio` and made sure anytime the
fd changes the stat result, if set, is also cleared/changed.

There's one case where it's not cleared, if code would clear it in
__init__, keep the memory allocated and just do another fstat with the
existing memory.
Lib/_pyio.py
Modules/_io/fileio.c