diff options
author | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2019-05-28 07:10:59 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-28 07:10:59 (GMT) |
commit | 3880f263d2994fb1eba25835dddccb0cf696fdf0 (patch) | |
tree | 0c40e3b7cab9b3aa59600cec290548709d7c7dc4 /Doc/library/sys.rst | |
parent | 436c2b0d67da68465e709a96daac7340af3a5238 (diff) | |
download | cpython-3880f263d2994fb1eba25835dddccb0cf696fdf0.zip cpython-3880f263d2994fb1eba25835dddccb0cf696fdf0.tar.gz cpython-3880f263d2994fb1eba25835dddccb0cf696fdf0.tar.bz2 |
bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) (GH-13577)
It has been documented as deprecated and to be removed in 3.8;
From a comment on another thread – which I can't find ; leave get_coro_wrapper() for now, but always return `None`.
https://bugs.python.org/issue36933
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 74aa271..5bde687 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -781,22 +781,6 @@ always available. for details.) Use it only for debugging purposes. -.. function:: get_coroutine_wrapper() - - Returns ``None``, or a wrapper set by :func:`set_coroutine_wrapper`. - - .. versionadded:: 3.5 - See :pep:`492` for more details. - - .. note:: - This function has been added on a provisional basis (see :pep:`411` - for details.) Use it only for debugging purposes. - - .. deprecated:: 3.7 - The coroutine wrapper functionality has been deprecated, and - will be removed in 3.8. See :issue:`32591` for details. - - .. data:: hash_info A :term:`struct sequence` giving parameters of the numeric hash @@ -1384,49 +1368,6 @@ always available. This function has been added on a provisional basis (see :pep:`411` for details.) Use it only for debugging purposes. -.. function:: set_coroutine_wrapper(wrapper) - - Allows intercepting creation of :term:`coroutine` objects (only ones that - are created by an :keyword:`async def` function; generators decorated with - :func:`types.coroutine` or :func:`asyncio.coroutine` will not be - intercepted). - - The *wrapper* argument must be either: - - * a callable that accepts one argument (a coroutine object); - * ``None``, to reset the wrapper. - - If called twice, the new wrapper replaces the previous one. The function - is thread-specific. - - The *wrapper* callable cannot define new coroutines directly or indirectly:: - - def wrapper(coro): - async def wrap(coro): - return await coro - return wrap(coro) - sys.set_coroutine_wrapper(wrapper) - - async def foo(): - pass - - # The following line will fail with a RuntimeError, because - # ``wrapper`` creates a ``wrap(coro)`` coroutine: - foo() - - See also :func:`get_coroutine_wrapper`. - - .. versionadded:: 3.5 - See :pep:`492` for more details. - - .. note:: - This function has been added on a provisional basis (see :pep:`411` - for details.) Use it only for debugging purposes. - - .. deprecated-removed:: 3.7 3.8 - The coroutine wrapper functionality has been deprecated, and - will be removed in 3.8. See :issue:`32591` for details. - .. function:: _enablelegacywindowsfsencoding() Changes the default filesystem encoding and errors mode to 'mbcs' and |