Issue 13544: Add qualname to functools.WRAPPER_ASSIGNMENTS (original) (raw)

Created on 2011-12-06 23:20 by ncoghlan, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
13544.patch gruszczy,2011-12-10 22:03 review
issue13544-1.patch meador.inge,2011-12-11 04:08 review
13544_2.patch gruszczy,2011-12-11 11:48 review
Messages (13)
msg148943 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-12-06 23:20
functools.update_wrapper() and functools.wraps() should copy the new property by default.
msg149193 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-12-10 22:03
Patch with tests.
msg149208 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011-12-11 04:08
Filip, with the exception of some minor whitespace problems (remember to run 'make patchcheck') and a missed testcase in 'TestWraps.test_default_update', this looks good to me. I was just about to attach a similar patch. Here is an updated patch with those minor fixes. Nick, does this look OK to you?
msg149219 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-12-11 10:08
I didn't know about `make patchcheck`, next time I will use it, thanks.
msg149220 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2011-12-11 10:17
Remove the "needs patch" keyword since this bug has a patch.
msg149222 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2011-12-11 10:42
Explicitly spelling out __qualname__ like that makes the tests a bit too sensitive to otherwise irrelevant details of the test layout. I suggest using comparisons like "self.assertEqual(wrapper.__qualname__, f.__qualname__)" and "self.assertNotEqual(wrapper.__qualname__, f.__qualname__)" to make sure they're the same or different as appropriate, without caring about their precise value (this is similar to what the tests already do for "dict_attr")
msg149224 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-12-11 11:48
Fixed tests.
msg149267 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011-12-12 01:28
On Sun, Dec 11, 2011 at 4:42 AM, Nick Coghlan <report@bugs.python.org> wrote: > Explicitly spelling out __qualname__ like that makes the tests a bit too sensitive to otherwise irrelevant details of the test layout. > > I suggest using comparisons like "self.assertEqual(wrapper.__qualname__, f.__qualname__)" and "self.assertNotEqual(wrapper.__qualname__, > f.__qualname__)" to make sure they're the same or different as appropriate, without caring about their precise value (this is similar to what the tests > already do for "dict_attr") Good point. I will commit Filip's latest patch that has these fixes.
msg149274 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-12-12 04:54
New changeset 963e98f5ad31 by Meador Inge in branch 'default': Issue #13544: Add __qualname__ to functools.WRAPPER_ASSIGNMENTS. http://hg.python.org/cpython/rev/963e98f5ad31
msg149275 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011-12-12 04:57
Thanks for the patch Filip.
msg149278 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-12-12 08:58
Pleasure :-)
msg149336 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-12-12 17:31
I suppose the status can be switched to "closed"?
msg149339 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011-12-12 17:46
Yup, oversight on my part. Thanks.
History
Date User Action Args
2022-04-11 14:57:24 admin set nosy: + georg.brandlgithub: 57753
2011-12-12 17:46:48 meador.inge set status: open -> closedmessages: +
2011-12-12 17:31:52 pitrou set nosy: + pitroumessages: +
2011-12-12 08:58:22 gruszczy set messages: +
2011-12-12 04:57:32 meador.inge set type: behaviorresolution: fixedmessages: + stage: patch review -> resolved
2011-12-12 04:54:39 python-dev set nosy: + python-devmessages: +
2011-12-12 01:28:29 meador.inge set messages: +
2011-12-11 11:48:34 gruszczy set files: + 13544_2.patchmessages: +
2011-12-11 10:42:50 ncoghlan set messages: + stage: needs patch -> patch review
2011-12-11 10:17:46 Ramchandra Apte set nosy: + Ramchandra Aptemessages: +
2011-12-11 10:08:05 gruszczy set messages: +
2011-12-11 04:08:57 meador.inge set files: + issue13544-1.patchnosy: + meador.ingemessages: +
2011-12-10 22:03:47 gruszczy set files: + 13544.patchnosy: + gruszczymessages: + keywords: + patch
2011-12-10 15:43:12 eric.araujo set nosy: + rhettinger, eric.araujo
2011-12-06 23:20:27 ncoghlan create