[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2aa6c1e35b8a by Nick Coghlan in branch 'default': Close #13266: Add inspect.unwrap http://hg.python.org/cpython/rev/2aa6c1e35b8a -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-07-16 Thread Aaron Iles
Aaron Iles added the comment: My +1 is for the callback based approach. The brevity of the search loop for finding the innermost function is (in my opinion at least) non-obvious, relying on for loops not having their own scope as it does. If a generator based API was adopted instead, I

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-07-15 Thread Nick Coghlan
Nick Coghlan added the comment: Added a version that allows the iteration to be terminated early if certain criteria are met, which is needed for a robust implementation of inspect.signature. However, I'm thinking the callback based approach in this version isn't especially Pythonic, so I'm

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-05-24 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-03-24 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-03-19 Thread Nick Coghlan
Nick Coghlan added the comment: Turns out there's a bug in the implementation of functools.update_wrapper :P Added that as a dependency, since this API doesn't make sense until update_wrapper is behaving itself. The new tests didn't pick it up because they don't use wraps or update_wrapper,

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-11-22 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-11-04 Thread Daniel Urban
Daniel Urban added the comment: I've attached a patch addressing the comments on Rietveld. I've added another modification: inspect.signature uses inspect.unwrap. (It already tried to unwrap the function, but it wasn't protected from infinite recursion. I don't know if this worth fixing in

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-10-29 Thread Aaron Iles
Aaron Iles added the comment: I've updated the patch for the current default branch (to be Python 3.4) and added documentation to the inspect module for the new unwraps function. Functionally unwraps and it's tests are unchanged. -- Added file:

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-08-29 Thread Aaron Iles
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-08-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-04-25 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: I've attached a patch implementing inspect.unwrap (+ some tests). -- keywords: +patch Added file: http://bugs.python.org/file25368/inspect_unwrap.patch ___ Python tracker rep...@bugs.python.org

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-27 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-26 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: After a little thought, I think the explicit unwrap function is the only viable approach. Doing the unwrapping implicitly just has too many nasty corner cases to track down to ensure we aren't losing existing functionality. I'd also suggest

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-26 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2011-10-26 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list