[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-10-19 Thread STINNER Victor
STINNER Victor added the comment: I don't think that it would be a good idea to start emitting a new warning in a minor release like the future Python 3.7.2, so I suggest to not backport the change. I close the issue. -- resolution: -> fixed stage: patch review -> resolved status:

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-10-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a2670565d8f5c502388378aba1fe73023fd8c8d4 by Victor Stinner (Alexey Izbyshev) in branch 'master': bpo-32236: open() emits RuntimeWarning if buffering=1 for binary mode (GH-4842)

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-09-11 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you, Gregory. I didn't intend to add the warning to stable branches -- it's just that 3.7 hasn't been released yet when this report was submitted. -- ___ Python tracker

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-09-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: My problem with a warning is the standard one: People who see a warning are often end users of python applications (who don't even have to know what Python is, let alone know anything about the code). For that reason, never add a warning to a stable

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-01-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2018-01-25 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Any feedback on the updated PR? -- ___ Python tracker ___

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-18 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I had similar thoughts when I was fixing tests that broke due to ValueError. I've updated the PR to issue a RuntimeWarning instead. -- ___ Python tracker

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: After looking at the PR, I think it would be a bit too strong to raise an error. Perhaps emit a warning instead? -- ___ Python tracker

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-13 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +4730 stage: -> patch review ___ Python tracker ___

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-10 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I'm in favor of raising an exception because it'll expose existing code with incorrect assumptions. I'll check whether it breaks any tests and submit a PR. -- ___ Python tracker

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I suggest to raise a ValueError if buffering=1 is used for binary mode. Either that, or we instead accept buffering=1 as a regular buffer size. But since buffering=1 means something else for text mode, maybe you're right that it's better

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-06 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The fact that "buffering=1" is usable only in text mode is documented for open(). In binary mode, setting buffering to 1 is silently ignored and equivalent to using default buffer size. I argue that such behavior is: 1. Inconsistent