Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b5752892
Commit
b5752892
authored
Jul 04, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12452: Plist and Dict are now deprecated
Replace PendingDeprecationWarning warnings by DeprecationWarning.
parent
99b95386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/plistlib.py
Lib/plistlib.py
+5
-5
No files found.
Lib/plistlib.py
View file @
b5752892
...
...
@@ -266,13 +266,13 @@ class _InternalDict(dict):
raise
AttributeError
(
attr
)
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
Pending
DeprecationWarning
,
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"
,
Pending
DeprecationWarning
,
2
)
"notation instead"
,
DeprecationWarning
,
2
)
self
[
attr
]
=
value
def
__delattr__
(
self
,
attr
):
...
...
@@ -282,14 +282,14 @@ class _InternalDict(dict):
raise
AttributeError
(
attr
)
from
warnings
import
warn
warn
(
"Attribute access from plist dicts is deprecated, use d[key] "
"notation instead"
,
Pending
DeprecationWarning
,
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"
,
Pending
DeprecationWarning
,
2
)
DeprecationWarning
,
2
)
super
().
__init__
(
**
kwargs
)
...
...
@@ -302,7 +302,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"
,
Pending
DeprecationWarning
,
2
)
"writePlist() functions instead"
,
DeprecationWarning
,
2
)
super
().
__init__
(
**
kwargs
)
def
fromFile
(
cls
,
pathOrFile
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment