Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(77141)

#23668: Support os.[f]truncate on Windows

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 5 months ago by steve.dower
Modified:
4 years, 4 months ago
Reviewers:
victor.stinner
CC:
haypo, tim.golden, devnull_psf.upfronthosting.co.za, Zach Ware, storchaka, steve.dower
Visibility:
Public.

Patch Set 1 #

Total comments: 13

Patch Set 2 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/io.rst View 1 1 chunk +5 lines, -2 lines 0 comments Download
Doc/library/os.rst View 1 2 chunks +7 lines, -3 lines 0 comments Download
Misc/NEWS View 1 1 chunk +2 lines, -0 lines 0 comments Download
Modules/_io/fileio.c View 1 3 chunks +4 lines, -50 lines 0 comments Download
Modules/posixmodule.c View 1 6 chunks +40 lines, -13 lines 2 comments Download

Messages

Total messages: 6
victor.stinner_gmail.com
http://bugs.python.org/review/23668/diff/14202/Doc/library/io.rst File Doc/library/io.rst (right): http://bugs.python.org/review/23668/diff/14202/Doc/library/io.rst#newcode344 Doc/library/io.rst:344: You should add a ".. versionchanged:: 3.5" to mention ...
4 years, 5 months ago #1
steve.dower_microsoft.com
Thanks Victor! http://bugs.python.org/review/23668/diff/14202/Doc/library/io.rst File Doc/library/io.rst (right): http://bugs.python.org/review/23668/diff/14202/Doc/library/io.rst#newcode344 Doc/library/io.rst:344: On 2015/03/16 09:48:25, haypo wrote: > You ...
4 years, 5 months ago #2
victor.stinner_gmail.com
http://bugs.python.org/review/23668/diff/14202/PC/pyconfig.h File PC/pyconfig.h (right): http://bugs.python.org/review/23668/diff/14202/PC/pyconfig.h#newcode558 PC/pyconfig.h:558: #define HAVE_FTRUNCATE On 2015/03/16 16:48:31, steve.dower wrote: > There's ...
4 years, 5 months ago #3
steve.dower_microsoft.com
http://bugs.python.org/review/23668/diff/14202/PC/pyconfig.h File PC/pyconfig.h (right): http://bugs.python.org/review/23668/diff/14202/PC/pyconfig.h#newcode558 PC/pyconfig.h:558: #define HAVE_FTRUNCATE On 2015/03/16 16:54:56, haypo wrote: > On ...
4 years, 5 months ago #4
victor.stinner_gmail.com
http://bugs.python.org/review/23668/diff/14291/Modules/posixmodule.c File Modules/posixmodule.c (right): http://bugs.python.org/review/23668/diff/14291/Modules/posixmodule.c#newcode12613 Modules/posixmodule.c:12613: fd = _open(path->narrow, _O_WRONLY | _O_BINARY | _O_NOINHERIT); Can't ...
4 years, 4 months ago #5
steve.dower_microsoft.com
4 years, 4 months ago #6
http://bugs.python.org/review/23668/diff/14291/Modules/posixmodule.c
File Modules/posixmodule.c (right):

http://bugs.python.org/review/23668/diff/14291/Modules/posixmodule.c#newcode1...
Modules/posixmodule.c:12613: fd = _open(path->narrow, _O_WRONLY | _O_BINARY |
_O_NOINHERIT);
On 2015/03/30 11:59:43, haypo wrote:
> Can't you use _Py_open() or _Py_open_noraise() here to handle EINTR? It avoids
> to have to set _O_NOINHERIT explicitly.

Afraid not, I need to explicitly omit _O_CREATE or the open call doesn't fail
when the file is missing. AFAICT there's no way to leave out that option with a
mode string.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+