]> granicus.if.org Git - python/commitdiff
Backport r59688.
authorGeorg Brandl <georg@python.org>
Sat, 19 Jan 2008 20:34:19 +0000 (20:34 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 19 Jan 2008 20:34:19 +0000 (20:34 +0000)
Lib/plat-mac/plistlib.py
Misc/NEWS

index 49bd5563c9406c2c132924611d4b753d860d60fa..e61c4a4471de0824cde79716e50531e99d104c56 100644 (file)
@@ -240,8 +240,8 @@ class PlistWriter(DumbXMLWriter):
                 self.simpleElement("true")
             else:
                 self.simpleElement("false")
-        elif isinstance(value, int):
-            self.simpleElement("integer", str(value))
+        elif isinstance(value, (int, long)):
+            self.simpleElement("integer", "%d" % value)
         elif isinstance(value, float):
             self.simpleElement("real", repr(value))
         elif isinstance(value, dict):
index f4b98deb67909154548aac2432c3ba9c08c63ba5..08181e60472eb453dcdfd51d3e745e9ee8a0fa96 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -53,6 +53,8 @@ Core and builtins
 Library
 -------
 
+- Bug #1687: Fixed plistlib.py restricts <integer> to Python int when writing.
+
 - Issue #1182: many arithmetic bugs in the decimal module have been
   fixed, and the decimal module has been updated to comply with the
   latest IBM Decimal Arithmetic specification (version 1.66) and