TurboGears 0.9a6 released!

4 views
Skip to first unread message

Kevin Dangoor

unread,
May 10, 2006, 7:16:22 AM5/10/06
to turbo...@googlegroups.com
People have been doing quite a bit of testing on 0.9a5 and we had a
number of good patches. So, today, I'm happy to announce the release
of TurboGears 0.9a6.

http://www.turbogears.org/preview/

0.9a6 (May 9, 2006)
-------------------

*Backwards Incompatibilities*

* `i18n.runTemplateFilter` in the config file has been renamed
`i18n.run_template_filter` (#796)
* For people using FastData (experimental): `get_add_url`,
`get_edit_url` and `get_delete_url` all are passed the row instead
of the ID now, allowing you to use something other than the ID
if desired.
* In widgets, if you were using a dictionary as a params be aware that now
the dictionary is not updated at construction or display/render time but
simply replaced with the new one.
If you were using it to provide default attributes for your widget, take a
look at how the TableForm does that.

*Features*

* A new function, `turbogears.util.find_precision`, to tell you
how many decimal places of precision are required. (To help
with `i18n.format.format_decimal` which needs to know the
precision.)
* tg-admin info shows which eggs require TurboGears
* In widgets, SelectionField now supports grouped options,
SingleSelectField and MultipleSelectField widgets take advantage of this
to provide an optgroup tag. The format of a grouped options list is like
the following:

options = [(None, [(1, "a"), (2, "b")]), ("Others", [(3, "c"), (4, "d")])]

* The Widget Browser now displays the source of the example and the
template provided by default in the widget (to allow for easier
complete customization) (#840, #841)
* Tabber and Syntax Highlighter widgets are now included

*Changes*

* sqlite database URIs can now be specified as sqlite:///c:/foo/bar on
Windows, which is more natural for users. (The sqlite:///c|/foo/bar
syntax still works.)
* ValueError is raised if an InputWidget contains "." or "-", which are
reserved for use by the widgets
* Package name is used instead of `your_project` in the quickstart
logging config.

*Fixes*

* QUICKSTART: an exception comes up if a user logs in but is not in
a group that is required for access. The line with
`if not identity.current.anonymous and identity.was_login_attempted()`
in controllers.py or root.py needs an additional
`and not identity.get_identity_errors()` condition. (#834)
* QUICKSTART: quickstart projects that used identity would generate
a table called "user", which is invalid for some databases. The
new quickstart model.py generates tables called `tg_user`. #805
* QUICKSTART: there were problems with the model template for SQLAlchemy
(#801)
* SQLAlchemy's identity provider was not selected by default when you
quickstart a new project. (#806)
* Core widgets all include WidgetDescriptions now and appear in the
Widget Browser in the Toolbox (#727)
* Access logging to a file wasn't working correctly (#816)
* Bug fix for convert/`from_python` for compound and repeating widgets
* User name is now encoded to the DB encoding before a query is run
in the SQLObject identity provider
* JSLink widgets can now specify a location
* LocalizableJSLink (and the calendar widget) now work in IE (#846)
* Added scheduler to `turbogears.__init__.__all__` so that references
to it work properly.
* tg-admin info and Toolbox info commands now work properly and show
the same information.
* Fixed a serious bug in Python 2.3 compatibility (#853)

*Project Updates*

* MochiKit updated to 1.3.1 (#804)

*Contributors*

Max Ischenko, Claudio Martinez, Matt Good, Rune Hansen, Michele Cella,
Jorge Godoy, Alberto Valverde González, Simon Belak, Jeroen Dekkers,
Mark Ramm-Christensen, Ronald Jaramillo,
Richard Standbrook, Roger Demetrescu, Patrick Lewis, Hal Wine,
Jorge Vargas, Bob Kuehne.


--
Kevin Dangoor
TurboGears / Zesty News

email: k...@blazingthings.com
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Minh Luu

unread,
May 10, 2006, 8:24:52 PM5/10/06
to turbo...@googlegroups.com
Hi All,

Could someone give me some tips on how to setup Identity with SQLAlchemy
please?

I've done a fresh install of TurboGears 0.9a6. The install went no problem.
I then ran the tg-admin as below:

$ tg-admin quickstart testme
Enter package name [testme]:
Do you need Identity (usernames/passwords) in this project? [no] yes
Select your provider sqlobject or sqlalchemy [sqlobject]: sqlalchemy

The tg-admin script completed no problem.
I then modified the dev.cfg and change the following line

sqlobject.dburi="sqlite://%(current_dir_uri)s/devdata.sqlite"
to
sqlalchemy.dburi="sqlite://%(current_dir_uri)s/testmedb.sqlite"

I also change "myApp" in the model.py file to "testme".

I then start the app with start-testme.py but I got exception about
"AttributeError: 'thread._local' object has no attribute 'engine'".

Below is the error log.

2006-05-11 10:18:30,030 turbogears.visit INFO Visit Tracking starting
2006-05-11 10:18:30,036 turbogears.visit INFO Visit filter initialised
Unhandled exception in thread started by <bound method Server._start of
<cherrypy._cpserver.Server object at 0xb7bf95ac>>
Traceback (most recent call last):
File "CherryPy-2.2.1-py2.4.egg/cherrypy/_cpserver.py", line 78, in _start
File "CherryPy-2.2.1-py2.4.egg/cherrypy/_cpengine.py", line 108, in _start
File "TurboGears-0.9a6-py2.4.egg/turbogears/startup.py", line 219, in
startTurboGears
File "TurboGears-0.9a6-py2.4.egg/turbogears/visit/api.py", line 68, in
start_extension
File "TurboGears-0.9a6-py2.4.egg/turbogears/visit/api.py", line 87, in
create_extension_model
File "TurboGears-0.9a6-py2.4.egg/turbogears/visit/savisit.py", line 22, in
create_model
File "build/bdist.linux-i686/egg/sqlalchemy/schema.py", line 235, in
create
File "build/bdist.linux-i686/egg/sqlalchemy/ext/proxy.py", line 50, in
__getattr__
File "build/bdist.linux-i686/egg/sqlalchemy/ext/proxy.py", line 114, in
get_engine
AttributeError: 'thread._local' object has no attribute 'engine'

pierreva

unread,
May 11, 2006, 7:59:27 AM5/11/06
to TurboGears
I just upgraded from 0.9a4 to 0.9a6. Toolbox works except this error
with Widget Browser :
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboTinyMCE-1.0.dev-py2.4.egg/tinymce/widgets.py",
line 79, in update_data
d['TinyMCEInit'] = "tinyMCE.init(%s);" % jsonify(d['mce_options'])
File "<string>", line 5, in jsonify
File "_speedups.pyx", line 376, in
_speedups.BaseDispatcher.__getitem__
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/RuleDispatch-0.5a0.dev_r2115-py2.4-macosx-10.4-ppc.egg/dispatch/interfaces.py",
line 15, in __call__
NoApplicableMethods: (({'theme_advanced_toolbar_location': 'top',
'theme_advanced_toolbar_align': 'center',
'paste_auto_cleanup_on_paste': True, 'paste_convert_headers_to_strong':
False, 'theme_advanced_resizing': True,
'theme_advanced_statusbar_location': 'bottom',
'paste_strip_class_attributes': 'all', 'theme': 'advanced', 'elements':
'mce_sample', 'mode': 'exact', 'plugins': 'advimage',
'paste_use_dialog': False, 'extended_valid_elements':
'a[href|target|name]'},), {})
Do you think it's related to TurboTinyMCE ?

Pierre

Kevin Dangoor

unread,
May 11, 2006, 8:26:41 AM5/11/06
to turbo...@googlegroups.com
On 5/11/06, pierreva <pierre....@gmail.com> wrote:
>
> I just upgraded from 0.9a4 to 0.9a6. Toolbox works except this error
> with Widget Browser :
> File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboTinyMCE-1.0.dev-py2.4.egg/tinymce/widgets.py",
> line 79, in update_data
> d['TinyMCEInit'] = "tinyMCE.init(%s);" % jsonify(d['mce_options'])

I *believe* that this has been fixed in a more recent version of
TurboTinyMCE. Maybe we should make the Widget Browser more robust when
it comes to broken third party widgets...

Try

easy_install -U TurboTinyMCE

Kevin

Helio Pereira

unread,
May 11, 2006, 8:28:33 AM5/11/06
to TurboGears
Minh Luu, I have the same problem with the TG revision 1456...

Do you know what is the problem?

Kevin Dangoor

unread,
May 11, 2006, 8:31:20 AM5/11/06
to turbo...@googlegroups.com
On 5/11/06, Helio Pereira <helio.mc...@gmail.com> wrote:
>
> Minh Luu, I have the same problem with the TG revision 1456...
>
> Do you know what is the problem?

What version of SQLAlchemy are you running? There have been *major*
changes to SQLAlchemy in the 0.2 line, and I don't think ActiveMapper
(or Identity) are caught up to that yet.

Kevin

pierreva

unread,
May 11, 2006, 8:44:50 AM5/11/06
to TurboGears
Thanks Kevin, it works

Helio Pereira

unread,
May 11, 2006, 9:44:30 AM5/11/06
to TurboGears
Hi Kevin,

I'm using SQLAlchemy-0.1.7...

Jorge Godoy

unread,
May 11, 2006, 10:02:12 AM5/11/06
to turbo...@googlegroups.com
Em Quinta 11 Maio 2006 10:44, Helio Pereira escreveu:
> Hi Kevin,
>
> I'm using SQLAlchemy-0.1.7...

http://trac.turbogears.org/turbogears/ticket/833


--
Jorge Godoy <jgo...@gmail.com>

Reply all
Reply to author
Forward
0 new messages