[issue23668] Support os.ftruncate on Windows

2015-04-26 Thread Steve Dower

Changes by Steve Dower steve.do...@microsoft.com:


--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb7ca578a0c3 by Steve Dower in branch 'default':
Issue #23668: Regenerates posixmodule.c.h for new ifdefs
https://hg.python.org/cpython/rev/cb7ca578a0c3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 505bf6086ec5 by Steve Dower in branch 'default':
Issue #23668: Adds support for os.truncate and os.ftruncate on Windows
https://hg.python.org/cpython/rev/505bf6086ec5

New changeset eba85ae7d128 by Steve Dower in branch 'default':
Issue #23668: Suppresses invalid parameter handler around chsize calls.
https://hg.python.org/cpython/rev/eba85ae7d128

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-11 Thread Steve Dower

Changes by Steve Dower steve.do...@microsoft.com:


--
stage:  - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-09 Thread STINNER Victor

STINNER Victor added the comment:

23668_3.patch looks good to me.

I agree that handling EINTR is not needed on Windows, and so there is no need 
for an helper function like _Py_open_noraise().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-03 Thread Steve Dower

Steve Dower added the comment:

Sorry, _Py_open requires a double encoding (wchar-char-wchar), which is why 
I'm not going to use it.

_Py_wfopen takes a mode string rather than _O_* flags, and so implicitly 
includes _O_CREAT.

Guessing we should add _Py_wopen?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I still fail to see how _Py_open() or _Py_open_noraise() add the O_CREAT 
flag: they are thin wrapper to the underyling open() function. I cannot see 
O_CREAT in Python/fileutils.c. Could you please show me that the line number 
adding O_CREAT implictly?

I don't understand.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-04-03 Thread Steve Dower

Steve Dower added the comment:

I responded to Victor's suggestion about _Py_open instead of _open, but on 
rereading I see that it also handles EINTR. 

AFAICT (from https://msdn.microsoft.com/en-us/library/5814770t.aspx, mainly), 
Windows isn't ever going to return EINTR from the CRT. I don't especially want 
to have to modify _Py_open to take another parameter to suppress creating a new 
file, but if someone else does then I'm happy to use it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23668] Support os.ftruncate on Windows

2015-03-21 Thread Steve Dower

Steve Dower added the comment:

Yep, all the way back to VS 2005 and Windows 95. Not sure why it wasn't used 
previously (_chsize doesn't support 64-bit values, which is a reasonable reason 
to not use it).

--
title: Support os. - Support os.ftruncate on Windows

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com