Re: Python-2.x "from __future__ import unicode_literals" brings BAD_PARAM
Duncan Grisby via omniORB-list <[email protected]> Mon, 11 Nov 2019 17:51:05 +0000
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
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 -- -- [email protected] -- -- http://www.grisby.org -- _______________________________________________ omniORB-list mailing list [email protected] http://www.omniorb-support.com/mailman/listinfo/omniorb-list