[omniORB] im_func used in python3/omniidl_be/python.py

Duncan Grisby duncan at grisby.org
Sun Jun 2 22:31:24 BST 2019


On Mon, 2019-05-06 at 18:45 +0200, Guilhem Saurel via omniORB-list
wrote:

> Using Python 3 and a custom python backend¹, I got the following
> error:
> > AttributeError: 'function' object has no attribute 'im_func'
> 
> Python 2to3 porting guide² seems to indicate that 'im_func' no longer
> exists in Python 3.
> 
> So I tried to remove it³, and it fixed my use case.

Yes, it is a bug. The generated stub code is intended to work with both
Python 2 and Python 3, so the complete fix is to use a new function to
handle setting the docstring correctly, rather than have different
generated code between Python 2 and 3.

The fix is in svn, in the 4_2 branch.

Thanks,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list