This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients d9pouces, eric.araujo, jrjsmrtn, markgrandi, ned.deily, python-dev, r.david.murray, ronaldoussoren, serhiy.storchaka
Date 2013-12-19.09:48:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387446534.5.0.101610174612.issue14455@psf.upfronthosting.co.za>
In-reply-to
Content
I'm working on an update for your patch that addresses these comments:

* I don't like supporting 128 bit integers because Apple's public APIs
  don't support those values. That is, the value 'kCFNumberSInt128Type'
  is not in a public header for the OSX 10.9 SDK.

* The test_int method that you introduced tests conversions to and from XML,
  and doesn't test the problem with negative values in binary plists.

* I don't understand why test_int converts a value to a binary plist twice,
  that is the 'data2 = plistlib.dumps(pl2)' bit.

* I'm adding negative integers to the _create method as well, with the 
  corresponding changes to the binary TESTDATA dictionary.

* I don't understand your comment about the writePlistToBytes documentation,
  there was no versionchanged in the documentation.  The version changed 
  for dump was wrong, that should be versionadded (and the other new functions
  should have a versionadded as well)

* I agree that this change should be mentioned in What's New.

* I agree that _write_object should raise TypeError

BTW. What about out-of-range integer values? Those currently raise struct.error, I'd prefer to raise TypeError instead because the use of the
struct module should be an implementation detail.

And a final question: integers with '2 ** 63 <= value < 2 ** 64' (e.g. values that are in the range of uint64_t but not in the range of int64_t) can be written to a binary plist, but will be read back as a negative value (which is the same behavior as in Apple's code). Should we warn about this in the documentation?

I'll post an updated patch later today.
History
Date User Action Args
2013-12-19 09:48:54ronaldoussorensetrecipients: + ronaldoussoren, ned.deily, eric.araujo, r.david.murray, jrjsmrtn, python-dev, serhiy.storchaka, d9pouces, markgrandi
2013-12-19 09:48:54ronaldoussorensetmessageid: <1387446534.5.0.101610174612.issue14455@psf.upfronthosting.co.za>
2013-12-19 09:48:54ronaldoussorenlinkissue14455 messages
2013-12-19 09:48:53ronaldoussorencreate