- **status**: open --> closed


---

** [bugs:#61] PIL → pillow: changes to "import Image" required**

**Status:** closed
**Created:** Thu May 16, 2013 03:17 PM UTC by Stuart Prescott
**Last Updated:** Thu May 16, 2013 03:17 PM UTC
**Owner:** nobody

Hi!

The PIL module looks like it is changing and this has consequences for pyx. A 
summary of the changes and how it affects packages was made by the Debian 
python maintainer:

    http://lists.debian.org/[email protected]

There aren't a lot of places where PIL modules are imported, but eventually 
each of these will need to be changed to be compatible with the new layout.

pyx/mesh.py:            import Image
pyx/mesh.py:            import Image
pyx/epsfile.py:        import Image
examples/bitmap/jpeg.txt:    import Image
examples/bitmap/pil.py:import Image
contrib/imgconvert.py:    import Image
contrib/epstopng.py:import Image # we use the python image library (PIL)

Fortunately, the change is quite trivial and backwards compatible:

  import Image

becomes

  try:
    from PIL import Image
  except ImportError:
    import Image

(trying the new style import and then the old style import). In Debian and 
Ubuntu, the python-imaging-compat package will provide a temporary 
compatibility layer and I'll make the pyx packages depend on that compatibility 
layer for the time being.

I'm happy to throw a patch for this in your direction closer to the time when 
PIL changes hit the repository, but feel free to beat me to it if you so desire 
;)

cheers
Stuart




---

Sent from sourceforge.net because you indicated interest in 
<https://sourceforge.net/p/pyx/bugs/61/>

To unsubscribe from further messages, please visit 
<https://sourceforge.net/auth/subscriptions/>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to