This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年08月03日 12:13 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg167311 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年08月03日 12:13 | |
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, kwargs, "O&O&:truncate", keywords, path_converter, &path, _parse_off_t, &length)) return NULL; |
|||
| msg167317 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年08月03日 12:27 | |
To check if os.truncate() supports file description, "os.truncate in os.supports_fd" checek can be used. |
|||
| msg167342 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年08月03日 18:57 | |
Because both functions were available in 3.2, and we can't remove old functions without a full deprecation cycle. |
|||
| msg167364 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2012年08月03日 21:39 | |
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() ;-) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:33 | admin | set | github: 59752 |
| 2012年08月03日 21:39:28 | vstinner | set | messages: + msg167364 |
| 2012年08月03日 18:57:36 | larry | set | status: open -> closed resolution: wont fix messages: + msg167342 stage: resolved |
| 2012年08月03日 12:27:08 | vstinner | set | messages: + msg167317 |
| 2012年08月03日 12:26:11 | vstinner | set | nosy:
+ georg.brandl |
| 2012年08月03日 12:13:03 | vstinner | create | |