STINNER Victor <[email protected]> added the comment:
> The documentation issue was fixed in issue23738. The documentation no longer
> claims that ns can be None. If specified it must be a tuple of floats.
tuple of integers, not tuple a floats.
Python 3.9 documentation says: "If ns is specified, it must be a 2-tuple of the
form (atime_ns, mtime_ns) where each member is an int expressing nanoseconds."
which is correct.
Python 3.9 now emits a DeprecationWarning when passing floats:
vstinner@apu$ ./python
Python 3.9.0a0 (heads/pr/15701-dirty:a0f335c74c, Sep 6 2019, 17:38:14)
>>> import os
>>> os.utime("x", ns=(1, 1))
>>> os.utime("x", ns=(0.1, 1))
<stdin>:1: DeprecationWarning: an integer is required (got type float).
Implicit conversion to integers using __int__ is deprecated, and may be removed
in a future version of Python.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue15382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com