summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-09-13 15:40:25 (GMT)
committerGitHub <noreply@github.com>2021-09-13 15:40:25 (GMT)
commit85dc53a463967659075744ad911d08a32aa70dd5 (patch)
treef9aa5467fc2644e7306aa8bb4a69a887ba3bdddd
parent85a4748118c3793be7047ecbcbfc79dd07cb2a75 (diff)
downloadcpython-85dc53a463967659075744ad911d08a32aa70dd5.zip
cpython-85dc53a463967659075744ad911d08a32aa70dd5.tar.gz
cpython-85dc53a463967659075744ad911d08a32aa70dd5.tar.bz2
bpo-21302: Update time.sleep() doc for clock_nanosleep() (GH-28311)
Clean-up also What's New in Python 3.11 doc: move entries to the correct sections.
-rw-r--r--Doc/library/time.rst5
-rw-r--r--Doc/whatsnew/3.11.rst46
2 files changed, 32 insertions, 19 deletions
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index cfd67e8..34cb28f 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -362,6 +362,11 @@ Functions
by a signal, except if the signal handler raises an exception (see
:pep:`475` for the rationale).
+ .. versionchanged:: 3.11
+ In Unix operating systems, the ``clock_nanosleep()`` function is now
+ used, if available: it allows to sleep for an interval specified with
+ nanosecond precision.
+
.. index::
single: % (percent); datetime format
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 4865404..7619e48 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -66,7 +66,6 @@ Summary -- Release highlights
.. PEP-sized items next.
-
New Features
============
@@ -209,8 +208,8 @@ math
os
--
-* On Windows, :func:`os.urandom` uses ``BCryptGenRandom()`` instead of ``CryptGenRandom()``
- which is deprecated.
+* On Windows, :func:`os.urandom` now uses ``BCryptGenRandom()``,
+ instead of ``CryptGenRandom()`` which is deprecated.
(Contributed by Dong-hee Na in :issue:`44611`.)
@@ -232,6 +231,14 @@ sqlite3
(Contributed by Aviv Palivoda, Daniel Shahaf, and Erlend E. Aasland in
:issue:`16379`.)
+time
+----
+
+* In Unix operating systems, :func:`time.sleep` now uses the
+ ``clock_nanosleep()`` function, if available, which allows to sleep for an
+ interval specified with nanosecond precision.
+ (Contributed by Livius and Victor Stinner in :issue:`21302`.)
+
Removed
=======
@@ -265,6 +272,18 @@ Removed
and :class:`fileinput.FileInput`, deprecated since Python 3.9.
(Contributed by Hugo van Kemenade in :issue:`45132`.)
+* The following deprecated functions and methods are removed in the :mod:`gettext`
+ module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`,
+ :func:`~gettext.lngettext` and :func:`~gettext.ldngettext`.
+
+ Function :func:`~gettext.bind_textdomain_codeset`, methods
+ :meth:`~gettext.NullTranslations.output_charset` and
+ :meth:`~gettext.NullTranslations.set_output_charset`, and the *codeset*
+ parameter of functions :func:`~gettext.translation` and
+ :func:`~gettext.install` are also removed, since they are only used for
+ the ``l*gettext()`` functions.
+ (Contributed by Dong-hee Na and Serhiy Storchaka in :issue:`44235`.)
+
Optimizations
=============
@@ -317,6 +336,10 @@ Deprecated
It is untested and undocumented and also not used by webbrowser itself.
(Contributed by Dong-hee Na in :issue:`42255`.)
+* The behavior of returning a value from a :class:`~unittest.TestCase` and
+ :class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the
+ default ``None`` value), is now deprecated.
+
Removed
=======
@@ -334,6 +357,7 @@ Removed
* Remove the deprecated ``split()`` method of :class:`_tkinter.TkappType`.
(Contributed by Erlend E. Aasland in :issue:`38371`.)
+
Porting to Python 3.11
======================
@@ -476,19 +500,3 @@ Removed
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization Configuration
<init-config>` instead (:pep:`587`).
(Contributed by Victor Stinner in :issue:`44113`.)
-
-* The following deprecated functions and methods are removed in the :mod:`gettext`
- module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`,
- :func:`~gettext.lngettext` and :func:`~gettext.ldngettext`.
-
- Function :func:`~gettext.bind_textdomain_codeset`, methods
- :meth:`~gettext.NullTranslations.output_charset` and
- :meth:`~gettext.NullTranslations.set_output_charset`, and the *codeset*
- parameter of functions :func:`~gettext.translation` and
- :func:`~gettext.install` are also removed, since they are only used for
- the ``l*gettext()`` functions.
- (Contributed by Dong-hee Na and Serhiy Storchaka in :issue:`44235`.)
-
-* The behavior of returning a value from a :class:`~unittest.TestCase` and
- :class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the default ``None``
- value), is now deprecated.