Skip to content

bpo-21302: Update time.sleep() doc for clock_nanosleep() #28311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 27 additions & 19 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Summary -- Release highlights
.. PEP-sized items next.



New Features
============

Expand Down Expand Up @@ -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()``,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

instead of ``CryptGenRandom()`` which is deprecated.
(Contributed by Dong-hee Na in :issue:`44611`.)


Expand All @@ -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
=======
Expand Down Expand Up @@ -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
=============
Expand Down Expand Up @@ -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
=======
Expand All @@ -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
======================

Expand Down Expand Up @@ -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.