You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
picnixz opened this issue
Jul 29, 2024
· 0 comments
Assignees
Labels
3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
In filecmp.cmpfiles, when the path is not stat-able, it will be put in the "fancy" files. This should include paths that would raise ValueError.
Note that filecmp.cmp should not be protected against that since it already ignores an OSError possibly raised by os.stat.
Similarly, filecmp.dircmp should not suppress OSError or ValueError when listing the directory contents. It should however silence ValueError when checking the common files since it already silence an OSError.
TL;DR: Only protect against ValueError if the current code is already protecting against OSError.
3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
In
filecmp.cmpfiles
, when the path is not stat-able, it will be put in the "fancy" files. This should include paths that would raiseValueError
.Note that
filecmp.cmp
should not be protected against that since it already ignores an OSError possibly raised byos.stat
.Similarly,
filecmp.dircmp
should not suppressOSError
orValueError
when listing the directory contents. It should however silenceValueError
when checking the common files since it already silence anOSError
.TL;DR: Only protect against
ValueError
if the current code is already protecting againstOSError
.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
ValueError
infilecmp
#122401The text was updated successfully, but these errors were encountered: