public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pillow/files/, dev-python/pillow/
Date: Mon,  1 Jan 2024 12:30:57 +0000 (UTC)	[thread overview]
Message-ID: <1704112254.c66593ad312f60d619d83653f73f158395b8edb7.mgorny@gentoo> (raw)

commit:     c66593ad312f60d619d83653f73f158395b8edb7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  1 12:15:39 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan  1 12:30:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c66593ad

dev-python/pillow: Backport file closing fix for olefile-0.47

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pillow/files/pillow-10.1.0-olefile-0.47.patch  | 50 ++++++++++++++++++++++
 ...illow-10.1.0.ebuild => pillow-10.1.0-r1.ebuild} |  7 ++-
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/dev-python/pillow/files/pillow-10.1.0-olefile-0.47.patch b/dev-python/pillow/files/pillow-10.1.0-olefile-0.47.patch
new file mode 100644
index 000000000000..e3b6a6473dfc
--- /dev/null
+++ b/dev-python/pillow/files/pillow-10.1.0-olefile-0.47.patch
@@ -0,0 +1,50 @@
+From 0e523d986858e7c0b4acd45ea1c5a3a639e39b4b Mon Sep 17 00:00:00 2001
+From: Andrew Murray <radarhere@users.noreply.github.com>
+Date: Sat, 2 Dec 2023 10:57:16 +1100
+Subject: [PATCH] Fixed closing file pointer with olefile 0.47
+
+---
+ src/PIL/FpxImagePlugin.py | 1 +
+ src/PIL/MicImagePlugin.py | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/src/PIL/FpxImagePlugin.py b/src/PIL/FpxImagePlugin.py
+index a878cbfd2..3027ef45b 100644
+--- a/src/PIL/FpxImagePlugin.py
++++ b/src/PIL/FpxImagePlugin.py
+@@ -227,6 +227,7 @@ class FpxImageFile(ImageFile.ImageFile):
+                     break  # isn't really required
+ 
+         self.stream = stream
++        self._fp = self.fp
+         self.fp = None
+ 
+     def load(self):
+diff --git a/src/PIL/MicImagePlugin.py b/src/PIL/MicImagePlugin.py
+index 801318930..e4154902f 100644
+--- a/src/PIL/MicImagePlugin.py
++++ b/src/PIL/MicImagePlugin.py
+@@ -66,6 +66,7 @@ class MicImageFile(TiffImagePlugin.TiffImageFile):
+         self._n_frames = len(self.images)
+         self.is_animated = self._n_frames > 1
+ 
++        self.__fp = self.fp
+         self.seek(0)
+ 
+     def seek(self, frame):
+@@ -87,10 +88,12 @@ class MicImageFile(TiffImagePlugin.TiffImageFile):
+         return self.frame
+ 
+     def close(self):
++        self.__fp.close()
+         self.ole.close()
+         super().close()
+ 
+     def __exit__(self, *args):
++        self.__fp.close()
+         self.ole.close()
+         super().__exit__()
+ 
+-- 
+2.43.0
+

diff --git a/dev-python/pillow/pillow-10.1.0.ebuild b/dev-python/pillow/pillow-10.1.0-r1.ebuild
similarity index 96%
rename from dev-python/pillow/pillow-10.1.0.ebuild
rename to dev-python/pillow/pillow-10.1.0-r1.ebuild
index 1e25a3391179..0c65cdff5b1c 100644
--- a/dev-python/pillow/pillow-10.1.0.ebuild
+++ b/dev-python/pillow/pillow-10.1.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -70,6 +70,11 @@ EPYTEST_DESELECT=(
 	Tests/test_qt_image_qapplication.py::test_sanity
 )
 
+PATCHES=(
+	# https://github.com/python-pillow/pillow/pull/7594
+	"${FILESDIR}/${P}-olefile-0.47.patch"
+)
+
 usepil() {
 	usex "${1}" enable disable
 }


             reply	other threads:[~2024-01-01 12:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-01 12:30 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-29 12:24 [gentoo-commits] repo/gentoo:master commit in: dev-python/pillow/files/, dev-python/pillow/ Sam James
2024-11-03 15:43 Michał Górny
2024-06-05 17:00 Michał Górny
2024-05-11 11:05 Michał Górny
2020-01-26 13:33 David Seifert
2019-06-05 11:58 Virgil Dupras
2018-10-01 18:46 Virgil Dupras
2018-09-07 18:46 Virgil Dupras
2018-08-04 19:12 Virgil Dupras
2018-07-27  2:59 Virgil Dupras
2015-10-25  9:24 Justin Lecher
2015-10-02  9:41 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1704112254.c66593ad312f60d619d83653f73f158395b8edb7.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox