Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HandleValueError infilecmp.dircmp andfilecmp.cmpfiles #122400

Closed
Assignees
picnixz
Labels
3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@picnixz

Description

@picnixz

Bug report

Bug description:

Infilecmp.cmpfiles, when the path is not stat-able, it will be put in the "fancy" files. This should include paths that would raiseValueError.

Note thatfilecmp.cmp shouldnot 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 againstValueError if the current code is already protecting againstOSError.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp