Message351365
| Author |
vstinner |
| Recipients |
Arfrever, corona10, larry, roger.serwy, serhiy.storchaka, vstinner |
| Date |
2019年09月09日.08:54:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1568019283.5.0.047777193387.issue15382@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> 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. |
|