[omniORB] OmniORBpy and new style classes

Paul Webb pw@bernafon.com.au
Thu, 7 Mar 2002 18:47:38 +1000 (EST)


> On Wednesday 6 March, Paul Webb wrote:
>
>> I have been trying out new style classes in Python 2.2 but it seems
>> they are incompatible with OmniORBpy (both 1.4 and a recent 2.0
>> snapshot).
>>
>> Is this the case or am I missing something?
>
> What exactly are you trying to do?  omniORBpy has no specific support
> for anything to do with new-style classes, but as far as I'm aware, it
> has no reason to.

If, for example, I change line 10 in the example/echo/example_echo_srv.py so
that the Echo_i class is also derived from 'object' (so that it becomes a
new-style class):

10 class Echo_i (Example__POA.Echo, object):

When I run the script I get :

Traceback (most recent call last):
  File "example_echo_srv.py", line 25, in ?
    eo = ei._this()
  File "g:\source\omni4\omni\lib\python\PortableServer.py", line 80, in _this
    sys.modules["PortableServer"] = omniORB.PortableServer
omniORB.CORBA.BAD_PARAM: Minor: BAD_PARAM_WrongPythonType, COMPLETED_NO.