summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-10-24 09:02:00 (GMT)
committerGitHub <noreply@github.com>2017-10-24 09:02:00 (GMT)
commit01b5aab7bfb11ee5476ef52d24495598cbe7c99a (patch)
treed21899c9bf7a80014b9e14bd27c0cf88ed6da290 /Doc
parent87d332dcdbffe8ff60d99f74b1ad241c0967b055 (diff)
downloadcpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.zip
cpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.tar.gz
cpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.tar.bz2
bpo-31827: Remove os.stat_float_times() (GH-4061)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.path.rst10
-rw-r--r--Doc/library/os.rst29
-rw-r--r--Doc/whatsnew/3.7.rst4
3 files changed, 6 insertions, 37 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 38a9331..06d4ece 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -192,23 +192,17 @@ the :mod:`glob` module.)
.. function:: getatime(path)
- Return the time of last access of *path*. The return value is a number giving
+ Return the time of last access of *path*. The return value is a floating point number giving
the number of seconds since the epoch (see the :mod:`time` module). Raise
:exc:`OSError` if the file does not exist or is inaccessible.
- If :func:`os.stat_float_times` returns ``True``, the result is a floating point
- number.
-
.. function:: getmtime(path)
- Return the time of last modification of *path*. The return value is a number
+ Return the time of last modification of *path*. The return value is a floating point number
giving the number of seconds since the epoch (see the :mod:`time` module).
Raise :exc:`OSError` if the file does not exist or is inaccessible.
- If :func:`os.stat_float_times` returns ``True``, the result is a floating point
- number.
-
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 86add0c..95c8113 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2335,8 +2335,6 @@ features:
* the time of creation on Windows, expressed in nanoseconds as an
integer.
- See also the :func:`stat_float_times` function.
-
.. note::
The exact meaning and resolution of the :attr:`st_atime`,
@@ -2431,33 +2429,6 @@ features:
Added the :attr:`st_file_attributes` member on Windows.
-.. function:: stat_float_times([newvalue])
-
- Determine whether :class:`stat_result` represents time stamps as float objects.
- If *newvalue* is ``True``, future calls to :func:`~os.stat` return floats, if it is
- ``False``, future calls return ints. If *newvalue* is omitted, return the
- current setting.
-
- For compatibility with older Python versions, accessing :class:`stat_result` as
- a tuple always returns integers.
-
- Python now returns float values by default. Applications which do not work
- correctly with floating point time stamps can use this function to restore the
- old behaviour.
-
- The resolution of the timestamps (that is the smallest possible fraction)
- depends on the system. Some systems only support second resolution; on these
- systems, the fraction will always be zero.
-
- It is recommended that this setting is only changed at program startup time in
- the *__main__* module; libraries should never change this setting. If an
- application uses a library that works incorrectly if floating point time stamps
- are processed, this application should turn the feature off until the library
- has been corrected.
-
- .. deprecated:: 3.3
-
-
.. function:: statvfs(path)
Perform a :c:func:`statvfs` system call on the given path. The return value is
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 11b99e2..5bff3a4 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -507,6 +507,10 @@ Removed
API and Feature Removals
------------------------
+* The ``os.stat_float_times()`` function has been removed. It was introduced in
+ Python 2.3 for backward compatibility with Python 2.2, and was deprecated
+ since Python 3.1.
+
* Unknown escapes consisting of ``'\'`` and an ASCII letter in replacement
templates for :func:`re.sub` were deprecated in Python 3.5, and will now
cause an error.