Conversation
…ncs with kwonlys Also RFed to not just warn if kwonlys found but not requested explicitly to be included via include_kwonlyargs, but to raise ValueError similar to how inspect.getarg*spec behaves
apparently wrapt did smth fancy to keep access to __doc__, so we defer binding of __doc__ composed for __call__ all the way to @build_doc
7f1f9ca to
4d7dc45
Compare
|
Woohoo, not yet sure what docs are complaining about, but the rest seems to be happy, so it might be viable |
|
YES! I knew it. This is really cool. Thanks for taking it on! |
|
Ha - that test said fails on Windows and Mac so may be it wasn't really wrapt to blame! |
c01263c to
5e6fee7
Compare
|
ok, dropped that last TEMP optimistic commit (so test will remain skipped on OSX and windows). Fixed up docstring so it builds. Should be ready for tries/review/ and even merge unless some oddity detected |
Codecov Report
@@ Coverage Diff @@
## master #6190 +/- ##
==========================================
- Coverage 89.25% 88.60% -0.66%
==========================================
Files 317 319 +2
Lines 41366 41699 +333
==========================================
+ Hits 36920 36946 +26
- Misses 4446 4753 +307
Continue to review full report at Codecov.
|
mih
left a comment
There was a problem hiding this comment.
I think this should fly. Let's try it it! Thx!
A quick chat with @mih inspired me to look into it.... in a nutshell (more to come if feasible):
use
inspect.signatureinstead ofinspect.getargspecsince that one manages to get args offunctools.wrapsed functions. Source of information: https://stackoverflow.com/questions/147816/preserving-signatures-of-decorated-functions#comment68410839_147878remaining gotcha (TEMPorarily disabled that test ) -- not yet "binding"-- I think I came up with a good enough workaround__doc__toDataset.method--@build_docassigns__doc__to__call__later than@datasetmethodis invoked. So I guesswraptdoes some magic for__doc__to be always be queried for thewrapted functions.reworked
getargspecis based on the one in ENH/RF: Interface-s - add * to explicitly separate posargs from kwargs #6176 but redone on top - will conflict. If we go with this -- this one should take over ;-)oh well -- let's see if anything else breaks ;-)