From 936dfae2e22b5b58d01416ddf47218c20bfde5e6 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Mon, 13 Jan 2014 11:34:19 -0800 Subject: Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver(). --- Lib/platform.py | 3 ++- Misc/NEWS | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/platform.py b/Lib/platform.py index 48b81ac..11b501e 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index d6232d3..50765c9 100644 --- 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 ---- -- cgit v0.12