[pypy-issue] [issue1452] No __name__ attribute on CFFI exposed functions

Donald Stufft tracker at bugs.pypy.org
Sun Apr 14 07:01:45 CEST 2013


New submission from Donald Stufft <donald.stufft at gmail.com>:

Functions exposed via CFFI do not have a __name__ attribute (and possibly
others?) this means that if you attempt to use functools.wraps on a CFFI exposed
function you'll get an exception:

    AttributeError: cdata 'int(*)(unsigned char *, unsigned char *, unsigned
long long, unsigned char *, unsigned char *)' has no attribute '__name__'

This does however work fine in CPython (2.x and 3.x).

----------
messages: 5571
nosy: dstufft, pypy-issue
priority: bug
release: 2.0
status: unread
title: No __name__ attribute on CFFI exposed functions

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1452>
________________________________________


More information about the pypy-issue mailing list