Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-xhtml2pdf for openSUSE:Factory checked in at 2022-04-10 00:42:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-xhtml2pdf (Old) and /work/SRC/openSUSE:Factory/.python-xhtml2pdf.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xhtml2pdf" Sun Apr 10 00:42:12 2022 rev:6 rq:968017 version:0.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-xhtml2pdf/python-xhtml2pdf.changes 2021-03-30 21:01:30.452790924 +0200 +++ /work/SRC/openSUSE:Factory/.python-xhtml2pdf.new.1900/python-xhtml2pdf.changes 2022-04-10 00:42:18.176847852 +0200 @@ -1,0 +2,6 @@ +Sat Apr 9 13:23:48 UTC 2022 - Matej Cepl <mc...@suse.com> + +- Add 590-rm-getStringIO.patch, use standard StringIO + (gh#xhtml2pdf/xhtml2pdf#589). + +------------------------------------------------------------------- New: ---- 590-rm-getStringIO.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-xhtml2pdf.spec ++++++ --- /var/tmp/diff_new_pack.xwknYJ/_old 2022-04-10 00:42:18.876840068 +0200 +++ /var/tmp/diff_new_pack.xwknYJ/_new 2022-04-10 00:42:18.884839979 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-xhtml2pdf # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,17 +25,10 @@ Group: Development/Languages/Python URL: https://github.com/xhtml2pdf/xhtml2pdf Source: https://github.com/xhtml2pdf/xhtml2pdf/archive/%{version}.tar.gz#/xhtml2pdf-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 590-rm-getStringIO.patch gh#xhtml2pdf/xhtml2pdf#589 mc...@suse.com +# Remove usage of getStringIO +Patch0: 590-rm-getStringIO.patch BuildRequires: %{python_module setuptools} -# SECTION test requirements -BuildRequires: %{python_module Pillow >= 7.0.2} -BuildRequires: %{python_module PyPDF2 >= 1.26} -BuildRequires: %{python_module arabic-reshaper >= 2.1.0} -BuildRequires: %{python_module html5lib >= 1.0} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module python-bidi >= 0.4.2} -BuildRequires: %{python_module reportlab >= 3.0} -BuildRequires: %{python_module six} -# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Pillow >= 7.0.2 @@ -47,9 +40,19 @@ Requires: python-setuptools Requires: python-six Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives Conflicts: python-pisa BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Pillow >= 7.0.2} +BuildRequires: %{python_module PyPDF2 >= 1.26} +BuildRequires: %{python_module arabic-reshaper >= 2.1.0} +BuildRequires: %{python_module html5lib >= 1.0} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-bidi >= 0.4.2} +BuildRequires: %{python_module reportlab >= 3.0} +BuildRequires: %{python_module six} +# /SECTION %python_subpackages %description @@ -62,6 +65,8 @@ %prep %setup -q -n xhtml2pdf-%{version} +%autopatch -p1 + sed -i '1{/^#!/d}' xhtml2pdf/paragraph.py xhtml2pdf/w3c/*.py %build ++++++ 590-rm-getStringIO.patch ++++++ >From 7627296bdbab4cbd81ca91d655a9605f6630664f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C5=BEe=20Pe=C4=8Dar?= <a...@pecar.me> Date: Fri, 18 Feb 2022 15:44:13 +0000 Subject: [PATCH] Remove usage of getStringIO reportlab 3.6.7 removed getStringIO and getByteIO: https://github.com/MrBitBucket/reportlab-mirror/commit/684d21e2da8f835ca3670e78cc9a011ba71a7e9a This should resolve: Cannot import name 'getStringIO' from 'reportlab.lib.utils' #589 --- xhtml2pdf/xhtml2pdf_reportlab.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/xhtml2pdf/xhtml2pdf_reportlab.py +++ b/xhtml2pdf/xhtml2pdf_reportlab.py @@ -17,7 +17,7 @@ from hashlib import md5 from reportlab.lib.enums import TA_RIGHT from reportlab.lib.styles import ParagraphStyle -from reportlab.lib.utils import flatten, open_for_read, getStringIO, \ +from reportlab.lib.utils import flatten, open_for_read, \ LazyImageReader, haveImages from reportlab.platypus.doctemplate import BaseDocTemplate, PageTemplate, IndexingFlowable from reportlab.platypus.flowables import Flowable, CondPageBreak, \ @@ -338,7 +338,7 @@ class PmlImageReader(object): # TODO We register_reset(self._cache.clear) data = self._cache.setdefault(md5(data).digest(), data) - self.fp = getStringIO(data) + self.fp = six.StringIO(data) elif imageReaderFlags == - 1 and isinstance(fileName, six.text_type): #try Ralf Schmitt's re-opening technique of avoiding too many open files self.fp.close()