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 2008年07月22日 13:56 by oskar86, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue-3425-utimes.patch | jszakmeister, 2009年05月28日 10:07 | Patch to use utimes() when the arg is None. | ||
| Messages (3) | |||
|---|---|---|---|
| msg70147 - (view) | Author: Oskar Andersson (oskar86) | Date: 2008年07月22日 13:56 | |
I'm porting, embedding and extending Python in a very limited environment. This environment does not have utime.h and have not defined the following function: int utime(const char *, const struct utimbuf *); Although the function called utimes, defined in sys/time.h exist. int utimes(const char *path, const struct timeval times[2]); In the method, in posixmodule.c: static PyObject * posix_utime(PyObject *self, PyObject *args); usage of these methods are used. If a time is specified in args, a define determines which of the two methods to use, utime or utimes depending if these exist or not. If Py_None is sent instead utime is always used, the solution to solve this is to use #ifdef with HAVE_UTIMES. Line number 2835 in http://svn.python.org/projects/python/trunk/Modules/posixmodule.c I have not checked if this is solved in future versions. |
|||
| msg88471 - (view) | Author: John Szakmeister (jszakmeister) * | Date: 2009年05月28日 10:07 | |
It seems reasonable to prefer utimes() over utime() in all cases, when utimes() is available, since utime() is considered obsolete. I've attached a patch with the required change and ran all the tests. There are some tests failing on trunk with my system. However this patch introduced no additional failures (test_posix passes). BTW, the patch is against trunk. |
|||
| msg221016 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年06月19日 20:17 | |
This is no longer an issue in Python3; there utimes is used if it is available (if utimensat is not). Since this doesn't affect the platforms actually supported by python2.7, I'm closing this as out of date. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:36 | admin | set | github: 47675 |
| 2014年06月19日 20:17:18 | r.david.murray | set | status: open -> closed nosy: + r.david.murray messages: + msg221016 resolution: out of date stage: resolved |
| 2010年08月03日 20:56:12 | terry.reedy | set | versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5 |
| 2009年05月28日 10:07:42 | jszakmeister | set | files:
+ issue-3425-utimes.patch nosy: + jszakmeister messages: + msg88471 keywords: + patch |
| 2008年07月22日 13:56:32 | oskar86 | create | |