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
{{ message }}
Repository navigation
FileIO.readall() should raise "UnsupportedOperation" when in "w" mode #85524
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2020-07-20.21:14:00.553>labels= ['type-bug', '3.9', 'expert-IO', '3.11', 'library', '3.10']
title='FileIO.readall() should raise "UnsupportedOperation" when in "w" mode'updated_at=<Date2022-01-24.17:23:10.468>user='https://github.com/evanWang1409'
With FileIO.read() raises "UnsupportedOperation" in "w" mode, I expect FileIO.readall() do the same. But in fact FileIO.readall() does not check for readable and does not raise "UnsupportedOperation" in "w"mode.
Activity
evanWang1409 commentedon Jul 20, 2020
Here are the two test cases: the one with FileIO.readall() fails
With FileIO.read() raises "UnsupportedOperation" in "w" mode, I expect FileIO.readall() do the same. But in fact FileIO.readall() does not check for readable and does not raise "UnsupportedOperation" in "w"mode.
I'm happy to write a pull request if you want.
pythongh-85524: Raise "UnsupportedOperation" on FileIO.readall
gh-85524: Raise "UnsupportedOperation" on FileIO.readall (#141214)
vstinner commentedon Nov 12, 2025
Fixed by 6f988b0.
pythongh-85524: Raise "UnsupportedOperation" on FileIO.readall (pytho…