> Hello,
>
> I'm new to TG and I'd like to install TG 1.1 on my xubuntu 10.04.
>
> I've followed the documentation steps, I've installed easy_install,
> virtualenv, activated my virtual_env, and then :
> easy_install TurboGears
> easy_install sqlalchemy
Did you use virtualenv with the --no-site-packages directive? What does
>>> import peak.rules
>>> peak.rules.__path__
yield?
Diez
Looks good to me. All I can imagine is that you need a more specific
(probably older) version of PEAK rules.
Oh, and I'm not sure about the Python 2.6 compatibility of TG1.1 and
it's packages.
Diez
Hi Nicolas, sorry for your bad first impression.
The problem is not with not using virtualenv or the Python version. TG
1.1 should work fine without virtualenv (even though it's recommended)
and with Python 2.6. You've just chosen a bad day to try it out: The
problem is caused by an API change in peak_rules made by Philip Eby just
yesterday in r2660.
It seems this change also broke the prioritized_methods package which is
used by TurboJson.
So the best fix for the time being is to install an older peak_rules
version, e.g PEAK-Rules-0.5a1.dev-r2659.tar.gz which you can find here:
http://peak.telecommunity.com/snapshots/
I will adapt TG 1.1 and 1.5 today so that it works with the new
peak_rules packages and try to get prioritized fixed as well.
-- Christoph
Thanks for the quick response, Phillip. I will use that feature in
TurboJson then.
-- Christoph
Well, sometimes you still may want to have more levels of priority.
Regarding TurboJson, you're right though, the existing functionality
should suffice and your ideas look like reasonable solutions to me. I'll
probably try to change TurboJson to work along these lines you pointed
out and see if I can get it done without breaking backward
compatibility. TurboJson was developed on rule-dispatch originally
(which didn't have an "around" iirc), and later people probably only
added upon that without really thinking about how to do it properly.
Your explanations and hints are highly welcome. It takes some time to
get a feeling for how to adequately apply generic functions.
Btw, while TG1 heavily relied on generic functions, TG2 does not use
them any more and also recently ditched TurboJson. I guess the reason is
that rule-dispatch and peak-rules can cause installation troubles, and
people seem to have difficulties to wrap their head around generic
functions generally. Maybe you need to do explain and advertize more ;-)
-- Christoph