diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-05 15:22:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 15:22:31 (GMT) |
commit | 142566c028720934325f0b7fe28680afd046e00f (patch) | |
tree | 021875972731bf9271bf07cc05d17f15866ded7a /Doc/library | |
parent | 6c01ebcc0dfc6be22950fabb46bdc10dcb6202c9 (diff) | |
download | cpython-142566c028720934325f0b7fe28680afd046e00f.zip cpython-142566c028720934325f0b7fe28680afd046e00f.tar.gz cpython-142566c028720934325f0b7fe28680afd046e00f.tar.bz2 |
[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)
Turn deprecation warnings added in 3.8 into TypeError.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/bdb.rst | 2 | ||||
-rw-r--r-- | Doc/library/concurrent.futures.rst | 2 | ||||
-rw-r--r-- | Doc/library/contextlib.rst | 4 | ||||
-rw-r--r-- | Doc/library/curses.rst | 2 | ||||
-rw-r--r-- | Doc/library/profile.rst | 2 | ||||
-rw-r--r-- | Doc/library/trace.rst | 2 | ||||
-rw-r--r-- | Doc/library/unittest.rst | 2 | ||||
-rw-r--r-- | Doc/library/weakref.rst | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/bdb.rst b/Doc/library/bdb.rst index 116ffcf..7e4066c 100644 --- a/Doc/library/bdb.rst +++ b/Doc/library/bdb.rst @@ -343,7 +343,7 @@ The :mod:`bdb` module also defines two classes: For backwards compatibility. Calls the :meth:`run` method. - .. method:: runcall(func, *args, **kwds) + .. method:: runcall(func, /, *args, **kwds) Debug a single function call, and return its result. diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index f2491dd..34905c4 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -28,7 +28,7 @@ Executor Objects An abstract class that provides methods to execute calls asynchronously. It should not be used directly, but through its concrete subclasses. - .. method:: submit(fn, *args, **kwargs) + .. method:: submit(fn, /, *args, **kwargs) Schedules the callable, *fn*, to be executed as ``fn(*args **kwargs)`` and returns a :class:`Future` object representing the execution of the diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 73b24e5..0aa4ad7 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -416,7 +416,7 @@ Functions and classes provided: The passed in object is returned from the function, allowing this method to be used as a function decorator. - .. method:: callback(callback, *args, **kwds) + .. method:: callback(callback, /, *args, **kwds) Accepts an arbitrary callback function and arguments and adds it to the callback stack. @@ -473,7 +473,7 @@ Functions and classes provided: Similar to :meth:`push` but expects either an asynchronous context manager or a coroutine function. - .. method:: push_async_callback(callback, *args, **kwds) + .. method:: push_async_callback(callback, /, *args, **kwds) Similar to :meth:`callback` but expects a coroutine function. diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 7d1e753..c88d352 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -656,7 +656,7 @@ The module :mod:`curses` defines the following functions: foreground color on the default background. -.. function:: wrapper(func, ...) +.. function:: wrapper(func, /, *args, **kwargs) Initialize curses and call another callable object, *func*, which should be the rest of your curses-using application. If the application raises an exception, diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index d8039fd..8d589d2 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -309,7 +309,7 @@ functions: Profile the cmd via :func:`exec` with the specified global and local environment. - .. method:: runcall(func, *args, **kwargs) + .. method:: runcall(func, /, *args, **kwargs) Profile ``func(*args, **kwargs)`` diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst index 85fec68..c2732d9 100644 --- a/Doc/library/trace.rst +++ b/Doc/library/trace.rst @@ -166,7 +166,7 @@ Programmatic Interface environments. If not defined, *globals* and *locals* default to empty dictionaries. - .. method:: runfunc(func, *args, **kwds) + .. method:: runfunc(func, /, *args, **kwds) Call *func* with the given arguments under control of the :class:`Trace` object with the current tracing parameters. diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 5ec4b40..320d898 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1427,7 +1427,7 @@ Test cases :class:`TextTestResult` in Python 3.2. - .. method:: addCleanup(function, *args, **kwargs) + .. method:: addCleanup(function, /, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index a28d710..a5c4295 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -240,7 +240,7 @@ objects. .. versionadded:: 3.4 -.. class:: finalize(obj, func, *args, **kwargs) +.. class:: finalize(obj, func, /, *args, **kwargs) Return a callable finalizer object which will be called when *obj* is garbage collected. Unlike an ordinary weak reference, a finalizer |