Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mako 0.3.4 incompatible with App Engine due to markupsafe #151

Closed
sqlalchemy-bot opened this issue Sep 27, 2010 · 3 comments
Closed

Mako 0.3.4 incompatible with App Engine due to markupsafe #151

sqlalchemy-bot opened this issue Sep 27, 2010 · 3 comments

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Sep 27, 2010

Migrated issue, originally created by Anonymous

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

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Sep 27, 2010

Michael Bayer (@zzzeek) wrote:

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 ?

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 20, 2010

Michael Bayer (@zzzeek) wrote:

OK thanks for the answer, anyway, change is in 2f40aa9. Releasing now without changing setup.py, I guess if there's a problem then I'll get some more feedback from the GAE crowd.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 20, 2010

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.