bpo-27805: Allow opening /dev/std{out,err} in append mode#13254
bpo-27805: Allow opening /dev/std{out,err} in append mode#13254ZackerySpytz wants to merge 1 commit into
Conversation
For example, open('/dev/stdout', 'a') will no longer raise an OSError.
| @@ -477,9 +477,31 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode, | |||
| end of file (otherwise, it might be done only on the | |||
| first write()). */ | |||
| PyObject *pos = portable_lseek(self, NULL, 2); | |||
There was a problem hiding this comment.
Wouldn't it be simpler to check for ESPIPE in portable_lseek. (Perhaps you need to add a parameter?)
benjaminp
left a comment
There was a problem hiding this comment.
(dropping from my queue because of my question)
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Closing because GH-17112 was merged instead. Thank you for the PR, though. |
For example,
open('/dev/stdout', 'a')will no longer raise anOSError.https://bugs.python.org/issue27805