New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"raw" attribute of buffered IO objects is assignable #54959
Comments
This really looks backwards: >>> f = open("LICENSE", "rb")
>>> f.name = "bar"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: attribute 'name' of '_io.BufferedReader' objects is not writable
>>> f.raw = None
__main__:1: ResourceWarning: unclosed file <_io.FileIO name='LICENSE' mode='rb'>
>>> |
Here is a patch. |
2010/12/21 Antoine Pitrou <report@bugs.python.org>:
I assume you can put test_readonly_attributes in CommonBufferTests? |
Le mardi 21 décembre 2010 à 20:36 +0000, Benjamin Peterson a écrit :
That's where it is :) |
Ah, I see. LGTM then. |
Thank you, committed in r87427 (3.2), r87428 (3.1) and r87429 (2.7). |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: