[omniORB] Python-2.x "from __future__ import unicode_literals" brings BAD_PARAM
Duncan Grisby
duncan at grisby.org
Mon Nov 11 17:51:05 GMT 2019
On Mon, 2019-11-11 at 10:22 -0600, Jim Bell via omniORB-list wrote:
> On 2019-11-10 9:35 AM, Jim Bell wrote:
> > ...
> > I found that using "from __future__ import unicode_literals"
> > wreaks
> > havoc on my app code, with every string parameter or field value
> > giving CORBA.BAD_PARAM/omniORB.BAD_PARAM_WrongPythonType.
[...]
> That eventually reaches a table lookup in pyMarshal.cc,
> marshalPyObjectFns[], which takes you to marshalPyObjectString()
Yes, you are right. The BAD_PARAM exception is actually thrown by the
validateTypeString function, before it gets to marshalPyObjectString.
It clearly would be possible to extend omniORBpy for Python 2 to handle
unicode objects where strings are expected, but I really wouldn't
consider it worth the effort. Python 2 is end of life and everyone
should be on the way to Python 3 if they're not already there.
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list