diff --git a/phatch-0.2.7-fromstring-tostring-deprecated.patch b/phatch-0.2.7-fromstring-tostring-deprecated.patch new file mode 100644 index 0000000..c210d00 --- /dev/null +++ b/phatch-0.2.7-fromstring-tostring-deprecated.patch @@ -0,0 +1,35 @@ +diff -Naur phatch-0.2.7.orig/phatch/lib/pyWx/wxPil.py phatch-0.2.7/phatch/lib/pyWx/wxPil.py +--- phatch-0.2.7.orig/phatch/lib/pyWx/wxPil.py 2016-08-21 10:23:45.000000000 +0200 ++++ phatch-0.2.7/phatch/lib/pyWx/wxPil.py 2016-08-21 11:28:39.505641044 +0200 +@@ -24,14 +24,14 @@ + image = image.convert('RGBA') + if image.mode == 'RGBA': + wx_image = wx.EmptyImage(*image.size) +- wx_image.SetData(image.convert("RGB").tostring()) ++ wx_image.SetData(image.convert("RGB").tobytes()) + wx_image.InitAlpha() + wx_image.SetAlphaData( +- image.convert("RGBA").split()[-1].tostring()) ++ image.convert("RGBA").split()[-1].tobytes()) + else: + wx_image = wx.EmptyImage(*image.size) + new_image = image.convert('RGB') +- data = new_image.tostring() ++ data = new_image.tobytes() + wx_image.SetData(data) + return wx_image + +@@ -43,11 +43,11 @@ + def wxImage_pil(wx_image): + size = wx_image.GetSize() + image = Image.new('RGB', size) +- image.fromstring(wx_image.GetData()) ++ image.frombytes(wx_image.GetData()) + if wx_image.HasAlpha(): + alpha = Image.new('L', size) + wx_alpha = wx_image.GetAlphaData() +- alpha.fromstring(wx_alpha) ++ alpha.frombytes(wx_alpha) + image = image.convert('RGBA') + image.putalpha(alpha) + return image diff --git a/phatch.spec b/phatch.spec index 2e1cbba..05c54e5 100644 --- a/phatch.spec +++ b/phatch.spec @@ -3,7 +3,7 @@ Name: phatch Version: 0.2.7 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Photo batch processor Group: Applications/Multimedia License: GPLv3+ @@ -27,6 +27,7 @@ Patch2: pyexiv2_compat.patch Patch3: phatch-pillow.patch Patch4: phatch-gtk3-compatibility.patch Patch5: phatch-wxpy3.0-compat.patch +Patch6: phatch-0.2.7-fromstring-tostring-deprecated.patch %description Phatch is a simple to use cross-platform GUI Photo Batch Processor @@ -83,6 +84,7 @@ sed -i -e "s@help_path =.*@help_path=\'%{_docdir}/%{name}\'@" %{name}/pyWx/gui.p %patch3 -p1 -b .orig %patch4 -p0 -b .orig %patch5 -p1 -b .orig +%patch6 -p1 -b .orig %build @@ -188,6 +190,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Sun Aug 21 2016 Jaromír Cápík - 0.2.7-26 +- Fixing deprecated fromstring/tostring [patch from Nuno Dias] (#1297194) + * Tue Jul 19 2016 Fedora Release Engineering - 0.2.7-25 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages