[issue3445] Ignore missing attributes in functools.update_wrapper

2021-10-23 Thread Yoann Aubineau
Change by Yoann Aubineau : -- nosy: -yaubi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue3445] Ignore missing attributes in functools.update_wrapper

2012-02-25 Thread Éric Araujo
Éric Araujo added the comment: Well, Nick judged that this was not a bug per se, but rather a request for enhancement, thus it was only committed to 3.3. -- ___ Python tracker _

[issue3445] Ignore missing attributes in functools.update_wrapper

2012-02-25 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue3445] Ignore missing attributes in functools.update_wrapper

2012-02-25 Thread Yaniv Aknin
Yaniv Aknin added the comment: Shouldn't this be fixed in 2.7 as well? It's a bug, it's in the wild, and it's causing people to do ugly (and maybe not 100% reliable) things like https://code.djangoproject.com/browser/django/trunk/django/utils/decorators.py#L68 -- nosy: +Yaniv.Aknin

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-08-16 Thread Nick Coghlan
Nick Coghlan added the comment: Implemented in r84132 (not based on this patch though). -- stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-07-18 Thread Nick Coghlan
Nick Coghlan added the comment: That would be me :) In line with the 'consenting adults' philosophy and with the current behaviour causing real world problems, I'll accept this RFE and check it in soon. -- assignee: -> ncoghlan resolution: -> accepted __

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-07-18 Thread Mark Lawrence
Mark Lawrence added the comment: Is there anyone who can provide this issue with a bit of TLC as it's almost the 2nd birthday? -- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7, Python 3.1 ___ Python tracker

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-05-03 Thread July Tikhonov
July Tikhonov added the comment: To Evan Klitzke (eklitzke): >I'm also interested in seeing this fixed. In the current behavior, >the following code doesn't work: > ><<< start code >from functools import wraps > >def magic(func): > @wraps(func) > def even_more_magic(*args): >

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-05-02 Thread July Tikhonov
July Tikhonov added the comment: Patch updated: bound and unbound methods, user-defined callable, partial object included in test. By the way, >>> [id(abs.__doc__) for i in range(5)] [140714383081744, 140714383081744, 140714383081744, 140714383081744, 140714383081744] >>> [id(s) for s in [ab

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-03-31 Thread Yoann Aubineau
Changes by Yoann Aubineau : -- nosy: +yaubi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-03-12 Thread Russell Keith-Magee
Russell Keith-Magee added the comment: As an extra data point: we just hit this problem in Django ticket #13093 (http://code.djangoproject.com/ticket/13093). In our case, a decorator was using wraps(); however, that decorator was breaking when it was used on a class with a __call__ method, be

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be better to test with some of the real world examples given in this issue: str.split, and a functools.partial object. -- ___ Python tracker _

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-16 Thread Brian Curtin
Brian Curtin added the comment: In your test, the more common convention is to use assertFalse(foo) instead of assert_(not foo). -- keywords: +needs review nosy: +brian.curtin stage: -> patch review ___ Python tracker

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Evan Klitzke
Evan Klitzke added the comment: New patch included, with a test case. I had wanted to check the classmethod __module__ thing directly, but that proved to be elusive, since the classmethod gets the __module__ attribute if the module is '__main__', and you can't delete that attribute. My test j

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should come with an unit test (in Lib/test/test_functools.py). -- ___ Python tracker ___ _

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-13 Thread Evan Klitzke
Evan Klitzke added the comment: I'm also interested in seeing this fixed. In the current behavior, the following code doesn't work: <<< start code from functools import wraps def magic(func): @wraps(func) def even_more_magic(*args): return func(*args) r

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-08-21 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: If the object being wrapped isn't a plain vanilla function, then the odds are *very* good that __doc__ cannot be copied to the new function and still be correct. This is definitely the case for both modules and partial objects. So for both the

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-08-21 Thread Piotr Findeisen
Piotr Findeisen <[EMAIL PROTECTED]> added the comment: IMO, I'd be better to always ignore missing attributes. Consider another use case (following code I've posted also on comp.lang.python): from functools import wraps, partial def never_throw(f): @wraps(f) def wrapper(*args, **kwargs):

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-07-28 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Another possibility would be for methods to also get the __name__ and __module__ attributes. I don't see any counter-indication to it. -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]>

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-07-27 Thread Antoine d'Otreppe
Antoine d'Otreppe <[EMAIL PROTECTED]> added the comment: Thank you for considering this report :) ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-07-27 Thread Nick Coghlan
Changes by Nick Coghlan <[EMAIL PROTECTED]>: -- title: functools.update_wrapper bug -> Ignore missing attributes in functools.update_wrapper ___ Python tracker <[EMAIL PROTECTED]> ___