[Python-checkins] cpython: Issue #12452: Plist and Dict are now deprecated

victor.stinner python-checkins at python.org
Mon Jul 4 14:28:50 CEST 2011


http://hg.python.org/cpython/rev/4f14050a963f
changeset:   71194:4f14050a963f
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Mon Jul 04 14:28:45 2011 +0200
summary:
  Issue #12452: Plist and Dict are now deprecated

Replace PendingDeprecationWarning warnings by DeprecationWarning.

files:
  Lib/plistlib.py |  10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Lib/plistlib.py b/Lib/plistlib.py
--- a/Lib/plistlib.py
+++ b/Lib/plistlib.py
@@ -266,13 +266,13 @@
             raise AttributeError(attr)
         from warnings import warn
         warn("Attribute access from plist dicts is deprecated, use d[key] "
-             "notation instead", PendingDeprecationWarning, 2)
+             "notation instead", DeprecationWarning, 2)
         return value
 
     def __setattr__(self, attr, value):
         from warnings import warn
         warn("Attribute access from plist dicts is deprecated, use d[key] "
-             "notation instead", PendingDeprecationWarning, 2)
+             "notation instead", DeprecationWarning, 2)
         self[attr] = value
 
     def __delattr__(self, attr):
@@ -282,14 +282,14 @@
             raise AttributeError(attr)
         from warnings import warn
         warn("Attribute access from plist dicts is deprecated, use d[key] "
-             "notation instead", PendingDeprecationWarning, 2)
+             "notation instead", DeprecationWarning, 2)
 
 class Dict(_InternalDict):
 
     def __init__(self, **kwargs):
         from warnings import warn
         warn("The plistlib.Dict class is deprecated, use builtin dict instead",
-             PendingDeprecationWarning, 2)
+             DeprecationWarning, 2)
         super().__init__(**kwargs)
 
 
@@ -302,7 +302,7 @@
     def __init__(self, **kwargs):
         from warnings import warn
         warn("The Plist class is deprecated, use the readPlist() and "
-             "writePlist() functions instead", PendingDeprecationWarning, 2)
+             "writePlist() functions instead", DeprecationWarning, 2)
         super().__init__(**kwargs)
 
     def fromFile(cls, pathOrFile):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list