TurboGears 0.9a2 released!

3 views
Skip to first unread message

Kevin Dangoor

unread,
Mar 27, 2006, 5:15:45 PM3/27/06
to turbo...@googlegroups.com, turbogear...@googlegroups.com
I'm happy to report that TurboGears 0.9a2 ("amazing") has been
released! There has been quite a bit of cleanup since 0.9a1 based on
the feedback from that release. The changes for this release appear
below and at
http://www.turbogears.org/preview/about/changelog.html

If you're upgrading from 0.9a1 or 0.8, be sure to read the upgrade
instructions! There are steps you need to take to be sure your app
will run correctly.

*Backwards Incompatibilities*

* Due to Python 2.3 issues and some additional discussion, the config
files have gone back to an INI-style format. This means that some
minor changes are needed if you were using the 0.9 ".py" config files,
but no changes are required for people using 0.8 ".cfg" config files.
See the upgrading guide for details.
* If you used CompoundWidgets in 0.9a1, "widgets" has changed to
"member_widgets".
* If you are using a Form or a FieldSet widget you must explicitly pass
the "fields" parameter, the first positional parameter expected
since 0.9a2 is "name".
* If you are using a Form or a FieldSet widget with a custom template
you must update your template accordingly to the new templates
TG is using.

*Deprecations*

* WidgetsDeclaration (introduced in 0.9a1) has been renamed WidgetsList
for clarity.
* turbogears.config now has get() and update() functions that should
be used in place of their cherrypy.config counterparts. This change
was made knowing that there will be more powerful, TurboGears-specific
configuration in TurboGears 1.1.
* The field_for method of a Form (introduced in 0.9a1) has been
deprecated and it's use is highly discouraged and error prone,
use display_field_for or render_field_for instead.
* In the turbogears.view module variableProviders has been renamed
variable_providers.
* turbogears.fastdata.formmaker's sqlwidgets function (introduced in
0.9a1) has been renamed fields_for.

*New Features*

* Controller methods can now have multiple expose() decorators, allowing
you to define different output formats (even with different template
engines) that can be chosen via tg_format or the Accept header.
* New AjaxGrid widget provides a grid in JavaScript that is populated via
an Ajax call.
* Three new base widgets to manage forms have been introduced:
CompoundFormField, RepeatingFormField and FormFieldsContainer.
* Experimental support for SQLAlchemy. For more complicated databases
or certain database requirements, SQLAlchemy handles the database more
gracefully. The main database layer for TurboGears remains SQLObject
and SQLObject is more fully supported within TurboGears. However,
for those who need it, SQLAlchemy support is there.
* display_field_for and render_field_for are automatically added to the
template scope of any FormFieldsContainer widget and can be used to
easily display/render a field with the corrects value and options.
* The basis for creating repeating sets of widgets has been created
(see RepeatingFormField and RepeatingFieldSet for an example)
* Catwalk can filter the data you see
* When using widgets, you can now have more than one form on a page
while retaining validation sanity.
* With widgets, required fields automatically get a CSS class
* CompoundWidgets/Forms now use FormEncode schemas, which provide
a number of additional validation options.
* AutoCompleteFields can now pass an ID back to the server when
submitted (instead of just passing the matching search string).
* quickstart includes a "release.py" file where you can put your
project information (including version number). This is the
safe mechanism for allowing your project itself to access the
version number while your setup script also has access to the
same information (Don't Repeat Yourself)
* quickstart has a new "tgbig" template designed for larger projects.
This adds a controllers package to the basic TurboGears template.
* CSSLink and CSSSource widgets now support "media"
* The AutoCompleteField now has an "only_suggest" flag which makes
it so that the first item on the list is not automatically submitted
when you press return. This is useful for search boxes (as opposed
to data entry fields).
* The turbogears.startup now contains call_on_startup and call_on_shutdown
lists. You can append callables to these to have them executed at
the right time.
* If you are using the i18n support, the _ function (alias of the
gettext function) is now properly mapped to lazy_gettext if
needed, this means you can use "_" for everything.
* Added LocalizableJSLink widget that allows scripts to be chosen based
on the user's locale.

*Changes*

* log\_debug\_info\_filter is now turned off by default (this is the
CherryPy filter that lists the request time). This filter causes
problems with things like JSON output. You can still turn it
back on via the config file.
* Unless you specifically configure the decodingFilter yourself,
TurboGears will automatically turn on CherryPy's decodingFilter
(expecting utf-8 input).
* cherrypy.lowercase_api is set to True in new quickstarted projects.
This should result in a performance boost, and requires that you use
PEP 8 style names when calling CherryPy APIs/config values.
* Table forms now use TH tags for the field labels, making it easier to
apply appropriate styling to the tables.
* AutoConnectHub used to support a "processConnection" (something it
inherited from SQLObject). This is not really a supported model of
operation, so it has been removed. If you do want to work that way,
use SQLObject's own ConnectionHub class.
* The test_model test has been commented out from the quickstart template,
because some projects don't have databases.


*Fixes*

* The TextArea widget now posts properly within a RemoteForm.
* Catwalk styling cleanup
* Catwalk no longer has problems with empty tables with foreign keys
* ForEach validator added to turbogears.validators namespace
* Catwalk will show related joins in the edit view
* SQLObject identity provider passwords are automatically encrypted
(this was in 0.9a1). This didn't work properly when identity wasn't
fully running (as in the tg-admin shell). This has been fixed.
* The AutoCompleteField turns off the browser's own autocompletion.
* A nicer error message is provided if you return something other
than a string or a dict from your controller method.
* admi18n does a better job of grouping files in the correct folder
when collecting strings and skips over folders like ".svn".
* The turbogears.url() function was flipping around path elements
in the application root. Applications roots are not commonly used
right now, but this was noticeable if you used the FeedController.
* Various fixes for CatWalk's database access (see tickets
#568, #249, #213, #618)
* ModelDesigner and admi18n can find your model.py file even if you
change your package name at quickstart time.

*Project Updates*

* Kid 0.9 / TurboKid 0.9.2
* CherryPy 2.2.0rc1
* PasteScript 0.5
* TurboGears' JSON output now comes from the TurboJson plugin

*Contributors*

This release comes to you thanks to the work of Michele Cella,
Elvelind Grandin, Ronald Jaramillo, Simon Belak, Jeff Watkins,
Alberto Valverde González, Jason Chu, Owen Mead-Robins,
Dan Weeks, Dennis Brakhane, Heikichi Umahara, Patrick Lewis,
Joost Moesker, Roger Demetrescu, Liza Daly.

Jorge Vargas

unread,
Mar 27, 2006, 7:01:51 PM3/27/06
to turbo...@googlegroups.com
great work guys and gals keep it up!

Jonathan LaCour

unread,
Mar 27, 2006, 7:19:54 PM3/27/06
to turbo...@googlegroups.com
I am trying to update Fast Track to 0.9a2 as quickly as possible. I
have it starting properly, and loading the login screen. Once I
successfully login, I get the following error:

------------------------------------------------------------------------
------
500 Internal error

The server encountered an unexpected condition which prevented it
from fulfilling the request.

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/CherryPy-2.2.0rc1-py2.4.egg/cherrypy/
_cphttptools.py", line 97, in _run
applyFilters('before_main')
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/CherryPy-2.2.0rc1-py2.4.egg/cherrypy/filters/
__init__.py", line 151, in applyFilters
method()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
visit.py", line 163, in before_main
plugin.record_request( visit )
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
identity/visitor.py", line 158, in record_request
identity= self.identity_from_request(visit.id)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
identity/visitor.py", line 84, in identity_from_request
identity= source(visit_id)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
identity/visitor.py", line 141, in identity_from_form
identity= self.provider.validate_identity( user_name, pw,
visit_id )
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
identity/soprovider.py", line 193, in validate_identity
user= user_class.byUserId( user_name )
File "<string>", line 1, in <lambda>
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
main.py", line 1266, in _SO_fetchAlternateID
result, obj = cls._findAlternateID(name, dbName, value, connection)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
main.py", line 1262, in _findAlternateID
value), None
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
dbconnection.py", line 587, in _SO_selectOneAlt
return self.queryOne("SELECT %s FROM %s WHERE %s = %s" %
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
dbconnection.py", line 755, in queryOne
return self._dbConnection._queryOne(self._connection, s)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
dbconnection.py", line 341, in _queryOne
self._executeRetry(conn, c, s)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
dbconnection.py", line 297, in _executeRetry
return cursor.execute(query)
TypeError: argument 1 must be str, not unicode
------------------------------------------------------------------------
------

Any idea whats going on? How do I fix it? There has been a mad rush
of people trying to install Fast Track, and I want to make sure this
works for everyone as soon as possible :)

Thanks!

--
Jonathan LaCour
http://cleverdevil.org


Keith R. Fieldhouse

unread,
Mar 27, 2006, 8:22:41 PM3/27/06
to turbo...@googlegroups.com
Attempting to install .9a2 on windows results in the following. Is
there some corruption in the distribution or do I have some problem on
my end?

C:\Projects\TGProjects>easy_install -Uf
http://www.turbogears.org/preview/download/index.html TurboGears
Processing TurboGears
Running setup.py -q bdist_egg --dist-dir
C:\Projects\TGProjects\TurboGears\egg-dist-tmp-bz7iit
File "build\bdist.win32\egg\turbogears\fastdata\datawidgets.py", line 19

tyyttyytttttttttttttttttttttttttttttttttjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj 999h jm9k0io.,uikm0,k0
^
SyntaxError: invalid syntax
File
"c:\python24\lib\site-packages\turbogears-0.9a1dev_r839-py2.4.egg\turbogears\fastdata\datawidgets.py",
line 19

tyyttyytttttttttttttttttttttttttttttttttjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj 999h jm9k0io.,uikm0,k0
^
SyntaxError: invalid syntax
turbogears 0.9a1dev-r839 is already the active version in easy-install.pth
Installing tg-admin-script.py script to C:\Python24\Scripts
Installing tg-admin.exe script to C:\Python24\Scripts

Installed c:\python24\lib\site-packages\turbogears-0.9a1dev_r839-py2.4.egg
Processing dependencies for turbogears==0.9a1dev-r839

C:\Projects\TGProjects>

deez...@gmail.com

unread,
Mar 27, 2006, 10:11:28 PM3/27/06
to TurboGears
Just reading the upgrade instructions:

>>Rename "yourpackage/config.py" to "yourpackage/config/app.cfg"

I do not have this config.py

Why wouldn't I have this file?

David

Kevin Dangoor

unread,
Mar 27, 2006, 10:18:02 PM3/27/06
to turbo...@googlegroups.com
On 3/27/06, Jonathan LaCour <jonatha...@cleverdevil.org> wrote:
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/TurboGears-0.9a2-py2.4.egg/turbogears/
> identity/soprovider.py", line 193, in validate_identity
> user= user_class.byUserId( user_name )
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
> dbconnection.py", line 297, in _executeRetry
> return cursor.execute(query)
> TypeError: argument 1 must be str, not unicode
> ------------------------------------------------------------------------
> ------
>
> Any idea whats going on? How do I fix it? There has been a mad rush
> of people trying to install Fast Track, and I want to make sure this
> works for everyone as soon as possible :)

userId in TG_User is, in fact, a UnicodeCol. So, that implies that the
column validator is not being applied before the query string is put
together. It's hard to imagine that this is a new bug in SQLObject,
but it's possible.

Kevin

Kevin Dangoor

unread,
Mar 27, 2006, 10:19:10 PM3/27/06
to turbo...@googlegroups.com

You wouldn't have it if you're upgrading from 0.8.x. (There are
instructions for that upgrade farther down the page.)

Kevin

Kevin Dangoor

unread,
Mar 27, 2006, 10:21:15 PM3/27/06
to turbo...@googlegroups.com
On 3/27/06, Keith R. Fieldhouse <turbo...@rexmere.com> wrote:
>
> Attempting to install .9a2 on windows results in the following. Is
> there some corruption in the distribution or do I have some problem on
> my end?

That's pretty weird. Beyond the bizarre non-text output you're
getting, it looks like you're probably in a directory with a
"turbogears" directory down below (note the references to 0.9a1dev).
I'd suggest switching to another directory and running that command
again.

Kevin

deez...@gmail.com

unread,
Mar 27, 2006, 10:33:33 PM3/27/06
to TurboGears
I am upgrading from 0.9a1. Which I upgraded from 0.8a5

deez...@gmail.com

unread,
Mar 27, 2006, 11:04:44 PM3/27/06
to TurboGears
Nevermind... a bout of moronity has set in. All better now.:)

Michele Cella

unread,
Mar 28, 2006, 1:24:34 AM3/28/06
to TurboGears
Strange I'm running FastTrack with 0.9a2 (ok, svn) and sqlite, I think
the bug is outside TG.

Ciao
Michele

Keith R. Fieldhouse

unread,
Mar 28, 2006, 8:12:07 AM3/28/06
to turbo...@googlegroups.com

<palm hits forehead>
Yup, that was the problem. Thanks for the pointer.
</palm hits forehead>

Richard (koorb)

unread,
Mar 28, 2006, 8:42:57 AM3/28/06
to TurboGears
It's good to see things moving so quickly. (I will get moving on the
web site) How do we use the tgbig template for quickstart then? did I
miss that?

Michele Cella

unread,
Mar 28, 2006, 8:50:11 AM3/28/06
to TurboGears

Can this help you Richard: http://tinyurl.com/hzm8j

Ciao
Michele

PS
Hey! Stop doing what you're being paid for and do the site! :P

Patrik Blommaskog

unread,
Mar 28, 2006, 9:26:17 AM3/28/06
to TurboGears
> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
> python2.4/site-packages/SQLObject-0.7.1dev_r1588-py2.4.egg/sqlobject/
> dbconnection.py", line 297, in _executeRetry
> return cursor.execute(query)
> TypeError: argument 1 must be str, not unicode

This seems to be the same problem that I had when enabling
decoding_filter with TG 0.9a1 and Identity:

http://groups.google.se/group/turbogears/browse_frm/thread/2cf3e873084c32e2/2f71073c7c58451a

I didn't solve the problem, instead deciding to wait a while and let
Identity mature. Now that decoding_filter is on by default, hopefully
it is likely to be fixed soon. :)

Richard (koorb)

unread,
Mar 28, 2006, 9:43:47 AM3/28/06
to TurboGears
Michele Cella wrote:
> Can this help you Richard: http://tinyurl.com/hzm8j

Thanks Michele, so this is the basic syntax right:

> tg-admin quickstart -t tgbig

that's cool and works accept it doesn't ask me for a project name and I
end up with a directory called tgbig, which I don't want :-)

> PS
> Hey! Stop doing what you're being paid for and do the site! :P

hehe, not too far off now ;-)

Jonathan LaCour

unread,
Mar 28, 2006, 10:52:14 AM3/28/06
to turbo...@googlegroups.com
Michele wrote:
> Strange I'm running FastTrack with 0.9a2 (ok, svn) and sqlite, I think
> the bug is outside TG.

I was able to get it working on my PowerBook after some hackery. I
was using psychopg1 when I got this error, so I updated to
psychopg2. Then, SQLObject failed to connect complaining about the
port number being passed in as a string, so I had to hack SQLObject
to convert the port number to an int before passing it into the
driver. This seemed to fix the problem.

The odd thing is that I just got to work, and upgraded to TG 0.9a2
and the updated Fast Track, and everything works just fine. Who
knows! Its working for me now :)

Kevin wrote:
> userId in TG_User is, in fact, a UnicodeCol. So, that implies that the
> column validator is not being applied before the query string is put
> together. It's hard to imagine that this is a new bug in SQLObject,
> but it's possible.

Yes, however we are using our own SQLObject model for TG_User (our
Person object) which uses standard StringCol. Do you think this is a
problem?

Kevin Dangoor

unread,
Mar 28, 2006, 11:21:30 AM3/28/06
to turbo...@googlegroups.com
On 3/28/06, Jonathan LaCour <jonatha...@cleverdevil.org> wrote:
> Kevin wrote:
> > userId in TG_User is, in fact, a UnicodeCol. So, that implies that the
> > column validator is not being applied before the query string is put
> > together. It's hard to imagine that this is a new bug in SQLObject,
> > but it's possible.
>
> Yes, however we are using our own SQLObject model for TG_User (our
> Person object) which uses standard StringCol. Do you think this is a
> problem?

Potentially. It really depends on how the database is going to feel if
it gets handed a unicode string. As of 0.9a2, we have the decode
filter turned on, so it's possible to get unicode objects coming in
from the web.

Kevin

Reply all
Reply to author
Forward
0 new messages