details: http://www.bx.psu.edu/hg/galaxy/rev/e87013fd0716 changeset: 2634:e87013fd0716 user: James Taylor <james@jamestaylor.org> date: Fri Aug 28 14:53:51 2009 -0400 description: Fix for unicode filenames in upload. 3 file(s) affected in this change: eggs.ini lib/galaxy/web/framework/__init__.py templates/root/history_common.mako diffs (55 lines): diff -r b85cb0a65f46 -r e87013fd0716 eggs.ini --- a/eggs.ini Fri Aug 28 13:13:18 2009 -0400 +++ b/eggs.ini Fri Aug 28 14:53:51 2009 -0400 @@ -32,7 +32,7 @@ flup = 0.5 lrucache = 0.2 ;lsprof - james -Mako = 0.1.10 +Mako = 0.2.4 MyghtyUtils = 0.52 nose = 0.9.1 NoseHTML = 0.2 @@ -81,7 +81,7 @@ elementtree = http://effbot.org/downloads/elementtree-1.2.6-20050316.tar.gz flup = http://www.saddi.com/software/flup/dist/archive/flup-r2311.tar.gz lrucache = http://evan.prodromou.name/lrucache/lrucache-0.2.tar.gz -Mako = http://www.makotemplates.org/downloads/Mako-0.1.10.tar.gz +Mako = http://www.makotemplates.org/downloads/Mako-0.2.4.tar.gz MyghtyUtils = http://cheeseshop.python.org/packages/source/M/MyghtyUtils/MyghtyUtils-0.52.... nose = http://www.somethingaboutorange.com/mrl/projects/nose/nose-0.9.1.tar.gz NoseHTML = http://dist.g2.bx.psu.edu/nosehtml-0.2.tar.bz2 diff -r b85cb0a65f46 -r e87013fd0716 lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py Fri Aug 28 13:13:18 2009 -0400 +++ b/lib/galaxy/web/framework/__init__.py Fri Aug 28 14:53:51 2009 -0400 @@ -583,12 +583,12 @@ data.update( kwargs ) ## return template.render( **data ) def render( environ, start_response ): - response_write = start_response( self.response.wsgi_status(), - self.response.wsgi_headeritems() ) - class C: - def write( self, *args, **kwargs ): - response_write( *args, **kwargs ) - context = mako.runtime.Context( C(), **data ) + response_write = start_response( self.response.wsgi_status(), self.response.wsgi_headeritems() ) + class StreamBuffer( object ): + def write( self, d ): + response_write( d.encode( 'utf-8' ) ) + buffer = StreamBuffer() + context = mako.runtime.Context( buffer, **data ) template.render_context( context ) return [] return render diff -r b85cb0a65f46 -r e87013fd0716 templates/root/history_common.mako --- a/templates/root/history_common.mako Fri Aug 28 13:13:18 2009 -0400 +++ b/templates/root/history_common.mako Fri Aug 28 14:53:51 2009 -0400 @@ -35,7 +35,7 @@ <a class="icon-button delete" title="delete" href="${h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${data.id}"></a> </div> <span class="state-icon"></span> - <span class="historyItemTitle"><b>${hid}: ${data.display_name()}</b></span> + <span class="historyItemTitle"><b>${hid}: ${data.display_name().decode('utf-8')}</b></span> </div> ## Body for history items, extra info and actions, data "peek"