msg148943 - (view) |
Author: Alyssa Coghlan (ncoghlan) *  |
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) *  |
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) *  |
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) *  |
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)  |
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) *  |
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) *  |
Date: 2011-12-12 17:31 |
I suppose the status can be switched to "closed"? |
|
|
msg149339 - (view) |
Author: Meador Inge (meador.inge) *  |
Date: 2011-12-12 17:46 |
Yup, oversight on my part. Thanks. |
|
|