Share

ORBit-Python

File Release Notes and Changelog

Release Name: 0.3.0

Notes:
At long last ORBit-Python version 0.3.0 is ready for public 
consumption. This release is a significant update from 
0.2.0, and anyone using a previous version is strongly 
advised to upgrade. Not only does 0.3.0 offer a slew of new 
features, but has also significantly improved in stability 
and memory usage. Specically, all known memory leaks have 
been plugged!

Some of the new features include: much improved compliance 
with the Python mapping specification, CORBA exceptions 
overhaul, object references implemented as class instances 
(useful for object introspection), works better with IDLs 
from the GNOME project, and an external API for extensions 
(such as bonobo-python), There have been many, many 
behind-the-scenes improvements, and suffice to say that the 
quality of the project has improved considerably since the 
first releases.



Changes: 2001-08-21 Jason Tackaberry <tack@linux.com> * orbit-python.spec.in: Fixed pydir so that it actually works; added orbit-python-config to orbit-python-devel package, and examples/ directory to docs in orbit-python package. * removed old test suite (and core ;) * Built 0.3.0 final. All rejoice. 2001-08-19 Jason Tackaberry <tack@linux.com> * src/server.c (operation_skel): significantly reworked how return values are handled. Added more useful comments, flattened out some unnecessary nesting, and included more parameter validation. The result is that now octet sequences in their various forms ("foo", (1, 2, 3, 4), ['a', 'b', 'c']) are now dealt with properly. * test-suite/BasicTest.py: removed B5 test for 0.3.0 release. It's still broken but it's not critical. * Built 0.3.0 RC2. Hopefully this is the one. :) 2001-08-17 Johan Dahlin <zilch.am@home.se> * src/server.c (operation_skel): Strings are now treated as sequences in return values. * test-suite/runtest.sh: set IDLPATH. * src/marshal.c (marshal_octet): Also accept a string of length 1. 2001-08-16 Christian Reis <kiko@async.com.br> * test-suite/BasicORB.py: add tests for parameterless ORB_init() * test-suite/ClientServer.py: fixed naming a bit, added skeleton for future ParameterReturnValue tests, added hopefully complete set of Parameter tests including octet sequence tests. * test-suite/TestHarness.py: implementation for added tests. * test-suite/Stress.py: changed default runs to 1000, changed names and letters of suites according to above. * test-suite/complete.idl: added IDL for tests implemented, did a lot of cleaning up, added future ParameterReturnValue skels. * test-suite/runtest.sh: added -gdb parameter to get backtraces. 2001-08-16 Jason Tackaberry <tack@linux.com> * src/server.c (operation_skel): if the servant doesn't implement the requested operation, raise BAD_OPERATION. * src/marshal.c: raise MARSHAL instead of BAD_PARAM on incorrect types. * src/marshal.c (marshal_sequence), src/demarshal.c (demarshal_sequence): map octet sequences to strings (PLMS §1.3.2) (johan). * src/marshal.c (marshal_sequence): return CORBA_FALSE if marshal_arg fails, not CORBA_TRUE. * src/marshal.c, src/CORBAmodule.c, src/api.c: PySequence_GetItem returns a _new_ reference! * src/demarshal.c (demarshal_sequence): for the octet sequence case, read len octets, not len-1. 2001-08-13 Jason Tackaberry <tack@linux.com> * src/idl.c (find_repo_id_from_typecode): return repo_id stored in typecode if it exists. * src/CORBA_Object.c (CORBA_Object_to_PyObject_with_Type): create an ORB PyObject for the ORB associated with the object if it doesn't exist instead of failing. * orbit-python-config.in: created * fixed small compiler warnings * Built 0.3.0 release candidate. 2001-08-11 Jason Tackaberry <tack@linux.com> * src/marshal.c, src/demarshal.c: merged patch by Johan Dahlin that handles marshalling/demarshalling of TypeCodes. 2001-06-10 Jason Tackaberry <tack@linux.com> * src/idl.c (find_repo_id_from_typecode): handle basic types explicitly, otherwise it might incorrectly find a typedef for one of the basic types. 2001-06-08 Jason Tackaberry <tack@linux.com> * src/orbit-python.h: added typedefs for various objects: PyORBit_Object, PyORBit_ORB, PyORBit_Any, etc. 2001-06-07 Jason Tackaberry <tack@linux.com> * src/CORBA_ORB.c (CORBA_ORB_PyObject__object_to_string): fixed leak (closes #4). 2001-06-07 Christian Reis <kiko@async.com.br> * Major test suite overhaul; more to come. * test-suite/.cvsignore: added *.pyc and tidbits. * test-suite/BasicTest.py: Numbered, commented and added basic instantiation tests for Inheritance and Delegation. * test-suite/ClientServer.py: Cleanups, numbered. * test-suite/ORBPOATest.py: Numbers added. * test-suite/BasicORB.py: Added very simple ORB_init and POA resolution tests. * test-suite/Stress.py: Major rewrite. Changed this to inherit from TestSuite so now we have our own Stress suite runs tests exactly the same way the plain TestSuite runs. Added commandline parsing for test ranges. * test-suite/stress-test.sh: Added -gdb and -nopp flags. 2001-06-06 Jason Tackaberry <tack@linux.com> * src/orbit-python.h: updated PyORBit_Any_Get to use the new function in api.c; removed CORBA_ORB parameter from Any_New. * src/CORBA_Object.c (CORBA_Object_to_PyObject_with_type): if an instance for the object exists and we return the original instance, free the CORBA object because the function steals the reference. * src/process_idl.c (get_idl_list_for_module): free 'files' hash table even if the IDL module can't be found. (Fixes leak with importing non-IDL modules.) * src/CORBAmodule.c (CORBA__ORB_init): fixed a couple leaks. * src/except.c (raise_system_exception): fixed leaks. * src/ORBPOATest.py: deactivate_object when necessary to prevent leaks. * test-suite/ORBPOATest.py: deactivate_object when necessary to prevent leaks. 2001-06-04 Jason Tackaberry <tack@linux.com> * src/server.c (operation_skel): don't deconstruct return tuple if array is expected. * src/marshal.c (marshal_long): might help to accept long values here. (marshal_double): coerce longs and ints to doubles. (marshal_short): small optimizations. * src/demarshal.c (demarshal_short): small optimizations. * Cleaned up various compiler warnings. * configure.in: stepped up the version requirements for ORBit to 0.5.7 * src/PortableServer.c (POA_PyObject__servant_to_reference): don't blindly DECREF result from activate_object without checking it first. * src/CORBA_ORB.c (CORBA_ORB_PyObject__resolve_initial_references): add workaround for ORBit bug (gnome bugzilla 55726); INCREF root_poa even if it already exists before returning. * src/test-suite/ORBPOATest.py: several fixes. * src/test-suite/runtest.sh, stresstest.sh: kill server after finished. * src/CORBA_ORB.c (CORBA_ORB_PyObject__run): restore the default signal handler for SIGINT so that Ctrl-C works while the ORB is running. * src/idl.c (_find_repo_id_func): compare address for complex types, compare typecode for basic types. * src/api.c: started to implement PyORBit_Any_Get, which does the opposite of PyORBit_Any_New. These encoding functions can also be used in the ORBit2 port. Right now it's only partially implemented, leaks memory, and is mostly untested. * examples/random: example to fetch random numbers from random.org * examples/dynamic: example to fetch IDL from a server and illustrate introspection. 2001-06-03 Jason Tackaberry <tack@linux.com> * src/process_idl.c (process_idl_file): detect which #define's need to be made for the IDL to compile properly. (get_defines_for_file) new function that returns a list of defines to properly compile this IDL. * src/CORBAmodule.c (get_idl_params_as_string): accept a list from get_defines_for_file. * src/process_idl.c (find_module_from_path): import the whole IDL module if a specific interface from that module was requested. * src/demarshal.c (demarshal_arg): handle CORBA_tk_octet (where'd it go??). If demarshal_* calls demarshal_arg and it returns NULL, also return NULL; fixed memory leaks on certain error conditions; removed FIXMEs for raising system exceptions instead of calling d_warning. * src/api.c: implemented PyORBit_Any_New, which constructs a CORBA_Any_PyObject out of a CORBA_any. This required a lot of code since I pretty much had to duplicate demarshal.c, except instead of demarshalling from a GIOP buffer, I'm decoding from a bunch of gpointers. The good news is that this code can be mostly reused when we port to ORBit2. At this point this code is totally untested, and aside from the fact that it compiles, I have no idea how well it will work, or if it'll even work at all, for that matter. Johan is my tester. :) * src/PortableServer.c: Resurrected POA::the_POAManager because, hey, it's a transparent accessor for _get_the_POAManager. Duh. * src/idl.c (construct_interface): IDL stub classes now set the class name and __module__ value correctly. * examples/echo/: ported the Echo example from ORBit. 2001-06-02 Jason Tackaberry <tack@linux.com> * src/orbit-python.h: in _ORBitPython_FunctionStruct, orb_any becomes any_new. * src/idl.c: prefix operations that conflict with python keywords with an underscore (PLMS §1.2). * src/CORBA_module.c (CORBA__ORB_init): arguments are optional (PLMS §1.6). * src/server.c (Servant_PyClass__default_POA): implicitly call resolve_initial_references to get the RootPOA if necessary (#427973) * src/PortableServer.c (servant_to_reference): moved implicit activation here (from _this()), and it is only done if the POA policy specifies IMPLICIT_ACTIVATION. * src/CORBAmodule.h: created 2 new macros, d_assert and d_assert_val, which raise exceptions on fail, or call g_assert if DEBUG is set. This way production code will fail gracefully, returning control to Python space, while debug code will dump core for further debugging. * Replaced most g_assert's to d_assert. Still need to do src/idl.c, but that will require some reorganization. * src/PortableServer.c (POA_PyObject__activate_object_with_id): implemented. * src/CORBAmodule.c (auto_load_module_idls): handle import case "from Mod__POA import Interface" and "import Mod__POA.Interface" 2001-05-28 Jason Tackaberry <tack@linux.com> * src/server.c (get_class_glue_from_instance, get_class_glue_from_class): made code much more sane; fixed segfault. * Added 2 more global hashes: orb_objects, which maps CORBA_ORBs to CORBA_ORB_PyObjects, and poa_objects, which maps PortableServer_POA objects to POA_PyObjects. * src/CORBA_Object.c (CORBA_Object_to_PyObject_with_type): figure out the ORB associated with this object and store it in the instance glue * src/PortableServer.c (POA_Object_to_PyObject): figure out the ORB associated with the POA object and store it in the type object record; return the PyObject for this POA object if it already exists rather than create a new one. * src/demarshal.c: pass the CORBA_ORB around to the functions that need it. All this is pretty much for demarshal_object. * src/CORBA_ORB.c (CORBA_ORB_PyObject__new): return the PyObject for this ORB if it already exists rather than create a new one; remove the now deprecated orb_instance * ChangeLog: fixed ugly formatting from Roland's entries, and replaced tabs with whitespaces from Christian's. Okay, I'm pedantic. * src/orbit-python.h: fixed PyORBit_Object_Check and PyORBit_Object_Get macros. 2001-05-27 Jason Tackaberry <tack@linux.com> * src/api.[c,h]: created for external API methods * src/api.c: implemented PyORBit_Object_Check and PyORBit_Object_Get to work with the new objref code. * src/Makefile.am: updated for api.c * src/demarshal.c (demarshal_exception): DECREF data parameter after calling raise_user_exception; fixes leak. * src/client.c (_stub_func): free GPtrArray returned from marshal_call here instead of in demarshal_call; fixes leak for oneway calls. * src/server.c (operation_skel): DECREF dict; fixes leak. (This one was a BITCH to find!) * Fixed about 10 insignificant and a couple significant memory leaks due to not DECREFing the result of PyObject_GetAttrString in various places. * src/demarshal.c (demarshal_union): fixed leaks * src/demarshal.c (demarshal_any): call CORBA_TypeCode_PyObject__new instead of constructing the TypeCode object manually; fixed leaks. * src/CORBA_TypeCode.c: duplicate CORBA_TypeCode object and release it in the destructor. * src/server.c (operation_skel): reset the send buffer when marshalling exceptions to prevent garbled data from passing over the wire. 2001-05-27 Christian Reis <kiko@async.com.br> * test-suite/ added (#427024) following Roland's initial implementation. The suite includes the interactive helper inter.py and a suite of (36 at the moment) tests of ORBit-Python's functionality. It's based on PyUnit (http://pyunit.sourceforge.net) so you'll need either that or Python2. 2001-05-27 Jason Tackaberry <tack@linux.com> * src/CORBA_Object.c (CORBA_PyClass__del) implemented (#427729). (CORBA_Object_to_PyObject_with_type) don't create a new instance if one already exists for that (CORBA Object, IDL interface) tuple (#427771). * src/server.c (Servant_PyClass__this): decref return value from activate_object (#427409). (Servant_PyClass__del): free servant instance glue and vepv (#427409). * src/process_idl.c (preprocess_idl_file): make keyword detection smarter (#427724) * src/PortableServer.c: misc cleanups and consistency checking (#427409, #425079). (POA_PyObject__deactivate_object): work around bug in ORBit to allow activating a previously deactivated object (#427468). * src/CORBAmodule.h: sandwich __DEBUG_LEVEL__ between a DEBUG define. make CFLAGS=-DDEBUG to enable debugging now (kiko) * src/idl.c: removed temporary debugging cruft. * src/except.c: merged a patch from kiko to validate system exceptions; fixes segfault for unknown exceptions raised by the ORB (#427464). 2001-05-25 Jason Tackaberry <tack@linux.com> * src/CORBA_Object.c (CORBA_Object_to_PyObject_with_type): if given type is NULL, instantiate from CORBA.Object. 2001-05-25 Jason Tackaberry <tack@linux.com> The code is still in a state of disarray. Not much testing has been done, and some things are only partially implemented. * src/CORBAmodule.h: created CORBA_PyInstance_Glue, which contains additional data for objref instances. Created CORBA_PyClass_Glue which contains additional data for objref classes. * src/CORBA_Object.c: implemented most of the old CORBA_PyObject_* functions as CORBA_PyClass_* functions for the base CORBA.Object class. * src/CORBAmodule.c: create base CORBA.Object class * src/client.c, src/server.c: update most code to move away from CORBA_PyObject_Glue to CORBA_PyInstance_Glue / CORBA_PyClass_Glue * src/CORBA_Object.c (CORBA_Object_to_PyObject_with_type): created this function which returns a new objref given a CORBA_Object and class glue. (CORBA_Object_to_PyObject): simplified to use CORBA_Object_to_PyObject_with_type. * src/CORBA_Object.c: implemented _narrow (PLMS §1.6) 2001-05-24 Jason Tackaberry <tack@linux.com> * src/CORBA_Object.c, src/idl.c: first steps to implementing CORBA.Object objrefs as actual class instances. 2001-05-23 Jason Tackaberry <tack@linux.com> * src/server.c (init_local_objref): added function which is called from various places within ORBit. In particular, the _is_a implementation. * src/idl.c (construct_interface): assign init_local_objref to class_info * src/server.c (ORBit_Python_init_pserver): create an empty vepv so that init_local_objref assigns something that is not NULL. These changes are necessary to work with omniORB (and probably others) which invoke _is_a to validate objrefs. * src/CORBAmodule.c: removed Object_cast cruft. * src/CORBA_Object.c: created this file and moved CORBA.Object stuff from CORBAmodule.c * src/Makefile.am: updated to include CORBA_Object.[c,h] * src/CORBA_Object.c: implemented _is_a (PLMS §1.6) * src/CORBA_Object.c: implemented _is_equivalent (PLMS §1.6) * src/CORBA_Object.c: implemented _hash (PLMS §1.6) * src/CORBA_Object.c: implemented _non_existent (PLMS §1.6) * orbit-python.spec.in: added, taken from Conectiva Linux package and modified to work with any Python version >= 1.5. * configure.in: Handle orbit-python.spec.in 2001-05-23 Roland Mas <mas@echo.fr> * src/server.c (compare_object_interface): Some of my previous changes were in fact conflicting with Tack's, and I apparently did not resolve the conflict quite gracefully. Removes the (hopefully) last artifact of that problem. 2001-05-21 Roland Mas <mas@echo.fr> * src/client.c (_stub_func): As per the Python Language Mapping Specification (§1.4.1): "If there is no result value, the method returns None." 2001-05-20 Jason Tackaberry <tack@linux.com> * marshal.c: marshal_object allows Py_None and marshals nil objects * server.c: allow None return types for objrefs * CORBAmodule.h: added a macro is_corba_pyobject() * server.c: compare_glue_interface: accept nil objects for any interface, fail if arg is not a CORBA PyObject, and accept any object if the required value is a generic objref. * orbit-python.h: fix typo in PyORBit_POAManager_Get macro. * Merged patch from Christian to be a little less restrictive about what is used for a servant implementation. As long as it has __class__ and __bases__ attributes and behaves like a class (like extension classes), it should work. I ammended the patch to include tons of extra sanity checking. * PortableServer.c: servant_to_reference raises exceptions on error. (Closes 425079) 2001-05-20 Roland Mas <mas@echo.fr> * src/CORBAmodule.h: Minor tweaks to make the compilation "CFLAGS=-Wall"-proof. * src/server.c: Ditto. * src/server.c: renamed compare_object_interface to compare_glue_interface(), and recreate compare_object_interface() to call compare_glue_interface(). The point is to have a recursive call so that we can work through several levels of inheritance (previous version only handled direct base classes, but no "grandparents"). 2001-05-17 Roland Mas <mas@echo.fr> * src/server.c: added compare_object_interface(), and used it. That function checks that the object we're marshalling or demarshalling actually matches what it should be according to the IDL. Previously, the only check was that it was an object reference, now we also check that it corresponds to an object of the expected interface (or a subclass). 2001-05-16 Jason Tackaberry <tack@linux.com> * orbit-python.h: added _Get macros to the API. * except.c: Display extended info on system exceptions. 2001-05-15 Jason Tackaberry <tack@linux.com> * Did s/CORBA_any/CORBA_Any/ everywhere, and renamed CORBA_any.h to CORBA_Any.h * CORBA_Any.c: CORBA_Any_PyObject__new now takes two parameters, a TypeCode PyObject and a PyObject representing the value. Init code that used to be in this function is moved to CORBA.Any() * CORBA_ORB.c: CORBA_ORB_PyObject__new now takes a CORBA_ORB as a parameter and constructs a Python ORB object around the given ORB. * CORBA_TypeCode.c: CORBA_TypeCode_PyObject__new takes a CORBA_TypeCode as a parameter. Again, init code that used to be here is now in CORBA.TypeCode(). * idl.c: made find_repo_id_from_typecode useful. It will narrow object references if it can before returning CORBA/Object. * Use PyORBit as the prefix for the external API now. * Add CORBA.Any and CORBA.TypeCode functions to the API. * Most of the above was a rewrite of a patch submitted by Johan. 2001-05-14 Roland Mas <mas@echo.fr> * Updated config.guess and config.sub to more recent ones. See <http://bugs.debian.org/97383> for details. 2001-05-10 Jason Tackaberry <tack@linux.com> * client.c: report more correct error message in _stub_func when number of parameters mismatches. 2001-05-09 Jason Tackaberry <tack@linux.com> * CORBAmodule.c: Set ob_type to PyType_Type for CORBA.fixed, CORBA.TypeCode, CORBA.Any. Solves segfault for type() on these objects * idl.c: Again, set ob_type for dynamically created client/server types. (Resolution for bugs reported by Johan.) 2001-05-08 Jason Tackaberry <tack@linux.com> * idl.c: Don't recreate binding objects if they exist (such as the case if importing the same IDL twice) * CORBAmodule.c: preprocess IDLs before hooking __import__ (fix for bug reported by Johan Dahlin) * idl.c, marshal.c, except.c: fixed a few minor compiler warnings 2001-04-18 Roland Mas <mas@echo.fr> * src/CORBAmodule.c: suppressed an unneeded double call to process_idl_path(). Should make preprocessing faster. 2001-04-18 Jason Tackaberry <tack@linux.com> * Committed a patch from Christian that adds a CORBA_PyObject_to_Object hash mapping Python CORBA objects onto CORBA objects and fixed object_to_string to validate the argument as a CORBA PyObject. 2001-04-12 Jason Tackaberry <tack@linux.com> * marshal.c: marshal_object now verifies that the given Python object is in fact a CORBA.Object * Big changes in system exceptions. Most of the defined CORBA System exceptions have been implemented. Work has begun to raise the appropriate exceptions where necessary (especially in marshalling/demarshalling code), but it's not finished yet. (There will be segfaults under certain error conditions until this is done because parts of the code rely on exceptions being generated.) * CORBA.SystemException and CORBA.UserException now derive from CORBA.Exception (1.3.7 of the mapping spec) * Implemented str() for user exceptions (and system exceptions) to display some useful information. * System exceptions can now be marshalled and demarshalled. * Servers will now pass on CORBA.UNKNOWN exceptions to the client. * System exceptions have "minor" and "completed" attributes * Defined COMPLETED_YES, COMPLETED_NO, and COMPLETED_MAYBE constants in the CORBA module. * Fixed a few segfaults along the way 2001-04-11 Jason Tackaberry <tack@linux.com> * CORBA_ORB.c: grab a reference to root_poa * PortableServermodule.c: create a servant_base object to represent the PortableServer.Servant class from which all skeleton classes are derived (section 1.5.1 from the mapping spec) * Implemented _default_POA for servant objects (also section 1.5.1) * server.c: added a recursive get_class_glue_from_class. Now any class can be used as an implementation class for a servant as long as it has a interface skeleton somewhere in its inheritance tree (section 1.5.1) 2001-04-02 Jason Tackaberry <tack@linux.com> * Fixed a segfault in the transparent set accessor function. * Fixed a segfault in CORBA.TypeCode constructor when invalid arguments where given.