]> granicus.if.org Git - python/commitdiff
Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
authorNed Deily <nad@acm.org>
Mon, 13 Jan 2014 19:34:19 +0000 (11:34 -0800)
committerNed Deily <nad@acm.org>
Mon, 13 Jan 2014 19:34:19 +0000 (11:34 -0800)
Lib/platform.py
Misc/NEWS

index 48b81ac7e50a3045d9856227ee27311810824b5c..11b501e7d732e61f0b2060eae692291d2ca4c91e 100755 (executable)
@@ -649,7 +649,8 @@ def _mac_ver_xml():
     except ImportError:
         return None
 
-    pl = plistlib.readPlist(fn)
+    with open(fn, 'rb') as f:
+        pl = plistlib.load(f)
     release = pl['ProductVersion']
     versioninfo = ('', '', '')
     machine = os.uname().machine
index d6232d3d741e3623d8fd97169e239bbfc9be5468..50765c95b6c51519800639cc7f9bba403080dcae 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -65,6 +65,8 @@ Library
 
 - Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
 
+- Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
+
 IDLE
 ----