Thread: [Orbit-python-list] Porting to Python 2.0b1
Status: Inactive
Brought to you by:
tack
From: Roland M. <ma...@ec...> - 2000-09-06 16:54:37
|
I got the following message in my server under Python 2.0b1: ** WARNING **: Exception must be derived from CORBA.UserException Using the current CVS code slightly patched: I just commented out the offending code causing errors with threading (reported in another message). This bug happens when I use Python 2.0b1 but not when I use Python 1.5.2. After a bit of searching, it appears that the function init_exceptions() (in src/except.c) is not called. After another bit of searching, it appears that init_exceptions() is in fact called, but unfortunately it's not ours. I don't know what Python 2.0b1's does, but I'm pretty confident ;-) that it does not create the CORBA.UserException and CORBA.SystemException exceptions. I therefore suggest renaming at least some of ORBit-Python's functions to something with a prefix (I used "OPY_" as a quick hack, but I don't intend to keep it). I'll grep through the sources of ORBit-Python, then nm through libpython2.0.a, see the intersection of the function names thusly obtained, and rename them. Expect a series of CVS commits soon :-) BTW: how do I add a conditional to ./configure so that I can keep the threading support out? (Or alternatively, when will it be fixed? :-) (BTW² for Jason: I'll also have a look at the memory leaks, since I still encounter them. You have any ideas where to look?) Have fun, Roland. -- Roland Mas Mou ichido ! Hayaku ! Ookii koede ! -- Atsuko Sasaki |
From: Roland M. <ma...@ec...> - 2000-09-07 15:44:21
|
Roland Mas (2000-09-06 18:54:34 +0200) : > I therefore suggest renaming at least some of ORBit-Python's > functions to something with a prefix (I used "OPY_" as a quick hack, > but I don't intend to keep it). I'll grep through the sources of > ORBit-Python, then nm through libpython2.0.a, see the intersection of > the function names thusly obtained, and rename them. Expect a series > of CVS commits soon :-) Not there yet, but here is an intermediate hack, committed to CVS. From the ChangeLog: * added a #define and some #ifndef's to make it easy to temporarily comment out the (unfortunately buggy) thread-safe-ication code. That code will probably have to go when the bug is fixed. * renamed init_exceptions() to ORBit_Python_init_exceptions() to avoid namespace conflict with a similarly named function appearing in Python 2.0. Works fine with 2.0b1. > BTW: how do I add a conditional to ./configure so that I can keep > the threading support out? (Or alternatively, when will it be > fixed? :-) Probably not worth adding a conditional. I added #ifndef's, so you can type 'make CFLAGS="-DORBIT_PYTHON_NOT_THREADED"', and anyway that code is supposed to go away at some point. Roland. -- Roland Mas Sauvez les castors, plantez des arbres. |
From: Jason T. <ta...@li...> - 2000-09-07 16:39:46
|
> * added a #define and some #ifndef's to make it easy to temporarily > comment out the (unfortunately buggy) thread-safe-ication code. > That code will probably have to go when the bug is fixed. Are you referring to the changes I added? What bugs have you observed from the code? > * renamed init_exceptions() to ORBit_Python_init_exceptions() to avoid > namespace conflict with a similarly named function appearing in > Python 2.0. Works fine with 2.0b1. That's fine; we might as well rename all the other init_ functions to use this convention as well. I've unfortunately been a little quiet lately. I'm working on another project for work right now that's occupying most of my time. Fortunately this is stuff I get to release back to the community, so getting paid to work on it is a nice bonus. :) Jason. |
From: Roland M. <ma...@ec...> - 2000-09-07 17:11:57
|
Jason Tackaberry (2000-09-07 12:47:36 -0400) : > > * added a #define and some #ifndef's to make it easy to temporarily > > comment out the (unfortunately buggy) thread-safe-ication code. > > That code will probably have to go when the bug is fixed. > > Are you referring to the changes I added? What bugs have you observed > from the code? Well, I as I stated in another message (September the 5th), I get an error (PyThreadState_Get: no current thread) every time a server tries to execute a request via CORBA if the request is to be executed in the same process. > > * renamed init_exceptions() to ORBit_Python_init_exceptions() to avoid > > namespace conflict with a similarly named function appearing in > > Python 2.0. Works fine with 2.0b1. > > That's fine; we might as well rename all the other init_ functions to > use this convention as well. Okay, I'll do that part. Well, my Emacs will, at any rate :-) Roland. -- Roland Mas La menace de la baffe pèse plus lourd que la baffe elle-même. -- in Sri Raoul le petit yogi (Gaudelette) |
From: Roland M. <ma...@ec...> - 2000-09-08 08:47:51
|
Roland Mas (2000-09-07 19:11:54 +0200) : > Jason Tackaberry (2000-09-07 12:47:36 -0400) : [Roland Mas:] > > > * renamed init_exceptions() to ORBit_Python_init_exceptions() to avoid > > > namespace conflict with a similarly named function appearing in > > > Python 2.0. Works fine with 2.0b1. > > > > That's fine; we might as well rename all the other init_ functions to > > use this convention as well. > > Okay, I'll do that part. Well, my Emacs will, at any rate :-) Done, tested, went into CVS. Roland. -- Roland Mas Mou ichido ! Hayaku ! Ookii koede ! -- Atsuko Sasaki |