Message351365
> 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. |
|
Date |
User |
Action |
Args |
2019-09-09 08:54:43 | vstinner | set | recipients:
+ vstinner, larry, roger.serwy, Arfrever, serhiy.storchaka, corona10 |
2019-09-09 08:54:43 | vstinner | set | messageid: <1568019283.5.0.047777193387.issue15382@roundup.psfhosted.org> |
2019-09-09 08:54:43 | vstinner | link | issue15382 messages |
2019-09-09 08:54:43 | vstinner | create | |
|