summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2004-10-25 16:09:10 (GMT)
committerJust van Rossum <just@letterror.com>2004-10-25 16:09:10 (GMT)
commit86ca902eedd04ee9a5deff18aca3ae1f9017ffee (patch)
tree611cd8e7ef24d931566497a15a705b90f6844154 /Lib/plat-mac
parent10e52dbe28ffee90a6c0ff42a84f367ddc635789 (diff)
downloadcpython-86ca902eedd04ee9a5deff18aca3ae1f9017ffee.zip
cpython-86ca902eedd04ee9a5deff18aca3ae1f9017ffee.tar.gz
cpython-86ca902eedd04ee9a5deff18aca3ae1f9017ffee.tar.bz2
Deprecate Plist class
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/plistlib.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/plat-mac/plistlib.py b/Lib/plat-mac/plistlib.py
index 5d6044e..061a55e 100644
--- a/Lib/plat-mac/plistlib.py
+++ b/Lib/plat-mac/plistlib.py
@@ -281,8 +281,14 @@ class Plist(Dict):
writePlist() functions instead.
"""
+ def __init__(self, **kwargs):
+ from warnings import warn
+ warn("The Plist class is deprecated, use the readPlist() and "
+ "writePlist() functions instead", PendingDeprecationWarning)
+ super(Plist, self).__init__(**kwargs)
+
def fromFile(cls, pathOrFile):
- """Deprecated! Use the readPlist() function instead."""
+ """Deprecated. Use the readPlist() function instead."""
rootObject = readPlist(pathOrFile)
plist = cls()
plist.update(rootObject)
@@ -290,7 +296,7 @@ class Plist(Dict):
fromFile = classmethod(fromFile)
def write(self, pathOrFile):
- """Deprecated! Use the writePlist() function instead."""
+ """Deprecated. Use the writePlist() function instead."""
writePlist(self, pathOrFile)