From 6ab605c194b4a06e12f71eb1249411447befed4f Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Thu, 13 Jan 2022 17:11:07 +0800 Subject: [PATCH] fix error (cherry picked from commit 0477a9ba95b5c6684fb88f7f65733786ae4ae3b0) --- fix_cannot_import_error.patch | 12 ++++++++++++ python-reportlab.spec | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 fix_cannot_import_error.patch diff --git a/fix_cannot_import_error.patch b/fix_cannot_import_error.patch new file mode 100644 index 0000000..6272d17 --- /dev/null +++ b/fix_cannot_import_error.patch @@ -0,0 +1,12 @@ +diff -Nur reportlab-3.4.0/src/reportlab/lib/utils.py ../reportlab-3.4.0/src/reportlab/lib/utils.py +--- reportlab-3.4.0/src/reportlab/lib/utils.py 2017-03-07 18:17:00.000000000 +0800 ++++ reportlab-3.4.0/src/reportlab/lib/utils.py 2022-01-12 16:37:55.914924400 +0800 +@@ -5,7 +5,7 @@ + __doc__='''Gazillions of miscellaneous internal utility functions''' + + import os, sys, imp, time, types +-from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring ++from base64 import decodebytes as base64_decodestring, encodebytes as base64_encodestring + from reportlab import isPy3 + from reportlab.lib.logger import warnOnce + from reportlab.lib.rltempfile import get_rl_tempfile, get_rl_tempdir, _rl_getuid diff --git a/python-reportlab.spec b/python-reportlab.spec index 692717f..4e98cff 100644 --- a/python-reportlab.spec +++ b/python-reportlab.spec @@ -2,13 +2,14 @@ Name: python-reportlab Version: 3.4.0 -Release: 13 +Release: 14 Summary: ReportLab library to create PDF documents and graphic License: BSD URL: https://www.reportlab.com/ Source0: https://pypi.python.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz Patch0001: 0fbf25e4857423f6a38ca7f5aeee1c84acaa3fc1.patch Patch0002: CVE-2019-17626.patch +Patch0003: fix_cannot_import_error.patch %description The ReportLab Toolkit. An Open Source Python library for generating PDFs and graphics. @@ -60,6 +61,9 @@ PYTHONPATH="`pwd`/`ls -d build/lib*`" %{__python3} docs/genAll.py %doc demos/ tools/ %changelog +* Wed Jan 12 2022 Chengshaowei - 3.4.0-14 +- Fix can not import error + * Wed Jul 21 2021 yaoxin - 3.4.0-13 - Fix CVE-2019-17626 -- Gitee