testing-cabal / funcsigs

Python function signatures package for Python 2.6, 2.7 and 3.3+
http://pypi.python.org/pypi/funcsigs
Other
8 stars 13 forks source link

signature() does not provide ability to NOT follow wrapped #33

Closed tailg8nj closed 4 years ago

tailg8nj commented 5 years ago

If you see the API for inspect.signature, you will see it supports a follow_unwrapped argument. This backport does not provide the option of following the wrap chain or not. https://docs.python.org/3/library/inspect.html#inspect.signature

rbtcollins commented 5 years ago

This needs to be backported.

smarie commented 5 years ago

I was about to ask for it too :) - thanks for creating the ticket.

For the record I use the __wrapped__ signature trick in decopatch, so that exposed decorators can both have a generic signature from the code perspective, but a nice-looking signature from users perspective.

As of today I have to create specific tests for python 2.7 because of this funcsigs behaviour.

smarie commented 5 years ago

Done (see PR #37). Maybe this can ship together with the bound.apply_defaults fix that you recently made, in a new version ? This would be gladly appreciated as I have a few developments pending that are currently blocked in continuous integration on python 2 because of this.

Thanks for maintaining this package !

smarie commented 4 years ago

Hi, Any news about merging the PR that fixes this issue ? https://github.com/testing-cabal/funcsigs/pull/37 Thanks!

rbtcollins commented 4 years ago

We need some additional work done to fix CI - remove obsolete failing python versions; that kind of thing but all the current versions were passing so I've merged the PR

smarie commented 4 years ago

Great, thanks very much @rbtcollins !