Mako 0.3.4 incompatible with App Engine due to markupsafe

Issue #151 resolved
guest
created an issue

Until 0.3.3 Mako was compatible with appengine.

Then 0.3.4 came, and Mako is not compatible any more.

The solution: Don't assume markupsafe is installed. It markupsafe is not installed, just fall backwards to the original html escape code.

http://groups.google.com/group/mako-discuss/browse_thread/thread/ab80a9ccd7fc2f0e/699889fbab6fc29a?lnk=gst

+try: + import markupsafe + def html_escape(string): + return markupsafe.escape(string) +except: + html_escape = legacy_html_escape

Fh

Comments (2)

  1. Michael Bayer repo owner

    Need to know how setup.py should be modified. MarkupSafe is currently in the "install_requires" list. Do we want to construct "install_requires" ahead of time, using a conditional "detect_gae" switch to determine if MarkupSafe should be added? Or does GAE not use "install_requires" in its setup procedures ?

  2. Log in to comment