https://github.com/python/cpython/commit/77b45fa6d0b8c0c14657b5117b21a3f3f2ce97d8
commit: 77b45fa6d0b8c0c14657b5117b21a3f3f2ce97d8
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-01-13T15:26:55+02:00
summary:
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.
files:
A Misc/NEWS.d/next/Library/2024-01-13-14-20-31.gh-issue-111803.llpLAw.rst
M Lib/plistlib.py
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
index 188a0b399b587b..67e832db217319 100644
--- a/Lib/plistlib.py
+++ b/Lib/plistlib.py
@@ -600,7 +600,8 @@ def _read_object(self, ref):
obj_refs = self._read_refs(s)
result = []
self._objects[ref] = result
- result.extend(self._read_object(x) for x in obj_refs)
+ for x in obj_refs:
+ result.append(self._read_object(x))
# tokenH == 0xB0 is documented as 'ordset', but is not actually
# implemented in the Apple reference code.
diff --git
a/Misc/NEWS.d/next/Library/2024-01-13-14-20-31.gh-issue-111803.llpLAw.rst
b/Misc/NEWS.d/next/Library/2024-01-13-14-20-31.gh-issue-111803.llpLAw.rst
new file mode 100644
index 00000000000000..546a892b55ccd7
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-01-13-14-20-31.gh-issue-111803.llpLAw.rst
@@ -0,0 +1,2 @@
+:mod:`plistlib` now supports loading more deeply nested lists in binary
+format.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]