Skip to content

[3.13] gh-135683: Honor raiseExceptions when opening the file fails in FileHandler (GH-154542) - #157809

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-e8ac9c4-3.13
Sep 19, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-e8ac9c4-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

FileHandler and WatchedFileHandler opened the file outside the try block
that reports errors via handleError(), so an error while opening the file
was raised instead of being handled, ignoring raiseExceptions.
(cherry picked from commit e8ac9c4)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Vinay Sajip vinay_sajip@yahoo.co.uk
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

… FileHandler (pythonGH-154542)

FileHandler and WatchedFileHandler opened the file outside the try block
that reports errors via handleError(), so an error while opening the file
was raised instead of being handled, ignoring raiseExceptions.
(cherry picked from commit e8ac9c4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) September 19, 2026 15:45
@serhiy-storchaka
serhiy-storchaka merged commit ea02d98 into python:3.13 Sep 19, 2026
44 checks passed
@miss-islington
miss-islington deleted the backport-e8ac9c4-3.13 branch September 19, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants