Title: os.stat_float_times is not implemented
Type: behaviour Severity: normal
Components: Documentation Versions: Jython 2.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, smeatonj
Priority: low Keywords:

Created on 2011-07-26.08:00:15 by smeatonj, last changed 2013-02-25.21:54:02 by fwierzbicki.

msg6585 (view) Author: Josh Smeaton (smeatonj) Date: 2011-07-26.08:00:14
The module os does not have the stat_float_times function, even though the Jython documentation lists it as an available function.

This directly impacts django 1.3+, as django uses this function for collecting and serving static content. I'm logging a patch to django to work around this function not being available, but I still feel that jython should at least provide a dummy implementation, to maintain compatibility where possible.

Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_24
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.stat_float_times()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'stat_float_times'
>>> dir(os)
['EX_OK', 'F_OK', 'O_APPEND', 'O_CREAT', 'O_EXCL', 'O_RDONLY', 'O_RDWR', 'O_SYNC', 'O_TRUNC', 'O_WRONLY', 'R_OK', 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'W_OK', 'X_OK', '__all__', '__doc__', '__file__', '__name__', '_exists', '_exit', '_get_exports_list', '_get_shell_commands', '_name', '_native_posix', '_posix_impl', '_wrap_close', 'access', 'altsep', 'chdir', 'chmod', 'chown', 'close', 'curdir', 'defpath', 'devnull', 'environ', 'errno', 'error', 'extsep', 'fdatasync', 'fdopen', 'fsync', 'ftruncate', 'getcwd', 'getcwdu', 'getegid', 'getenv', 'geteuid', 'getgid', 'getlogin', 'getpgrp', 'getpid', 'getppid', 'getuid', 'isatty', 'kill', 'lchmod', 'lchown', 'linesep', 'link', 'listdir', 'lseek', 'lstat', 'makedirs', 'mkdir', 'name', 'open', 'pardir', 'path', 'pathsep', 'popen', 'popen2', 'popen3', 'popen4', 'putenv', 'read', 'readlink', 'remove', 'removedirs', 'rename', 'renames', 'rmdir', 'sep', 'setpgrp', 'setsid', 'stat', 'stat_result', 'strerror', 'symlink', 'sys', 'system', 'umask', 'unlink', 'unsetenv', 'urandom', 'utime', 'wait', 'waitpid', 'walk', 'write']
msg7647 (view) Author: Alan Kennedy (amak) Date: 2013-02-09.13:39:54
Interestingly, the cpython people want to deprecate the stat_float_times function.

Remove os.stat_float_times

Please can you link to the django code that uses this?
msg7654 (view) Author: Josh Smeaton (smeatonj) Date: 2013-02-10.00:22:20 was accepted into core, meaning the dependency is now resolved dynamically. This is the only spot in django that makes use of stat_float_times. I think it'd be fairly safe (in regards to django at least) to follow the python 3 direction.
msg7764 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-25.21:54:02
I set this as a doc issue, since really we probably won't be adding a stat_float_times function if it is going away in Python 3.
Date User Action Args
2013-02-25 21:54:02fwierzbickisetpriority: low
nosy: + fwierzbicki
messages: + msg7764
components: + Documentation, - Library
versions: + Jython 2.5, - 2.5.2
2013-02-10 00:22:20smeatonjsetmessages: + msg7654
2013-02-09 13:39:54amaksetnosy: + amak
messages: + msg7647
2011-07-26 08:00:15smeatonjcreate