2.0 beta 1 released

76 views
Skip to first unread message

Mark Ramm

unread,
Dec 29, 2008, 8:54:18 AM12/29/08
to turbogea...@googlegroups.com, turbogear...@googlegroups.com, turbo...@googlegroups.com
We are rappidly approaching the first 2.0 beta release. 

Thanks to the hard work of Florent, Chris, Jon, Christopher, Lee, Gustavo, Sanjiv,and many, many others we have been able to jump directly from 1.9.7 to 2.0. 

New in this release:  

* Catwalk is now revived and integrated into the quickstart project for admin
* Quickstart has been completly overhauled for a fresh new look
* @expose includes new helpers for defining custom content types
* Quickstart now has login/logout links by default
* tg.url and tg.redirect now know about routes so if you're overriding URL dispatch with Routes things just work

To download 2.0 beta 1, simply follow the instructions here:

If you're interested in the details of what's changed in this release, take a look at the changelog: 


There is also a set of experimental windows installers here: 

Standard: 

Python Included: 


--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

Aigarius

unread,
Dec 30, 2008, 10:38:09 AM12/30/08
to TurboGears
On Dec 29, 3:54 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> To download 2.0 beta 1, simply follow the instructions here:
>
> http://turbogears.org/2.0/docs/main/DownloadInstall.html

People with existing 1.9.7 virtualenv installations can just do:

$ tg2env/bin/activate
$ easy_install -i http://www.turbogears.org/2.0/downloads/current/index
-U tg.devtools

Correct?

--
Aigars Mahinovs
<aiga...@gmail.com>

Mark Ramm

unread,
Dec 30, 2008, 10:42:01 AM12/30/08
to turbo...@googlegroups.com
On Tue, Dec 30, 2008 at 10:38 AM, Aigarius <aiga...@gmail.com> wrote:

On Dec 29, 3:54 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> To download 2.0 beta 1, simply follow the instructions here:
>
> http://turbogears.org/2.0/docs/main/DownloadInstall.html

People with existing 1.9.7 virtualenv installations can just do:

$ tg2env/bin/activate
$ easy_install -i http://www.turbogears.org/2.0/downloads/current/index
-U
tg.devtools

Looks correct to me.
 

Artem Marchenko

unread,
Dec 30, 2008, 11:17:52 AM12/30/08
to TurboGears
Thank you for releasing the beta!
I got acquainted with TG1 long time ago and was delaying the real
trials until TG2 betas.
It is indeed possible to install TG including Python with the Windows
installers.

Unfortunately the wiki20 tutorial doesn't seem to work out of the box
for me (http://www.nabble.com/2.0-tutorial-problem-td19719317.html).
Whatever I do, it always fails in the initializeDB step with the
dependency problems around sqlalchemy or zope.interface (after running
setup.py develop manually).

It would be great if somebody knowledgeable could go through the
tutorial and tell where to fix it.

Best regards,
Artem.

On 30 Грд, 17:42, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> On Tue, Dec 30, 2008 at 10:38 AM, Aigarius <aigar...@gmail.com> wrote:
>
> > On Dec 29, 3:54 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> > > To download 2.0 beta 1, simply follow the instructions here:
>
> > >http://turbogears.org/2.0/docs/main/DownloadInstall.html
>
> > People with existing 1.9.7 virtualenv installations can just do:
>
> > $ tg2env/bin/activate
> > $ easy_install -ihttp://www.turbogears.org/2.0/downloads/current/index
> > -U <http://www.turbogears.org/2.0/downloads/current/index-U> tg.devtools
>
> Looks correct to me.
Message has been deleted

Mark Ramm

unread,
Dec 30, 2008, 11:24:46 AM12/30/08
to turbo...@googlegroups.com
Hmm, sounds like perhaps zope.sqlalchemy is missing? 

Is your virtualenv activated?   Do you have zope.sqlalchemy in your virtualenv's site-packages directory (lib, python, site-packages)

Can you post a traceback and the results of paster tginfo up on paste.turbogears.org

I can't reproduce the problem you're seeing on osx or linux, and don't have a windows box handy to try the installer. 

If it's just not having the package try easy_install zope.sqlalchemy and see if that fixes your problem...

2008/12/30 Artem Marchenko <artem.m...@gmail.com>

Artem Marchenko

unread,
Dec 30, 2008, 2:37:22 PM12/30/08
to TurboGears
Thanks for the quick reply, Mark!
I decided to make a clean experiment, unistalled everything including
the python itself and followed the instructions as carefully as I
could. So far I failed. Here is a detailed script of what I did. I
hope it helps.

Everything was happening on Windows Vista with disabled UAC.

1. Installed TurboGears2-2.0b1-py25_Python-2.5.exe Everything was left
as default.

2. Then I went to freshly created c:\tg2tr folder and started
following the wiki tutorial from http://turbogears.org/2.0/docs/main/Wiki20/wiki20.html

3. paster and everything else was not in the path so I activated the
virtuaenv via c:\tg2.0b1\Scripts\activate.bat After that quickstart
worked

4. After that several tutorial steps went fine except for that I had
to restart the service (since tutorial tells to modify __init__.py
before you create page.py)

5. At the initializeDB step I get no module zope.sqlalchemy:
http://paste.turbogears.org/paste/22586
At this point "paster tginfo" shows the following http://paste.turbogears.org/paste/22587
At the same time if I go to C:\tg2.0b1\Lib\site-packages I see there
the "zope.sqlalchemy-0.3-py2.5.egg" folder (not file, but folder with
just a few *.py files in subdirectories).

6. Following your advice I run "easy_install zope.sqlalchemy" and
script tells that the correct version is already installed :/
http://paste.turbogears.org/paste/22589

Now that makes me really confused. It looks like everything is in fact
on my hard drive, but something is correctly registered in half of the
registries only.


On 30 Грд, 18:24, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> Hmm, sounds like perhaps zope.sqlalchemy is missing?
> Is your virtualenv activated?   Do you have zope.sqlalchemy in your
> virtualenv's site-packages directory (lib, python, site-packages)
>
> Can you post a traceback and the results of paster tginfo up on
> paste.turbogears.org?
>
> I can't reproduce the problem you're seeing on osx or linux, and don't have
> a windows box handy to try the installer.
>
> If it's just not having the package try easy_install zope.sqlalchemy and see
> if that fixes your problem...
>
> 2008/12/30 Artem Marchenko <artem.marche...@gmail.com>

Artem Marchenko

unread,
Dec 30, 2008, 2:44:22 PM12/30/08
to TurboGears
Also the zope.sqlalchemy folder seems to be in the python system path:
http://paste.turbogears.org/paste/22592

On Dec 30, 9:37 pm, Artem Marchenko <artem.marche...@gmail.com> wrote:
> Thanks for the quick reply, Mark!
> I decided to make a clean experiment, unistalled everything including
> the python itself and followed the instructions as carefully as I
> could. So far I failed. Here is a detailed script of what I did. I
> hope it helps.
>
> Everything was happening on Windows Vista with disabled UAC.
>
> 1. Installed TurboGears2-2.0b1-py25_Python-2.5.exe Everything was left
> as default.
>
> 2. Then I went to freshly created c:\tg2tr folder and started
> following the wiki tutorial fromhttp://turbogears.org/2.0/docs/main/Wiki20/wiki20.html
>
> 3. paster and everything else was not in the path so I activated the
> virtuaenv via c:\tg2.0b1\Scripts\activate.bat After that quickstart
> worked
>
> 4. After that several tutorial steps went fine except for that I had
> to restart the service (since tutorial tells to modify __init__.py
> before you create page.py)
>
> 5. At the initializeDB step I get no module zope.sqlalchemy:http://paste.turbogears.org/paste/22586
> At this point "paster tginfo" shows the followinghttp://paste.turbogears.org/paste/22587
> At the same time if I go to C:\tg2.0b1\Lib\site-packages I see there
> the "zope.sqlalchemy-0.3-py2.5.egg" folder (not file, but folder with
> just a few *.py files in subdirectories).
>
> 6. Following your advice I run "easy_install zope.sqlalchemy" and
> script tells that the correct version is already installed :/http://paste.turbogears.org/paste/22589

Mark Ramm

unread,
Dec 30, 2008, 3:01:59 PM12/30/08
to turbo...@googlegroups.com
Looks like zope.sqlalchemy is in the regular python path, but you're inside the virtualenv. 

If the virtual environment was setup with --no-site-packages it will not see the system python path, it will have it's own. 

I wonder if the problem is that you're using the virtual environment when everything is in the system python. 

Try running it after deactivating the virtual env, and let me know if that helps. 

--Mark 

2008/12/30 Artem Marchenko <artem.m...@gmail.com>

Aigarius

unread,
Dec 30, 2008, 3:06:56 PM12/30/08
to TurboGears
On Dec 30, 5:42 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> On Tue, Dec 30, 2008 at 10:38 AM, Aigarius <aigar...@gmail.com> wrote:
>
> > On Dec 29, 3:54 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> > > To download 2.0 beta 1, simply follow the instructions here:
>
> > >http://turbogears.org/2.0/docs/main/DownloadInstall.html
>
> > People with existing 1.9.7 virtualenv installations can just do:
>
> > $ tg2env/bin/activate
> > $ easy_install -ihttp://www.turbogears.org/2.0/downloads/current/index
> > -U <http://www.turbogears.org/2.0/downloads/current/index-U> tg.devtools
>
> Looks correct to me.

Unfortunately that did not work too well. TG 1.9.7 folder was still
there after the upgrade and paster still used the old version
producing weird errors with the new quickstart code. Had to nuke it
and reinstall.

Mark Ramm

unread,
Dec 30, 2008, 3:09:48 PM12/30/08
to turbo...@googlegroups.com

Were you using a development install of 1.9.7, did you get any errors
during the easy_install upgrade?

I'm just hoping to figure out what happened so we can make sure nobody
else has trouble....

--Mark Ramm

Artem Marchenko

unread,
Dec 30, 2008, 3:53:22 PM12/30/08
to TurboGears
Hmm, I didn't install the virtualenv at all. As far as I understand it
was installed together with python by the TG2 installer. I see
virtualenv in c:\python25\scripts (this folder isn't in the system
PATH by the way, but I guess it doesn't matter since I am able to
activate the virtualenv via activate.bat).

I am not sure how to check the virtualenv path. Investigating..

Best regards,
Artem.

On Dec 30, 10:01 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> Looks like zope.sqlalchemy is in the regular python path, but you're inside
> the virtualenv.
> If the virtual environment was setup with --no-site-packages it will not see
> the system python path, it will have it's own.
>
> I wonder if the problem is that you're using the virtual environment when
> everything is in the system python.
>
> Try running it after deactivating the virtual env, and let me know if that
> helps.
>
> --Mark
>
> 2008/12/30 Artem Marchenko <artem.marche...@gmail.com>

Aigarius

unread,
Dec 30, 2008, 4:05:18 PM12/30/08
to TurboGears
On Dec 30, 10:09 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> On Tue, Dec 30, 2008 at 3:06 PM, Aigarius <aigar...@gmail.com> wrote:
>
> > On Dec 30, 5:42 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> >> On Tue, Dec 30, 2008 at 10:38 AM, Aigarius <aigar...@gmail.com> wrote:
>
> >> > On Dec 29, 3:54 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> >> > > To download 2.0 beta 1, simply follow the instructions here:
>
> >> > >http://turbogears.org/2.0/docs/main/DownloadInstall.html
>
> >> > People with existing 1.9.7 virtualenv installations can just do:
>
> >> > $ tg2env/bin/activate
> >> > $ easy_install -ihttp://www.turbogears.org/2.0/downloads/current/index
> >> > -U <http://www.turbogears.org/2.0/downloads/current/index-U> tg.devtools
>
> >> Looks correct to me.
>
> > Unfortunately that did not work too well. TG 1.9.7 folder was still
> > there after the upgrade and paster still used the old version
> > producing weird errors with the new quickstart code. Had to nuke it
> > and reinstall.
>
> Were you using a development install of 1.9.7, did you get any errors
> during the easy_install upgrade?

I installed 1.9.7 in virtualenv as a user using the same command a few
weeks ago following the same install manual. There were no errors
during the upgrade.

> I'm just hoping to figure out what happened so we can make sure nobody
> else has trouble....

The symptom that I saw was that after creating a new quickstart
project it failed to start with a huge error message (listing all
members of tg variable in template context and complaining that there
is no tg.auth_stack_enabled) and the stack trace of that error showed
that TG 1.9.7 components were still used. At that point I deleted the
tg2env folder and started the installation from scratch and the error
went away

It looks like easy_install -U does not remove the old versions of the
packages. It is pretty absurd to me (spoiled by apt-get), but it looks
like removing and recreating the virtulenv might be the safest way to
upgrade.

Artem Marchenko

unread,
Dec 30, 2008, 4:21:27 PM12/30/08
to TurboGears
Hi Mark

After deactivating virtualenv I've got the same error: zope.sqlalchemy
is missing.
Further analysis of your words and tutorial instructions made me think
that the clone of the whole python and many libraries should be
present in the virtual environment.

Well, first of all I didn't create any virtual environment at all
everything was created by the TG2 windows installer. c:\tg2.0b1
directory created by installer contains \Scripts and \Lib with site-
packages inside (and zope.sqlalchemy is there), but there is no python
interpreter inside.

OK, maybe windows installer created not 100% correct environment. So I
decided to create environment myself following the wiki tutorial.
Unfortunately it crashed midway with the error code that looks like
some pointer address: http://paste.turbogears.org/paste/22606
Couple of days ago (just before the beta1 release) I was trying to
install TG2 manually, without the Windows installer and was stuck at
exactly the same point. Actually I decided to try the Windows
installer because [as I think] it creates virtualenv itself and
somehow does it without crash.

Now I am stuck :)
Installer creates not fully working env and manual env creation
crashes midway.

Best regards,
Artem.

On Dec 30, 10:01 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> Looks like zope.sqlalchemy is in the regular python path, but you're inside
> the virtualenv.
> If the virtual environment was setup with --no-site-packages it will not see
> the system python path, it will have it's own.
>
> I wonder if the problem is that you're using the virtual environment when
> everything is in the system python.
>
> Try running it after deactivating the virtual env, and let me know if that
> helps.
>
> --Mark
>
> 2008/12/30 Artem Marchenko <artem.marche...@gmail.com>

Artem Marchenko

unread,
Dec 30, 2008, 4:23:33 PM12/30/08
to TurboGears
correction: there is python.exe in c:\tg2.0b1\Scripts

On Dec 30, 11:21 pm, Artem Marchenko <artem.marche...@gmail.com>

Artem Marchenko

unread,
Dec 30, 2008, 4:44:55 PM12/30/08
to TurboGears
From the virtualenv's python it looks like both zope and
zope.sqlalchemy are indeed registered and are found in the correct
place. Strange: http://paste.turbogears.org/paste/22610

Artem.

On Dec 30, 11:23 pm, Artem Marchenko <artem.marche...@gmail.com>

Artem Marchenko

unread,
Dec 30, 2008, 5:03:34 PM12/30/08
to TurboGears
I solved the problem and managed to execute initializeDB.py correctly.
What helped is to directly call the python interpreter from the
command line - "python initializeDB.py". I guess when I was trying to
execute just "initializeDB.py" Windows took the "*.py" handler from c:
\Python25 even though it wasn't in a system path folder.

My bad that I didn't follow the tutorial to the last letter. However,
I guess there are quite many Windows guys that are so much used to the
default windows behavior that run only "file.py" even if instructions
tell to run "python file.py", especially when instructions are from
the linux environment.

It might be a good idea to add a note to the tutorial. Something like
"Windows folks, be sure to write the 'python' word in the command
line. On some machines running just 'initializeDB.py' might call the
wrong interpreter copy".

Best regards,
Artem.

On Dec 30, 11:44 pm, Artem Marchenko <artem.marche...@gmail.com>

Mark Ramm

unread,
Dec 30, 2008, 7:24:26 PM12/30/08
to turbo...@googlegroups.com
Thanks for the update. We should in fact add a little warning to the
tutorial. Do you mind making a ticket for that and assigning it to me
so we don't forget to do it before beta 2?

--Mark Ramm

2008/12/30 Artem Marchenko <artem.m...@gmail.com>:

--

Artem Marchenko

unread,
Dec 31, 2008, 1:34:43 PM12/31/08
to TurboGears
Done: http://trac.turbogears.org/ticket/2119

On Dec 31, 2:24 am, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> Thanks for the update.   We should in fact add a little warning to the
> tutorial. Do you mind making a ticket for that and assigning it to me
> so we don't forget to do it before beta 2?
>
> --Mark Ramm
>
> 2008/12/30 Artem Marchenko <artem.marche...@gmail.com>:

runenes

unread,
Dec 29, 2008, 8:42:58 PM12/29/08
to TurboGears
> To download 2.0 beta 1, simply follow the instructions here:
> http://turbogears.org/2.0/docs/main/DownloadInstall.html

First I have to thank you guys for saving my christmas :p I had to
spend a week at home with my parents and other relatives without
Internet :-o But just before I went there I downloaded tg and some
docs and I had a blast learning it and building a web app with it :D
On a side note I think having no internet increases productivity (as
long as you have downloaded plenty of docs in advance at least).

I just tried installing the tg2 beta using the instructions from
http://turbogears.org/2.0/docs/main/DownloadInstall.html . But I get
an error. Everything worked up on till easy_install -i
http://www.turbogears.org/2.0/downloads/current/index tg.devtools . I
get the error:

(tg2env)rune@zaphod:~/tg2env$ easy_install -i
http://www.turbogears.org/2.0/downloads/current/index tg.devtools
Searching for tg.devtools
Best match: tg.devtools 2.0b1
Processing tg.devtools-2.0b1-py2.5.egg
tg.devtools 2.0b1 is already the active version in easy-install.pth

Using /home/rune/tg2env/lib/python2.5/site-packages/tg.devtools-2.0b1-
py2.5.egg
Processing dependencies for tg.devtools
Searching for zope.sqlalchemy
Reading http://www.turbogears.org/2.0/downloads/current/index/zope.sqlalchemy/
No local packages or download links found for zope.sqlalchemy
error: Could not find suitable distribution for Requirement.parse
('zope.sqlalchemy')


Maybe I'm doing something stupid, but just wanted to post this incase
others are having the same problem.

Mark Ramm

unread,
Jan 2, 2009, 3:36:53 PM1/2/09
to turbo...@googlegroups.com
> Reading http://www.turbogears.org/2.0/downloads/current/index/zope.sqlalchemy/
> No local packages or download links found for zope.sqlalchemy
> error: Could not find suitable distribution for Requirement.parse
> ('zope.sqlalchemy')

This is very strange, because when I go to:

http://www.turbogears.org/2.0/downloads/current/index/zope.sqlalchemy/

I get an obvious link to download zope.sqlalchemy, which seems to work fine.

But it seems like perhaps some other folks are having a similar
problem. I wonder what's going on.... What OS, what Python version,
and what version of setuptools do you have?

--Mark Ramm

James

unread,
Jan 2, 2009, 9:18:06 PM1/2/09
to turbo...@googlegroups.com
Hi,
I get an error:
GenerationException: Can only return a string, got unicode instead: /FrontPage
why?
 



《大话西游外传》贺岁新作,送豪宅、送你5000元压岁钱

Mark Ramm

unread,
Jan 3, 2009, 8:41:08 AM1/3/09
to turbo...@googlegroups.com
I assume this is a routes issue, though you don't quite give us enough
traceback to know for sure.

I think what's happening is that tg.redirect and tg.url changed to use
routes url_for, and url_for can't handle unicode strings being passed
to it. In the short term you can encode the string as asci or utf9
on the way into the redirect.

a.encode('utf8')


In trunk we have some code that does this automatically for you, and
I'm talking to Ben to see why routes does not accept unicode and
generate utf8 encoded urls.

--Mark

--

yearl

unread,
Jan 5, 2009, 7:46:59 PM1/5/09
to TurboGears
Hi,
Thank you for your answer
I hacked in the file:
\Python25\Lib\site-packages\routes-1.10.1-py2.5.egg\routes\util.py

delete the lines:
if not isinstance(url, str) and url is not None:
raise GenerationException("url_for can only return a string,
got "
"unicode instead: %s" % url)

every things is OK.

and after i pasted the lines back:
if not isinstance(url, str) and url is not None:
raise GenerationException("url_for can only return a string,
got "
"unicode instead: %s" % url)

every things is OK now.



On Jan 3, 9:41 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> I assume this is a routes issue, though you don't quite give us enough
> traceback to know for sure.
>
> I think what's happening is that tg.redirect and tg.url changed to use
> routes url_for, and url_forcan't handleunicodestrings being passed
> to it. In the short term youcanencode thestringas asci or utf9
Reply all
Reply to author
Forward
0 new messages