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 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.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
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.cmpshould not be protected against that since it already ignores an OSError possibly raised byos.stat.Similarly,
filecmp.dircmpshould not suppressOSErrororValueErrorwhen listing the directory contents. It should however silenceValueErrorwhen checking the common files since it already silence anOSError.TL;DR: Only protect against
ValueErrorif the current code is already protecting againstOSError.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
ValueErrorinfilecmp#122401