Pyro 4.20 serpent serializer issues
"Vernon D. Cole" <[email protected]>
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <CAH-ZgAfJjQVHanjSfvEHR_RwcX+6=z2_6yUezXVgsfYcY8RjVQ@mail.gmail.com> |
I ran my remote database access test, which basically throws every data
type known to man across the network. There were three errors under Pyro4
2.20 which do not appear under 2.18.
It seems to be having trouble sending array.array('B') and datetime.date(),
and is incorrectly receiving decimal.Decimal()
Do you need simple test cases, or will this traceback give you the clues
you need?
--
Vernon
v v v v v v v v v v v
C:\Users\vernon\Projects\ado\adodbapi\test>py adodbapitest.py --mssql
> 2.7.4 (default, Apr 6 2013, 19:55:15) [MSC v.1500 64 bit (AMD64)]
> node=z-PC: is64bit.os()= True, is64bit.Python()= True
> adodbapi v2.5.1.a00
> testADOdbapiConfig.py v 2.5.0.c9
> ...copying test ACCESS db to
> c:\users\vernon\appdata\local\temp\adodbapi_tes
> t\xx_1J92DT66U.mdb
> ...Testing ACCESS connection...
> (successful)
> ...Testing MS-SQL login...
> (remote) (successful)
> Unit tests for adodbapi version 2.5.0.f
> Default Date Converter is <adodbapi.apibase.pythonDateTimeConverter object
> at 0x0000000003558E80>
>
> .....................................................................E.E..F.......................
> ======================================================================
> ERROR: testDataTypeBinary (__main__.TestADOwithSQLServer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "adodbapitest.py", line 382, in testDataTypeBinary
> allowedReturnValues=arv)
> File "adodbapitest.py", line 282, in helpTestDataType
> crsr.execute("INSERT INTO xx_%s (fldId,fldData) VALUES (?,?)" %
> config.tmp,
> (fldId, inParam))
> File "C:\Python27\lib\site-packages\adodbapi\remote.py", line 433, in
> execute
> self.proxy.crsr_execute(self.id, operation, fp)
> File "C:\Python27\lib\site-packages\Pyro4\core.py", line 161, in __call__
> return self.__send(self.__name, args, kwargs)
> File "C:\Python27\lib\site-packages\Pyro4\core.py", line 310, in
> _pyroInvoke
> data=self._pyroSerializer.deserializeData(data, compressed=flags &
> MessageFa
> ctory.FLAGS_COMPRESSED)
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 149, in
> deserializeData
> return self.loads(data)
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 373, in loads
> return self.recreate_classes(serpent.loads(data))
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 303, in
> recreate_classes
> return self.dict_to_class(literal)
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 282, in
> dict_to_class
>
> raise Pyro4.errors.ProtocolError("unsupported serialized class:
> "+classname)
>
> ProtocolError: unsupported serialized class: DataError
>
> ======================================================================
> ERROR: testDataTypeDate (__main__.TestADOwithSQLServer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "adodbapitest.py", line 366, in testDataTypeDate
> compareAlmostEqual=True)
> File "adodbapitest.py", line 282, in helpTestDataType
> crsr.execute("INSERT INTO xx_%s (fldId,fldData) VALUES (?,?)" %
> config.tmp,
> (fldId, inParam))
> File "C:\Python27\lib\site-packages\adodbapi\remote.py", line 433, in
> execute
> self.proxy.crsr_execute(self.id, operation, fp)
> File "C:\Python27\lib\site-packages\Pyro4\core.py", line 161, in __call__
> return self.__send(self.__name, args, kwargs)
> File "C:\Python27\lib\site-packages\Pyro4\core.py", line 290, in
> _pyroInvoke
> compress=Pyro4.config.COMPRESSION)
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 154, in
> serializeCall
>
> data=self.dumpsCall(obj, method, vargs, kwargs)
> File "C:\Python27\lib\site-packages\Pyro4\util.py", line 361, in
> dumpsCall
> return serpent.dumps((obj, method, vargs, kwargs))
> File "C:\Python27\lib\site-packages\serpent.py", line 62, in dumps
> return Serializer(indent, set_literals).serialize(obj)
> File "C:\Python27\lib\site-packages\serpent.py", line 203, in serialize
> self._serialize(obj, out, 0)
> File "C:\Python27\lib\site-packages\serpent.py", line 232, in _serialize
> getattr(self, method_name, self.ser_default_class)(obj, out, level) #
> dispatch
> File "C:\Python27\lib\site-packages\serpent.py", line 274, in
> ser_builtins_tuple
> self._serialize(elt, out, level + 1)
> File "C:\Python27\lib\site-packages\serpent.py", line 232, in _serialize
> getattr(self, method_name, self.ser_default_class)(obj, out, level) #
> dispatch
> File "C:\Python27\lib\site-packages\serpent.py", line 274, in
> ser_builtins_tup
> le
> self._serialize(elt, out, level + 1)
> File "C:\Python27\lib\site-packages\serpent.py", line 232, in _serialize
> getattr(self, method_name, self.ser_default_class)(obj, out, level) #
> dispatch
> File "C:\Python27\lib\site-packages\serpent.py", line 294, in
> ser_builtins_list
> self._serialize(elt, out, level + 1)
> File "C:\Python27\lib\site-packages\serpent.py", line 232, in _serialize
> getattr(self, method_name, self.ser_default_class)(obj, out, level) #
> dispatch
> File "C:\Python27\lib\site-packages\serpent.py", line 420, in
> ser_default_class
> raise TypeError("don't know how to serialize class " +
> str(obj.__class__) +
> ". Give it vars() or an appropriate __getstate__")
> TypeError: don't know how to serialize class <type 'datetime.date'>. Give
> it vars() or an appropriate __getstate__
>
> ======================================================================
> FAIL: testDataTypeMoney (__main__.TestADOwithSQLServer)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "adodbapitest.py", line 331, in testDataTypeMoney
>
> self.helpTestDataType("smallmoney",'NUMBER',decimal.Decimal('214748.02'))
> File "adodbapitest.py", line 298, in helpTestDataType
> 'result type "%s" must be instance of %s'%(type(rs[0]),type(pyData))
> AssertionError: result type "<type 'unicode'>" must be instance of <class
> 'decimal.Decimal'>
>
> ----------------------------------------------------------------------
> Ran 98 tests in 22.593s
>
> FAILED (failures=1, errors=2)
>
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core