Message210136
Nope, we can't fix it in zlib. As far as I can tell, the problem is that method_get() in descrobject.c passes in NULL for the module to PyCFunction_NewEx(). method_get gets the type as part of the descriptor protocol, but type objects in C don't appear to have a module pointer. Module objects in Python do seem to, so maybe we can get it from somewhere?
If we can't fix this, we'll have to go back to expressly writing the name of the module in the expression ("zlib.Z_FINISH"). I assume changing the expression to use Z_FINISH (etc) makes it work again?
I'm calling in Nick, maybe he'll know what to do.
Nick: default values in text signatures allow simple expressions. inspect.Signature looks up the values of constant-ish things like "sys.maxsize". It allows you to name constants from the local module without the module name first; it gets the module using the __module__ attribute on the callable. |
|
Date |
User |
Action |
Args |
2014-02-03 15:10:12 | larry | set | recipients:
+ larry, ncoghlan, serhiy.storchaka, yselivanov |
2014-02-03 15:10:12 | larry | set | messageid: <1391440212.83.0.0964971743029.issue20489@psf.upfronthosting.co.za> |
2014-02-03 15:10:12 | larry | link | issue20489 messages |
2014-02-03 15:10:12 | larry | create | |
|