I have been playing a bit with TG dev on windows and was naturally
tempted to try and install TG on python 2.5.
To tell you the truth I am trying to make it work in Portable Python
(which uses 2.5). I have created my own portable python on 2.4 to test
and everything works like a charm.
Now on 2.5 I have succeeded in installing every required component (at
least is seems so).
I had to download pyprotocols and ruledispatch from svn but got them
compiled using visual studio .net 2003.
When I launched tg-admin quickstart I got this error:
---------------
File "x:\ppython\lib\site-packages\cheetah-1.0-py2.5.egg\Cheetah\Parser.py", l
ine 32, in <module>
from Cheetah import ErrorCatchers
File "x:\ppython\lib\site-packages\cheetah-1.0-py2.5.egg\Cheetah\ErrorCatchers
.py", line 16, in <module>
from Cheetah.NameMapper import NotFound
File "x:\ppython\lib\site-packages\cheetah-1.0-py2.5.egg\Cheetah\NameMapper.py
", line 146
from __future__ import generators
SyntaxError: from __future__ imports must occur at the beginning of the file
---------------
Just moved the import line a the top of the file in NameMapper.py to
make it work...
then
---------------
File "x:\ppython\lib\site-packages\turbogears-1.0.1-py2.5.egg\turbogears\widge
ts\meta.py", line 194, in load_kid_template
return (kid.load_template(t, name=modname).Template, t)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\__init__.py", line
158, in load_template
store=cache, ns=ns, exec_module=exec_module)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\importer.py", line
144, in _create_module
raise_template_error(module=name, filename=filename)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\codewriter.py", lin
e 94, in raise_template_error
encoding = mod.encoding
AttributeError: 'module' object has no attribute 'encoding'
---------------
Module in question is : turbogears.widgets.base.CSSLink.Template
commented lines 91 to 97 in codewriter.py to bypass the obvious problems
then I got:
---------------
from turbogears.widgets.base import *
File "x:\ppython\lib\site-packages\turbogears-1.0.1-py2.5.egg\turbogears\widge
ts\base.py", line 507, in <module>
class CSSLink(Link):
File "x:\ppython\lib\site-packages\turbogears-1.0.1-py2.5.egg\turbogears\widge
ts\meta.py", line 76, in __init__
cls.template) = load_kid_template(cls.template, modname)
File "x:\ppython\lib\site-packages\turbogears-1.0.1-py2.5.egg\turbogears\widge
ts\meta.py", line 194, in load_kid_template
return (kid.load_template(t, name=modname).Template, t)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\__init__.py", line
158, in load_template
store=cache, ns=ns, exec_module=exec_module)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\importer.py", line
144, in _create_module
raise_template_error(module=name, filename=filename)
File "x:\ppython\lib\site-packages\kid-0.9.5-py2.5.egg\kid\importer.py", line
141, in _create_module
exec code in mod.__dict__
File "<string>", line 5, in <module>
SystemError: Parent module 'turbogears.widgets.base.CSSLink' not loaded
---------------
At this point I decided it was time to checkout the svn head again :)
I then started to use the trunk version of TG to do my tests and here
are my results:
I had to do 2 things:
1 - install sqlobject 0.8x because on 2.5 sqlite module is renamed
sqlite3 but this is a
minor issue (I had to remove the dependencies in the requirements)
2 - amend was the master.kid file to read:
py:if="hasattr(self, 'tg_flash')" instead of just
py:if="tg_flash" on line 36.
Apart from that I had a running tg site on 2.5 on windows (tested with
SO and SA but just the quickstart site)
When I had this quickstart sites running I tested the application I am
working on at the moment and it worked like a charm. So for me the
1.1-head branch "seems" python 2.5 ready!
Regards,
Florent Aide
ps:
Since I have VS2003 at my disposition I can provide ruledispatch and
pyprotocols eggs (or other tg related eggs) for win32 on python 2.5 if
someone is interested.
File "x:\ppython\lib\site-packages\turbogears- 1.0.1-py2.5.egg\turbogears\widge
done it is here :
http://trac.turbogears.org/ticket/1280
Cheers,
Florent.
--
cheers
elvelind grandin
> SyntaxError: from __future__ imports must occur at the beginning of the file
> ---------------
> Just moved the import line a the top of the file in NameMapper.py to
> make it work...
It could be solved by install cheetah 2.0
> AttributeError: 'module' object has no attribute 'encoding'
> ---------------
>
> Module in question is : turbogears.widgets.base.CSSLink.Template
>
> commented lines 91 to 97 in codewriter.py to bypass the obvious problems
>
It's valid
> File "<string>", line 5, in <module>
> SystemError: Parent module 'turbogears.widgets.base.CSSLink' not loaded
> ---------------
It works in trunk but not in 1.0 branch, and it looks like a widget
problem. So once the widget is recovered in trunk, the same problem
may occured there.
>
> 1 - install sqlobject 0.8x because on 2.5 sqlite module is renamed
> sqlite3
Valid
> 2 - amend was the master.kid file to read:
> py:if="hasattr(self, 'tg_flash')" instead of just
> py:if="tg_flash" on line 36.
I got a different result, in py 2.5 it seems need supply tg_flash
explicitly for return value, or it will bark a exception.
Over all, thanks for make TG + py2.5 possible!
--
Fred
doing an hasattr(self, 'tg_flash') takes care of not raising an
exception if tg_flash was not provided to the view. Do you mean there
could be some other problem ?
Florent.
After checked again these is valid,
>Do you mean there could be some other problem ?
because I type the double quote :P
> Thanks for getting TG running with 2.5! That's most excellent news!
[...]
> I should mention that it would be good to have a 2.5 egg for Cheetah with
> the compiled _namemapper.pyd. Cheetah is dog slow without it. That may not
> matter for quickstart, but it does matter if someone actually tries to use
> their installed Cheetah to serve up pages.
[...]
I'll look into this :)
Cheers,
Florent.
There is a maximum attachement size in trac and the Cheetah egg is
bigger ... should I post this here ?
Florent.
> There is a maximum attachement size in trac and the Cheetah egg is
> bigger ... should I post this here ?
I don't believe it will make through... You can send it to me and I'll put on
my machine until someone puts it on TG's website.
--
Jorge Godoy <jgo...@gmail.com>
[...]
> I don't believe it will make through... You can send it to me and I'll put on
> my machine until someone puts it on TG's website.
done
Could somebody with an overview about the current situation update
http://docs.turbogears.org/1.0/Python2.5Support, especially the table with the
component support?
Ths, Chris
It is at http://home.g2ctech.com/~godoy/Cheetah-2.0rc7-py2.5-win32.egg
I'll leave it there for a while, but it would be nice if this was moved to
TG's page.
--
Jorge Godoy <jgo...@gmail.com>
Updated.
And I made a setup.py candidate for py2.5 on http://
trac.turbogears.org/ticket/1119
The last thing is to check why widget bark this error for kid in py
2.5:
I got it !
http://trac.turbogears.org/ticket/1288
I know have a working 1.0.1 on python 2.5 / win32
I only have a sqlalchemy installation though. Could someone please
test with a real SO project to confirm its working ?
Cheers,
Florent
Cool, it works!
> I know have a working 1.0.1 on python 2.5 / win32
>
> I only have a sqlalchemy installation though. Could someone please
> test with a real SO project to confirm its working ?
>
I've tested the whatwhat status(SQLObject), and it works :)
But the trunk didn't fit your patch since widget code is varied.
Here's my package lists:
TG 1.0.2 in svn
cheetah-2.0rc7-py2.5.egg
cherrypy-2.2.1-py2.5.egg
FormEncode-0.6.1 dev
kid-0.9.5-py2.5.egg
paste-1.2.1-py2.5.egg
pastedeploy-1.1-py2.5.egg
pastescript-1.1-py2.5.egg
SQLObject-0.8.0b2-py2.5.egg
turbocheetah-0.9.5-py2.5.egg
turbojson-1.0-py2.5.egg
turbokid-0.9.9-py2.5.egg
elementtree-1.2.6_20050316-py2.5-win32.egg
PyProtocols-1.0a0-py2.5-win32.egg
RuleDispatch-0.5a0.dev-py2.5-win32.egg
setuptools-0.6c5-py2.5.egg
simplejson-1.5-py2.5.egg
On Feb 7, 11:02 am, "haroldmarsh...@gmail.com"
http://trac.turbogears.org/attachment/ticket/1119/py25.2.patch
Now the setup.py won't effect people < 2.5.
And you've to "easy_install -U cheetah" to download cheetah 2.0 to
avoid modify the code.
If the code worked I'll check it in svn. (and update turboCheetah with
the same way that won't effect people < 2.5)
Or if someone can prove that SQLObject 0.8/cheetah 2.0 won't hurt TG
after bumping up the version, we could make the setup.py simpler.
To haroldmarshall:
CP3 porting is another issue (it belongs to TG 1.1), and it doesn't
matter to TG's Py 2,5 compatibility.