Ronald Oussoren added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14455>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to