Changes by Ronald Oussoren ronaldousso...@mac.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
Roundup Robot added the comment:
New changeset a389700fbc74 by Ronald Oussoren in branch '2.7':
Ensure that plistlib doesn't corrupt deeply nested datastructures
http://hg.python.org/cpython/rev/a389700fbc74
New changeset 6a8cb4875ac6 by Ronald Oussoren in branch '3.3':
Ensure that plistlib
Ronald Oussoren added the comment:
The tests look good, thanks for writing them.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
___
Mike Milkin added the comment:
Adding tests.
--
Added file: http://bugs.python.org/file29894/issue-17357-tests.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
Ronald Oussoren added the comment:
I agree that plistlib shouldn't raise an exception for data that can
represented as a valid plist file.
I've checked that the Cocoa class for generating plist files will happily
create a plist file when the data is nested 100 levels deep. In that case
Ronald Oussoren added the comment:
The attach patch should fix the issue (but there needs to be a unittest as
well).
--
Added file: http://bugs.python.org/file29863/issue-17353.txt
___
Python tracker rep...@bugs.python.org
Mike Milkin added the comment:
Looks like plistlib.writePlistToString is no loger in the plistlib.
--
nosy: +mmilkin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
Ezio Melotti added the comment:
On 3.x it's called writePlistToBytes, and it seems to have the same issue.
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
Mike Milkin added the comment:
Yep you are correct.
plistlib.readPlistFromBytes(plistlib.writePlistToBytes({'test':
plistlib.Data(b'aa')}))
{'test': Data(b'aa')}
plistlib.readPlistFromBytes(plistlib.writePlistToBytes([{'test':
Ezio Melotti added the comment:
If possible it would be better to still generate a valid output, possibly by
limiting the indentation or removing it after a certain point.
However I don't know if there are any restrictions that should be followed
while generating a plist (What happens if the
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
keywords: +easy
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
___
Serhiy Storchaka added the comment:
We should limit the indentation to be less than the maximal line length.
--
assignee: - ronaldoussoren
components: +Macintosh
nosy: +ronaldoussoren, serhiy.storchaka
stage: - needs patch
type: - behavior
versions: +Python 3.2, Python 3.3 -Python
New submission from Jacques Fortier:
To reproduce:
import plistlib
print plistlib.writePlistToString([{'test':
plistlib.Data('aa')}])
Compare to:
print plistlib.writePlistToString({'test': Data('aa')})
It looks like the max line length calculation in
Jacques Fortier added the comment:
My second print should have been:
print plistlib.writePlistToString({'test':
plistlib.Data('aa')})
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
Jacques Fortier added the comment:
Quick source inspection suggests this is present in the latest version.
--
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
15 matches
Mail list logo