8000 gh-111803: Support loading more deeply nested lists in binary plist f… · python/cpython@77b45fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 77b45fa

Browse files
gh-111803: Support loading more deeply nested lists in binary plist format (GH-114024)
It no longer uses the C stack. The depth of nesting is only limited by Python recursion limit setting.
1 parent dd56b57 commit 77b45fa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/plistlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ def _read_object(self, ref):
600600
obj_refs = self._read_refs(s)
601601
result = []
602602
self._objects[ref] = result
603-
result.extend(self._read_object(x) for x in obj_refs)
603+
for x in obj_refs:
604+
result.append(self._read_object(x))
604605

605606
# tokenH == 0xB0 is documented as 'ordset', but is not actually
606607
# implemented in the Apple reference code.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:mod:`plistlib` now supports loading more deeply nested lists in binary
2+
format.

0 commit comments

Comments
 (0)
0