gh-69528: Distinguish between file modes wb+ and rb+#137834
gh-69528: Distinguish between file modes wb+ and rb+#137834serhiy-storchaka merged 8 commits intopython:mainfrom
wb+ and rb+#137834Conversation
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Please add a test for GzipFile with a file opened with mode 'wb+'.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
This is not what I meant.
Open a file in the "wb+" mode and pass it to GzipFile instead of a filename. Check that that GzipFile is writable and not readable. You can also do the same for "rb+" and other modes. Most likely there are already such tests for "rb" and "wb" (and maybe for "ab" and "xb"?).
Do you want that in this PR, or another one? |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Yes, please add tests for all other modes with "+".
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Since it emits FutureWarning, the more correct place for these tests is test_fileobj_mode.
|
Anything left to do here @serhiy-storchaka ? |
|
Sorry, I forgot about this. |
|
No worries, thanks! |
|
|
Unrelated. |
…nGH-137834) Co-authored-by: Xiang Zhang <angwerzx@126.com>
Uh oh!
There was an error while loading. Please reload this page.