Skip to content

bpo-27805: Allow opening /dev/std{out,err} in append mode#13254

Closed
ZackerySpytz wants to merge 1 commit into
python:masterfrom
ZackerySpytz:bpo-27805-open-append-stdout-stderr
Closed

bpo-27805: Allow opening /dev/std{out,err} in append mode#13254
ZackerySpytz wants to merge 1 commit into
python:masterfrom
ZackerySpytz:bpo-27805-open-append-stdout-stderr

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented May 11, 2019

Copy link
Copy Markdown
Contributor

For example, open('/dev/stdout', 'a') will no longer raise an OSError.

https://bugs.python.org/issue27805

For example, open('/dev/stdout', 'a') will no longer raise an OSError.
Comment thread Modules/_io/fileio.c
@@ -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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be simpler to check for ESPIPE in portable_lseek. (Perhaps you need to add a parameter?)

@benjaminp benjaminp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(dropping from my queue because of my question)

@bedevere-bot

Copy link
Copy Markdown

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@benjaminp

Copy link
Copy Markdown
Contributor

Closing because GH-17112 was merged instead. Thank you for the PR, though.

@benjaminp benjaminp closed this Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants