summaryrefslogtreecommitdiff
path: root/Mac/Tools
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2014-01-15 11:32:35 +0100
committerRonald Oussoren <ronaldoussoren@mac.com>2014-01-15 11:32:35 +0100
commite11fb173eacf734b806fa9158382773689a83f62 (patch)
treee058f550817067b8487b278b30cba2b810246d35 /Mac/Tools
parent79caa76e88d3e57051a1e99142efe1fd574c4f98 (diff)
downloadcpython-e11fb173eacf734b806fa9158382773689a83f62.tar.gz
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 da1d97645d..68d4d740a9 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()