From 140c4b54c02052412a377f6c8e5d41bbdac8e627 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 22 Mar 2017 10:15:29 -0700 Subject: [PATCH] Remove superfluous import of FixTk The `_imaging` module does not link against libtcl/libtk. `FixTk` is imported by `import Tkinter` if necessary. The `FixTk` module is for Python 2.x on Windows only. --- PIL/Image.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 1c6019a10..bcc94af9d 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -46,15 +46,6 @@ class _imaging_not_installed(object): # Limit to around a quarter gigabyte for a 24 bit (3 bpp) image MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 // 4 // 3) -try: - # give Tk a chance to set up the environment, in case we're - # using an _imaging module linked against libtcl/libtk (use - # __import__ to hide this from naive packagers; we don't really - # depend on Tk unless ImageTk is used, and that module already - # imports Tkinter) - __import__("FixTk") -except ImportError: - pass try: # If the _imaging C module is not present, Pillow will not load.