[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2020-07-30 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile nosy_count: 3.0 -> 4.0 pull_requests: +20834 pull_request: https://github.com/python/cpython/pull/21100 ___ Python tracker

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch moves the signature to an internal helper that takes an additional flag - whether or not to follow wrapper chains. getfullargspec() now calls this with the flag turned off, and that is passed down to any recursive calls. I'll be offline again

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, thanks for writing this patch! That's probably OK though - previously those wouldn't report signatures at all. I honestly don't think it is OK. I think we should stick to the behaviour of old 'getfullargspec' consistently, to make its behaviour

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Nick Coghlan
Nick Coghlan added the comment: Your version looks good to me, Yury (and good idea to add the second flag). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684 ___

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Nick. Do you want me to commit the patch? (Larry will x-ray the patch before including it in 3.4rc2) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I think push this (with NEWS etc) for 3.4.1, then create the cherry pick patch for Larry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684 ___

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Larry Hastings
Larry Hastings added the comment: My only question: do they need to be independent flags? ISTM that they're always either both True or both False. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: My only question: do they need to be independent flags? ISTM that they're always either both True or both False. I'd keep them independent solely to make the code easier to read/audit. As, for instance, a combined argument won't make sense for someone who

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Nick Coghlan
Nick Coghlan added the comment: I think in 3.5 it may actually make sense to expose these as options (perhaps with different names), so yeah, I think separate flags is reasonable. The only plausible combined name would also be something like legacy, and that would need to be assigned to more

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: Committed in 65fb95578f94 .. forgot to add the issue # in the commit message :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684 ___

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684 ___

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: Issue #20688 to track cherry-picking this into 3.4.0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20684 ___

[issue20684] inspect.getfullargspec (etc) incorrectly follows __wrapped__ chains

2014-02-19 Thread Yury Selivanov
Yury Selivanov added the comment: I think in 3.5 it may actually make sense to expose these as options (perhaps with different names), so yeah, I think separate flags is reasonable. +1 on thinking about exposing your 'follow_wrapper_chains' option in 3.5. I'll create an issue. --