On Nov 21, 2007 11:17 AM, Raphael Slinckx <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> > > Hope this can be released soonish..
> >
> > I can make a 1.1.3-release including that. But only if you supply a
> > test-case
> > for that.
>
> I'm working on it. Just a note: it seems the turbojson testcase
> requires SQLAlchemy >= 0.4 which isn't reflected in setup.py.
> When using it with sqlalchemy 0.3.11, it fails in the
> "turbojson.tests.test_sqlalchemy.test_salist" test because older
> version didn't return a real list, but a
> sqlalchemy.blaba.InstrumentedList thus preventing default list
> jsonification.
I confirm Raphael's observations:
Running the tests with SA 0.3.10 gives me:
======================================================================
ERROR: turbojson.tests.test_sqlalchemy.test_salist
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\python24\lib\site-packages\nose-0.10.0-py2.4.egg\nose\case.py",
line 202, in runTest
self.test(*self.arg)
File "C:\TurboJson\turbojson\tests\test_sqlalchemy.py", line 48, in
test_salist
encoded = jsonify.encode(t.test2s)
File "C:\TurboJson\turbojson\jsonify.py", line 115, in encode
return _instance.encode(obj)
File
"C:\Python24\lib\site-packages\simplejson-1.3-py2.4.egg\simplejson\encoder.py",
line 270, in encode
File
"C:\Python24\lib\site-packages\simplejson-1.3-py2.4.egg\simplejson\encoder.py",
line 231, in _iterencode
File
"C:\Python24\lib\site-packages\simplejson-1.3-py2.4.egg\simplejson\encoder.py",
line 237, in _iterencode_default
File "C:\TurboJson\turbojson\jsonify.py", line 107, in default
return jsonify(obj)
File "<string>", line 5, in jsonify
File "_d_speedups.pyx", line 403, in _d_speedups.BaseDispatcher.__getitem__
File
"C:\Python24\lib\site-packages\ruledispatch-0.5a0.dev_r2306-py2.4-win32.egg\dispatch\interfaces.py",
line 15, in
__call__
NoApplicableMethods: (([<turbojson.tests.test_sqlalchemy.Test2 object
at 0x012A4850>, <turbojson.tests.test_sqlalchemy.T
est2 object at 0x012A48B0>],), {})
----------------------------------------------------------------------
Ran 6 tests in 0.609s
FAILED (errors=1)
==================================
Running the tests with SA trunk, it gives me no error...
> Coming up with the testcase for __json__ on the ticket soon.
>
> Raf
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---