-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[3.9] bpo-45678: Fix singledispatchmethod
classmethod
/staticmethod
bug
#29394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ambv
merged 3 commits into
python:3.9
from
AlexWaygood:singledispatchmethod-wrapping-bug
Nov 4, 2021
Merged
[3.9] bpo-45678: Fix singledispatchmethod
classmethod
/staticmethod
bug
#29394
ambv
merged 3 commits into
python:3.9
from
AlexWaygood:singledispatchmethod-wrapping-bug
Nov 4, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…od` bug 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 #python#29328 and python#29390.
ambv
reviewed
Nov 4, 2021
Go ahead and "forward-port" the new tests, @AlexWaygood! |
AlexWaygood
added a commit
to AlexWaygood/cpython
that referenced
this pull request
Nov 4, 2021
In order to fix a bug in the 3.9 branch in python#29394, more tests were added to ``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly wrapped a target method, even if the target method had already been wrapped by multiple other decorators. This PR brings the new tests into the 3.11 and 3.10 branches as well.
Forward-port is here! #29412 😀 |
ambv
pushed a commit
that referenced
this pull request
Nov 5, 2021
In order to fix a bug in the 3.9 branch in #29394, more tests were added to ``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly wrapped a target method, even if the target method had already been wrapped by multiple other decorators. This PR brings the new tests into the 3.11 and 3.10 branches as well.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Nov 5, 2021
In order to fix a bug in the 3.9 branch in pythonGH-29394, more tests were added to ``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly wrapped a target method, even if the target method had already been wrapped by multiple other decorators. This PR brings the new tests into the 3.11 and 3.10 branches as well. (cherry picked from commit 32f55d1) Co-authored-by: Alex Waygood <[email protected]>
ambv
pushed a commit
that referenced
this pull request
Nov 5, 2021
In order to fix a bug in the 3.9 branch in GH-29394, more tests were added to ``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly wrapped a target method, even if the target method had already been wrapped by multiple other decorators. This PR brings the new tests into the 3.11 and 3.10 branches as well. (cherry picked from commit 32f55d1) Co-authored-by: Alex Waygood <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 alsobackports tests already merged into the 3.11 and 3.10 branches in #29328 and
#29390.
https://bugs.python.org/issue45678