Skip to content

Commit b8c9ace

Browse files
committed
Address review
1 parent 578f22e commit b8c9ace

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ Deprecated
388388
* :mod:`functools`:
389389
Calling the Python implementation of :func:`functools.reduce` with *function*
390390
or *sequence* as keyword arguments is now deprecated.
391+
(Contributed by Kirill Podoprigora in :gh:`121676`.)
391392

392393
* :mod:`os`:
393394
:term:`Soft deprecate <soft deprecated>` :func:`os.popen` and

Lib/functools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,9 @@ def wrapper(*args, **kwargs):
11361136

11371137
reduce = _warn_kwargs(reduce)
11381138

1139+
# This import has been moved here due to gh-121676
1140+
# In Python3.16 _warn_kwargs should be removed, and this
1141+
# import should be moved right after the reduce definition
11391142
try:
11401143
from _functools import reduce
11411144
except ImportError:

0 commit comments

Comments
 (0)