diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2009-05-08 03:57:12 (GMT) |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2009-05-08 03:57:12 (GMT) |
commit | a394f2dca300c17c1d70b7d6d005af457550cc8e (patch) | |
tree | c3d435abd5bddaad590e105556cafa7c6fec4ecb /Lib/plistlib.py | |
parent | e7d149ecf0ef00902dbb603cafdf20af346a7090 (diff) | |
download | cpython-a394f2dca300c17c1d70b7d6d005af457550cc8e.zip cpython-a394f2dca300c17c1d70b7d6d005af457550cc8e.tar.gz cpython-a394f2dca300c17c1d70b7d6d005af457550cc8e.tar.bz2 |
#4351: more appropriate DeprecationWarning stacklevels
Diffstat (limited to 'Lib/plistlib.py')
-rw-r--r-- | Lib/plistlib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/plistlib.py b/Lib/plistlib.py index 0cd32ad..2084b5f 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): |