mikeboers / Flask-Images

On-demand resizing of images for Flask applications.
https://mikeboers.github.io/Flask-Images/
BSD 3-Clause "New" or "Revised" License
81 stars 43 forks source link

Support Python 3 #32

Closed gurkslask closed 9 years ago

gurkslask commented 9 years ago

Traceback (most recent call last): File "manage.py", line 13, in from flask.ext.images import Images File "/home/Projects/venv/lib/python3.4/site-packages/flask/exthook.py", line 81, in load_module reraise(exc_type, exc_value, tb.tb_next) File "/home/Projects/venv/lib/python3.4/site-packages/flask/_compat.py", line 32, in reraise raise value.with_traceback(tb) File "/home/Projects/venv/lib/python3.4/site-packages/flask_images/init.py", line 1, in from .core import Images, resized_img_src, resized_img_size, resized_img_attrs, resized_img_tag File "/home/Projects/venv/lib/python3.4/site-packages/flask_images/core.py", line 3, in from cStringIO import StringIO ImportError: No module named 'cStringIO'

Throws an import error when i'm importing Images from flask images. Running python3.4.0 Flask 0.10.1

iurisilvio commented 9 years ago

This plugin does not support Python 3 yet. It is about time to make it work.

mikeboers commented 9 years ago

I agree. Unfortunately time is not something I have in abundance. Hopefully someone else does. ;)

gurkslask commented 9 years ago

I just have to mention that when you look on pypi, it seems like Flask images supports python 3. Maybe remove that tag?

mikeboers commented 9 years ago

Oh dear. That was some sloppy work on my part (copying the setup.py from another project)... :blush:

It is gone now.

mikeboers commented 9 years ago

34 does get us most of the way there (I'm just not a fan of peppering the 2-vs-3 logic everywhere). Closing in preference of the pull request.