[...]
> So, get the 1.1 branch from SVN:
> svn co http://svn.turbogears.org/branches/1.1 turbogears
>
> and easy_install it (this shall get all the dependencies right).
>
> This way you'll be able to run TG1.1 using Python2.6, which seems
> fully compatible with TG1 on Python2.5.
Hum... SQLAlchemy does not work with python 2.6 and if you need JSON
support you'll have to fix quite a few places in the TG core core to
correctly import the new simplejson bundle with py26.
I'm sure you'll encounter a lot of issues here and there :)
I'm happy you're testing 1.1 with python 2.6, but please do not ask
people to use SVN checkouts, we are undergoing massive changes in the
SVN and we could break things at any time. We'll get a beta2 out of
the door in a few days (just waiting for some nice CSS templates and
we're good to go...). At that time I promise I'll put in place a
source tarball for the beta release so people can have an easy
snapshot.
In fact using TurboGears from the SVN or trying to port TG1.x to
python 2.6 are discussions that should happen in the trunk mailing
list IMHO.
Florent.
I'm happily surprised by this because I read a post by Mike Bayer a
few days ago saying that they would not support py26 before months...
because the dbapi backends were not yet ready.
What database backend are you using ? Because when you finally need to
go to production you cannot afford to rely on sqlite are you?
> I'm not recommending this setup to no-one, but if someone couldn't
> continue developing like I was, it seem to be like a simple workaround
> for meanwhile, at least until a tarball is out (sorry, I had no idea
> it's a matter of days) :)
Well you never know, when an open source developer says its a matter
of days you could wait for week ;)
Since you're using our 1.1Head I would be grateful if you could report
any glitch you find in it. Please do so in the trunk mailing list. We
are working hard those days to be able to release a nice beta2 and
your contribution would be greatly valued.
> Yo'av.
Florent.
As it doesn't have a pure-python-implementation, we'd be forced to use *two*
json-transcoders.
Besides, I guess the actual encoding time is dwarfed by the processing of the
whole request - think of all the generic method calls for jsonify.
In summary, this is of no real use for the general case - and those who need
to spit out huge amounts of json in a few places can simply install cjson &
then do in their respective controller action
@expose()
def fast_humongous_json_output(self):
return cjson.encode(some_data_structure)
Diez
Users who want cjson can always add it but we won't base TG on it. The
cjson license is LGPL and this may trip some people who would refuse
to base their development on software that incorporate LGPL pieces. I
don't want to start yet another licensing discussion here, and I
personnally base a lot of my work on lgpl software but this is not for
the TG developpers to force an lgpl dependence on it's users.
And since we are in a Python 2.6 related thread: simplejson is now in
the python standard library. Which is another reason to use simplejson
and keep it the one we require as a depence.
Florent.
This benchmark compares to a rather old version of simplejson.
With the current release of simplejson, I get these results:
(venv)chris@minimax:simplejson$ time python simplejsonbench.py
real 0m2.687s
user 0m2.081s
sys 0m0.126s
(venv)chris@minimax:simplejson$ time python cjsonbenchmark.py
real 0m1.212s
user 0m1.093s
sys 0m0.110s
(venv)chris@minimax:simplejson$ python -c "import simplejson; print
simplejson.__version__"
2.0.4
(venv)chris@minimax:simplejson$ python -c "import simplejson._speedups"
(venv)chris@minimax:simplejson$ python -c "import cjson; print
cjson.__version__"
1.0.5
(venv)chris@minimax:simplejson$ uname -a
Darwin minimax.paddyland.lan 8.11.1 Darwin Kernel Version 8.11.1: Wed
Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386
(venv)chris@minimax:simplejson$ system_profiler | head -n 13
Hardware:
Hardware Overview:
Model Name: Mac mini
Model Identifier: Macmini1,1
Processor Name: Intel Core Duo
Processor Speed: 1.83 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache (per processor): 2 MB
Memory: 2 GB
Bus Speed: 667 MHz
Don't believe a statistic which you haven't faked yourself!
Chris
Which version of simplejson do you have? There are major speed
improvements since version 2.0.x!
Are you sure, the C extension is used? Can you do 'python -c "import
simplejson._speedups"' without errors?
Chris