[Python-checkins] python/dist/src/Lib/plat-mac plistlib.py,1.8,1.9

jvr at users.sourceforge.net jvr at users.sourceforge.net
Mon Oct 25 18:09:13 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22077

Modified Files:
	plistlib.py 
Log Message:
Deprecate Plist class

Index: plistlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/plistlib.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- plistlib.py	25 Oct 2004 16:04:20 -0000	1.8
+++ plistlib.py	25 Oct 2004 16:09:10 -0000	1.9
@@ -281,8 +281,14 @@
     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 @@
     fromFile = classmethod(fromFile)
 
     def write(self, pathOrFile):
-        """Deprecated! Use the writePlist() function instead."""
+        """Deprecated. Use the writePlist() function instead."""
         writePlist(self, pathOrFile)
 
 



More information about the Python-checkins mailing list