]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 1 Apr 2019 07:59:24 +0000 (10:59 +0300)
committerGitHub <noreply@github.com>
Mon, 1 Apr 2019 07:59:24 +0000 (10:59 +0300)
commita37f356de19828241bf19129f804369794c72ed3
tree8d91421e049ae0a2781ff6c5b3a2352c3ec89071
parent5e233951d931acc0e927100c51e9a27a2791b6a5
[3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645)

The following arguments can be passed as keyword arguments for passing
to other function if the corresponding required argument is passed as
positional:

- "func" in functools.partialmethod(), weakref.finalize(),
  profile.Profile.runcall(), cProfile.Profile.runcall(),
  bdb.Bdb.runcall(), trace.Trace.runfunc() and
  curses.wrapper().
- "function" in unittest.addModuleCleanup() and
  unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
  and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
  contextlib.AsyncExitStack.callback() and
  contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in multiprocessing.managers.Server.create().
- "obj" in weakref.finalize().

(cherry picked from commit 42a139ed88c487f325a241c6ee8b308b3c045975)
20 files changed:
Lib/bdb.py
Lib/cProfile.py
Lib/concurrent/futures/_base.py
Lib/concurrent/futures/process.py
Lib/concurrent/futures/thread.py
Lib/contextlib.py
Lib/curses/__init__.py
Lib/functools.py
Lib/multiprocessing/managers.py
Lib/profile.py
Lib/test/test_concurrent_futures.py
Lib/test/test_contextlib.py
Lib/test/test_contextlib_async.py
Lib/test/test_functools.py
Lib/test/test_trace.py
Lib/test/test_weakref.py
Lib/trace.py
Lib/unittest/case.py
Lib/weakref.py
Misc/NEWS.d/next/Library/2019-03-31-10-21-54.bpo-36492.f7vyUs.rst [new file with mode: 0644]