summaryrefslogtreecommitdiff
path: root/Lib/plistlib.py
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2009-05-08 03:57:12 +0000
committerPhilip Jenvey <pjenvey@underboss.org>2009-05-08 03:57:12 +0000
commita394f2dca300c17c1d70b7d6d005af457550cc8e (patch)
treec3d435abd5bddaad590e105556cafa7c6fec4ecb /Lib/plistlib.py
parente7d149ecf0ef00902dbb603cafdf20af346a7090 (diff)
downloadcpython-git-a394f2dca300c17c1d70b7d6d005af457550cc8e.tar.gz
#4351: more appropriate DeprecationWarning stacklevels
Diffstat (limited to 'Lib/plistlib.py')
-rw-r--r--Lib/plistlib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
index 0cd32ad95b..2084b5f505 100644
--- a/Lib/plistlib.py
+++ b/Lib/plistlib.py
@@ -263,13 +263,13 @@ class _InternalDict(dict):
raise AttributeError(attr)
from warnings import warn
warn("Attribute access from plist dicts is deprecated, use d[key] "
- "notation instead", PendingDeprecationWarning)
+ "notation instead", PendingDeprecationWarning, 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)
+ "notation instead", PendingDeprecationWarning, 2)
self[attr] = value
def __delattr__(self, attr):
@@ -279,14 +279,14 @@ class _InternalDict(dict):
raise AttributeError(attr)
from warnings import warn
warn("Attribute access from plist dicts is deprecated, use d[key] "
- "notation instead", PendingDeprecationWarning)
+ "notation instead", PendingDeprecationWarning, 2)
class Dict(_InternalDict):
def __init__(self, **kwargs):
from warnings import warn
warn("The plistlib.Dict class is deprecated, use builtin dict instead",
- PendingDeprecationWarning)
+ PendingDeprecationWarning, 2)
super().__init__(**kwargs)
@@ -299,7 +299,7 @@ class Plist(_InternalDict):
def __init__(self, **kwargs):
from warnings import warn
warn("The Plist class is deprecated, use the readPlist() and "
- "writePlist() functions instead", PendingDeprecationWarning)
+ "writePlist() functions instead", PendingDeprecationWarning, 2)
super().__init__(**kwargs)
def fromFile(cls, pathOrFile):