[Image-SIG] Python 3 port -- first pass finished

Mikhail Korobov kmike84 at gmail.com
Mon Oct 29 20:11:26 CET 2012


Hello Brian et al,

Thanks for your work!

There are some issues with Python3 fork (I don't know if they apply to
"main" Pillow though):

1) Test running doesn't work for me.

    python Tests/run.py

fails with many obscure errors:

running test_numpy ...
=== error 256
Traceback (most recent call last):
  File "Tests/test_numpy.py", line 1, in <module>
    from tester import *
  File "/Users/kmike/svn/Pillow/Tests/tester.py", line 1, in <module>
    from __future__ import print_function
ImportError: No module named __future__

py.test and nosetest can't even collect the tests from Tests folder so
something strange is happening :)

It would be great to run PIL tests using tox, but the supplied tox.ini
config runs only selftest.py (which is broken under Python3, but that's an
another issue, see https://github.com/fluggo/Pillow/pull/1 ).

2) fromstring and tostring methods are gone in Python3 version. They have
unfortunate names but I think it is better not to break the interface. For
example, I'm writing a Python 2/3 library that uses PIL and this change
breaks it under Python3. What do you think about issuing a deprecation
warning instead?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20121030/3db9489d/attachment-0001.html>


More information about the Image-SIG mailing list