Skip to content

Instantly share code, notes, and snippets.

@cleebp
Created August 8, 2024 21:25
Show Gist options
  • Save cleebp/ad3b6fe9cbe92b9cbe1aa2fbb103d5fa to your computer and use it in GitHub Desktop.
Save cleebp/ad3b6fe9cbe92b9cbe1aa2fbb103d5fa to your computer and use it in GitHub Desktop.
Pillow 9.4.0 patch: Fix ImageCms import without lcms2 installed
From 29c1794f8f402f0befd56621c63e5ddf26ad5b2e Mon Sep 17 00:00:00 2001
From: Brian Clee <[email protected]>
Date: Thu, 8 Aug 2024 14:06:38 -0700
Subject: [PATCH 1/1] fix-ImageCms-import-without-lcms2
---
src/PIL/ImageCms.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PIL/ImageCms.py b/src/PIL/ImageCms.py
index ec10230..258d555 100644
--- a/src/PIL/ImageCms.py
+++ b/src/PIL/ImageCms.py
@@ -392,7 +392,7 @@ def get_display_profile(handle: SupportsInt | None = None) -> ImageCmsProfile |
# --------------------------------------------------------------------.
_CmsProfileCompatible = Union[
- str, SupportsRead[bytes], core.CmsProfile, ImageCmsProfile
+ str, SupportsRead[bytes], "core.CmsProfile", ImageCmsProfile
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment