cPickle is no more in Python 3
Claude Paroz <[email protected]> Fri, 4 Feb 2022 14:45:41 +0100
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
Another cleaning patch that removes conditional cPickle import which doesn't exist any longer in Python 3. Regards, Claude -- www.2xlibre.net
0001-cPickle-is-no-more-in-Python-3.patch
(text/x-patch, 1.7 KB)
From 0df098ede3fa4ed805830e9b00d3976c420cd85b Mon Sep 17 00:00:00 2001 From: Claude Paroz <[email protected]> Date: Fri, 7 Jan 2022 17:29:07 +0100 Subject: [PATCH] cPickle is no more in Python 3 --- src/reportlab/lib/fontfinder.py | 4 ++-- src/reportlab/lib/utils.py | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/reportlab/lib/fontfinder.py b/src/reportlab/lib/fontfinder.py index 51c5b04b..9bc1b566 100644 --- a/src/reportlab/lib/fontfinder.py +++ b/src/reportlab/lib/fontfinder.py @@ -58,8 +58,8 @@ of non-Python applications. Future plans might include using this to auto-register fonts; and making it update itself smartly on repeated instantiation. """ -import sys, os, tempfile -from reportlab.lib.utils import pickle, asNative as _asNative +import sys, os, pickle, tempfile +from reportlab.lib.utils import asNative as _asNative from xml.sax.saxutils import quoteattr from reportlab.lib.utils import asBytes try: diff --git a/src/reportlab/lib/utils.py b/src/reportlab/lib/utils.py index 96be9ca4..4277fecb 100644 --- a/src/reportlab/lib/utils.py +++ b/src/reportlab/lib/utils.py @@ -4,7 +4,7 @@ __version__='3.5.34' __doc__='''Gazillions of miscellaneous internal utility functions''' -import os, sys, time, types, datetime, ast, importlib +import os, pickle, sys, time, types, datetime, ast, importlib from functools import reduce as functools_reduce literal_eval = ast.literal_eval try: @@ -25,11 +25,6 @@ class __UNSET__(object): __repr__ = __str__ __UNSET__ = __UNSET__() -try: - import cPickle as pickle -except ImportError: - import pickle - try: from hashlib import md5 except ImportError: -- 2.30.2