New submission from STINNER Victor:
posix_truncate() accepts a file descriptor, so os.ftruncate() can be removed
from Python 3.3.
memset(path, 0, sizeof(path));
path.function_name = truncate;
#ifdef HAVE_FTRUNCATE
path.allow_fd = 1;
#endif
if (!PyArg_ParseTupleAndKeywords(args,
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15547
___
___
STINNER Victor added the comment:
To check if os.truncate() supports file description, os.truncate in
os.supports_fd checek can be used.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15547
Larry Hastings added the comment:
Because both functions were available in 3.2, and we can't remove old functions
without a full deprecation cycle.
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
___
Python tracker
STINNER Victor added the comment:
Oh, I see: os.ftruncate() is present in Python 3.2; but os.truncate()
was added to Python 3.3. Ok, it's an excellent reason to not remove
os.ftruncate() ;-)
--
___
Python tracker rep...@bugs.python.org