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

running setup.py/2to3 changes unicode() to str() making code invalid #200

Closed
sqlalchemy-bot opened this issue Aug 1, 2012 · 5 comments
Closed
Labels
bug Something isn't working installation low priority

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Anonymous

setup.py distributed with mako runs 2to3 by default on systems with python3.

2to3 automatically changes unicode() to str() making some of the places where unicode() appears incorrect.

i.e. filters.py line 59:
unicode(str(x), encoding=key)

is getting changed to:
str(str(x), encoding=key)

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

will take a look, feel free to let me know where else you've seen it / provide patches....

ideally I'd convert Mako to not require 2to3, but we'd need to drop 2.4 support most likely

@sqlalchemy-bot
Copy link
Author

Anonymous wrote:

Is py3k branch on your bitbucket alive? I guess that's the best place to put it in as there are places where unicode changes from python 2 to 3 make the code useless (like checking if value is unicode or str, etc).

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

the only active branch for mako is "default". if there's a py3k there, that's back from when it was being ported to python 3.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

the current tip is py2k/py3k in place so this is fixed.

@sqlalchemy-bot
Copy link
Author

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
Labels
bug Something isn't working installation low priority
Projects
None yet
Development

No branches or pull requests

1 participant