summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2014-01-15 10:32:35 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2014-01-15 10:32:35 (GMT)
commit6db6653bbc0841600248e4d7b7542591067c4157 (patch)
tree1c3c992658e8f361b903bfcd3956956fcf7abf5e /Mac/Tools
parent4a714d48ad727f6ad708ba2d3695f1dea4479fb6 (diff)
downloadcpython-6db6653bbc0841600248e4d7b7542591067c4157.zip
cpython-6db6653bbc0841600248e4d7b7542591067c4157.tar.gz
cpython-6db6653bbc0841600248e4d7b7542591067c4157.tar.bz2
Issue #14455: Fix some issues with plistlib
* Negative integer support in binary plists was broken * Better exception for invalid data * Fix the versionadded/versionchanged markup in the documentation * Add the interface cleanup to what's new for 3.4
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/plistlib_generate_testdata.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mac/Tools/plistlib_generate_testdata.py b/Mac/Tools/plistlib_generate_testdata.py
index da1d976..68d4d74 100644
--- a/Mac/Tools/plistlib_generate_testdata.py
+++ b/Mac/Tools/plistlib_generate_testdata.py
@@ -23,7 +23,13 @@ def nsstr(value):
def main():
pl = OrderedDict()
+ # Note: pl is an OrderedDict to control the order
+ # of keys, and hence have some control on the structure
+ # of the output file.
+ # New keys should be added in alphabetical order.
+
seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp()
+ pl[nsstr('aBigInt')] = 2 ** 63 - 44
pl[nsstr('aDate')] = NSDate.dateWithTimeIntervalSince1970_(seconds)
pl[nsstr('aDict')] = d = OrderedDict()
@@ -52,6 +58,8 @@ def main():
aa.append(2)
aa.append(3)
+ pl[nsstr('aNegativeBigInt')] = -80000000000
+ pl[nsstr('aNegativeInt')] = -5
pl[nsstr('aString')] = nsstr('Doodah')
pl[nsstr('anEmptyDict')] = NSMutableDictionary.alloc().init()