This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, ncoghlan, serhiy.storchaka, yselivanov
Date 2014-02-03.15:10:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391440212.83.0.0964971743029.issue20489@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-02-03 15:10:12larrysetrecipients: + larry, ncoghlan, serhiy.storchaka, yselivanov
2014-02-03 15:10:12larrysetmessageid: <1391440212.83.0.0964971743029.issue20489@psf.upfronthosting.co.za>
2014-02-03 15:10:12larrylinkissue20489 messages
2014-02-03 15:10:12larrycreate