#19540: Deprecation warning in the test suite under Python 3.3
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by aaugustin):
`os.stat_float_times()` was [http://bugs.python.org/issue14711 deprecated
in Python 3.3] because it was just a temporary solution to make the
upgrade to Python 2.3 easier and no one's supposed to be using it :/
The original report in #14665 didn't provide a way to reproduce the issue
but I assume is has to do with comparing mtimes across different storage
backends, which may store them with more or less precision.
For the built-in backends, the modification time of the files is obtained
by [http://docs.python.org/3/library/os.path.html#os.path.getmtime
os.path.getmtime] (in `django.core.files.storage.FileSystemStorage`). For
custom backends, everything is possible.
Rather than relying on a process-wide modification of the behavior of
`os.path.getmtime` — which may not work as expected with remote storage
backends — I'm going to round mtimes to integers before comparing them.
--
Ticket URL: <https://code.djangoproject.com/ticket/19540#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.