[omniORB] omniorbpy patch for new style python objects

Duncan Grisby duncan at grisby.org
Thu Dec 15 12:15:20 GMT 2005


On Wednesday 14 December, Alastair Tse wrote:

> I posted this a couple months back but didn't get a response, so I'm
> reposting it again so at least I get a comment on why it might not be
> suitable for inclusion in the tree.

I thought I'd replied at the time, but I guess not...

> Since Python 2.3, the threading.Thread class in python (and many
> others) are new style objects. That means the inherit from the
> "object" class rather than no class at all.

I think it's a very bad idea to derive servant classes from
threading.Thread. It confuses to unrelated sets of functionality. One
day it might cause your code to fail if either omniORB or the threading
module change in some way.

Having said that, the omniORBpy 3 development strand has relaxed the
need for lots of things, including servants, to be objects with
old-style classes.

I don't want to integrate your patch to omniORBpy 2 because it's a
fairly major change. It also looks like it will be incompatible with old
Python versions, and will have a performance impact.

If you really need to use new-style classes for your servants, the best
bet is to use omniORBpy 3.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list