[Python-checkins] cpython: Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
ned.deily
python-checkins at python.org
Mon Jan 13 20:35:00 CET 2014
http://hg.python.org/cpython/rev/cd728dc893c9
changeset: 88446:cd728dc893c9
parent: 88444:60163fc72017
user: Ned Deily <nad at acm.org>
date: Mon Jan 13 11:34:19 2014 -0800
summary:
Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
files:
Lib/platform.py | 3 ++-
Misc/NEWS | 2 ++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -649,7 +649,8 @@
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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -65,6 +65,8 @@
- Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
+- Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver().
+
IDLE
----
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list