This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2019-09-09 08:54:43vstinnersetrecipients: + vstinner, larry, roger.serwy, Arfrever, serhiy.storchaka, corona10
2019-09-09 08:54:43vstinnersetmessageid: <1568019283.5.0.047777193387.issue15382@roundup.psfhosted.org>
2019-09-09 08:54:43vstinnerlinkissue15382 messages
2019-09-09 08:54:43vstinnercreate