forked from pool/python-xhtml2pdf
Accepting request 1010934 from home:pgajdos:python
- version update to 0.2.6 * Drop python 2 support. * Remove most of python 2 code and cleanup * Update packages dependencies * Remove six dependency and update Readme * Set timeout in https options * Add new file manager approach using factory method, now new classes deal with different types of data * B64InlineURI, LocalProtocolURI, NetworkFileUri, LocalFileURI, BytesFileUri * Now getColor return None when None is passed ignoring default value, but return default if bool(data) == false * rtl languages reversed lines added as a ParaFrag (note: not fully supported yet) * Check if Paragraph has 'rtl' attribute (note: not fully supported yet) * Fix UnboundLocalError in reportlab_paragraph (#585) (#586) * Remove usage of getStringIO (#590) removed form reportlab * Change test for github workflow using only Linux * Add Python 3.9, 3.10 * Switch from PyPDF2 to PyPDF3 * Add SVG support * Update package information. * Allow call tests using make. - deleted patches - 590-rm-getStringIO.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/1010934 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xhtml2pdf?expand=0&rev=21
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
From 7627296bdbab4cbd81ca91d655a9605f6630664f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?An=C5=BEe=20Pe=C4=8Dar?= <anze@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()
|
|
@@ -1,3 +1,28 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 14 13:10:51 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 0.2.6
|
||||||
|
* Drop python 2 support.
|
||||||
|
* Remove most of python 2 code and cleanup
|
||||||
|
* Update packages dependencies
|
||||||
|
* Remove six dependency and update Readme
|
||||||
|
* Set timeout in https options
|
||||||
|
* Add new file manager approach using factory method, now new classes deal with different types of data
|
||||||
|
* B64InlineURI, LocalProtocolURI, NetworkFileUri, LocalFileURI, BytesFileUri
|
||||||
|
* Now getColor return None when None is passed ignoring default value, but return default if bool(data) == false
|
||||||
|
* rtl languages reversed lines added as a ParaFrag (note: not fully supported yet)
|
||||||
|
* Check if Paragraph has 'rtl' attribute (note: not fully supported yet)
|
||||||
|
* Fix UnboundLocalError in reportlab_paragraph (#585) (#586)
|
||||||
|
* Remove usage of getStringIO (#590) removed form reportlab
|
||||||
|
* Change test for github workflow using only Linux
|
||||||
|
* Add Python 3.9, 3.10
|
||||||
|
* Switch from PyPDF2 to PyPDF3
|
||||||
|
* Add SVG support
|
||||||
|
* Update package information.
|
||||||
|
* Allow call tests using make.
|
||||||
|
- deleted patches
|
||||||
|
- 590-rm-getStringIO.patch (upstreamed)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 9 13:23:48 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
Sat Apr 9 13:23:48 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@@ -18,40 +18,35 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-xhtml2pdf
|
Name: python-xhtml2pdf
|
||||||
Version: 0.2.5
|
Version: 0.2.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: PDF Generator Using HTML and CSS
|
Summary: PDF Generator Using HTML and CSS
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/xhtml2pdf/xhtml2pdf
|
URL: https://github.com/xhtml2pdf/xhtml2pdf
|
||||||
Source: https://github.com/xhtml2pdf/xhtml2pdf/archive/%{version}.tar.gz#/xhtml2pdf-%{version}.tar.gz
|
Source: https://github.com/xhtml2pdf/xhtml2pdf/archive/refs/tags/v%{version}.tar.gz#/xhtml2pdf-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM 590-rm-getStringIO.patch gh#xhtml2pdf/xhtml2pdf#589 mcepl@suse.com
|
|
||||||
# Remove usage of getStringIO
|
|
||||||
Patch0: 590-rm-getStringIO.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-Pillow >= 7.0.2
|
Requires: python-Pillow >= 7.0.2
|
||||||
Requires: python-PyPDF2 >= 1.26
|
Requires: python-PyPDF3 >= 1.0.5
|
||||||
Requires: python-arabic-reshaper >= 2.1.0
|
Requires: python-arabic-reshaper >= 2.1.0
|
||||||
Requires: python-html5lib >= 1.0
|
Requires: python-html5lib >= 1.0
|
||||||
Requires: python-python-bidi >= 0.4.2
|
Requires: python-python-bidi >= 0.4.2
|
||||||
Requires: python-reportlab >= 3.0
|
Requires: python-reportlab >= 3.0
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires: python-six
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
Conflicts: python-pisa
|
Conflicts: python-pisa
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module Pillow >= 7.0.2}
|
BuildRequires: %{python_module Pillow >= 7.0.2}
|
||||||
BuildRequires: %{python_module PyPDF2 >= 1.26}
|
BuildRequires: %{python_module PyPDF3 >= 1.0.5}
|
||||||
BuildRequires: %{python_module arabic-reshaper >= 2.1.0}
|
BuildRequires: %{python_module arabic-reshaper >= 2.1.0}
|
||||||
BuildRequires: %{python_module html5lib >= 1.0}
|
BuildRequires: %{python_module html5lib >= 1.0}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module python-bidi >= 0.4.2}
|
BuildRequires: %{python_module python-bidi >= 0.4.2}
|
||||||
BuildRequires: %{python_module reportlab >= 3.0}
|
BuildRequires: %{python_module reportlab >= 3.0}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6cb3ff827861bc53e88a5ff99fe6b166dabe2861a7bc51f0817009436a7dd4b8
|
|
||||||
size 4910736
|
|
3
xhtml2pdf-0.2.6.tar.gz
Normal file
3
xhtml2pdf-0.2.6.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ce0e2b711f5200f46caf2a67008700fb1de0a761f2ae92d30b21e158de05912e
|
||||||
|
size 6683074
|
Reference in New Issue
Block a user