]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-45678: Fix `singledispatchmethod` `classmethod`/`staticmethod` bug (GH...
authorAlex Waygood <Alex.Waygood@Gmail.com>
Thu, 4 Nov 2021 19:34:14 +0000 (19:34 +0000)
committerGitHub <noreply@github.com>
Thu, 4 Nov 2021 19:34:14 +0000 (20:34 +0100)
commiteffb72fa0f6f8f8ec92687fc6a29d63bbdb7e98d
treef208952205321839c900c3c6f1fcf9593c9ca62e
parent9a4604bf03b03d4c66d84f63c19d6893cc16392a
[3.9] bpo-45678: Fix `singledispatchmethod` `classmethod`/`staticmethod` bug (GH-29394)

This PR fixes a bug in the 3.9 branch where
``functools.singledispatchmethod`` did not properly wrap attributes such as
``__name__``, ``__doc__`` and ``__module__`` of the target method. It also
backports tests already merged into the 3.11 and 3.10 branches in #29328 and
#29390.

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Lib/functools.py
Lib/test/test_functools.py
Misc/NEWS.d/next/Library/2021-11-03-17-28-43.bpo-45678.Zj_O8j.rst [new file with mode: 0644]