mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-04-30 16:57:29 -07:00
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
diff --git a/pdfrw/pdfreader.py b/pdfrw/pdfreader.py
|
|
index 2c9c3a2..feb025b 100644
|
|
--- a/pdfrw/pdfreader.py
|
|
+++ b/pdfrw/pdfreader.py
|
|
@@ -12,9 +12,10 @@ of the object.
|
|
'''
|
|
import gc
|
|
import binascii
|
|
-import collections
|
|
import itertools
|
|
|
|
+from collections import defaultdict
|
|
+
|
|
from .errors import PdfParseError, log
|
|
from .tokens import PdfTokens
|
|
from .objects import PdfDict, PdfArray, PdfName, PdfObject, PdfIndirect
|
|
@@ -340,7 +341,7 @@ class PdfReader(PdfDict):
|
|
|
|
def parse_xref_stream(self, source, int=int, range=range,
|
|
enumerate=enumerate, islice=itertools.islice,
|
|
- defaultdict=collections.defaultdict,
|
|
+ defaultdict=defaultdict,
|
|
hexlify=binascii.hexlify):
|
|
''' Parse (one of) the cross-reference file section(s)
|
|
'''
|
|
diff --git a/tests/expected.py b/tests/expected.py
|
|
index d153fc3..62c29aa 100644
|
|
--- a/tests/expected.py
|
|
+++ b/tests/expected.py
|
|
@@ -12,8 +12,8 @@
|
|
'''
|
|
|
|
import os
|
|
-import collections
|
|
from pdfrw.py23_diffs import convert_load
|
|
+from collections import defaultdict
|
|
|
|
root_dir = os.path.dirname(__file__)
|
|
result_dir = 'tmp_results'
|
|
@@ -28,7 +28,7 @@ for sourcef in ('mytests.txt', 'expected.txt'):
|
|
|
|
|
|
def results():
|
|
- results = collections.defaultdict(set)
|
|
+ results = defaultdict(set)
|
|
with open(expectedf, 'rb') as f:
|
|
for line in f:
|
|
line = convert_load(line)
|