mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Deprecate Plist class
This commit is contained in:
parent
10e52dbe28
commit
86ca902eed
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue