@@ -30,7 +30,7 @@ To work with plist data in bytes objects, use :func:`dumps`
30
30
and :func: `loads `.
31
31
32
32
Values can be strings, integers, floats, booleans, tuples, lists, dictionaries
33
- (but only with string keys), :class: `Data `, :class: ` bytes `, :class: `bytesarray `
33
+ (but only with string keys), :class: `bytes `, :class: `bytearray `
34
34
or :class: `datetime.datetime ` objects.
35
35
36
36
.. versionchanged :: 3.4
@@ -40,6 +40,9 @@ or :class:`datetime.datetime` objects.
40
40
Support added for reading and writing :class: `UID ` tokens in binary plists as used
41
41
by NSKeyedArchiver and NSKeyedUnarchiver.
42
42
43
+ .. versionchanged :: 3.9
44
+ Old API removed.
45
+
43
46
.. seealso ::
44
47
45
48
`PList manual page <https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PropertyLists/ >`_
@@ -48,7 +51,7 @@ or :class:`datetime.datetime` objects.
48
51
49
52
This module defines the following functions:
50
53
51
- .. function :: load(fp, \*, fmt=None, use_builtin_types=True, dict_type=dict)
54
+ .. function :: load(fp, \*, fmt=None, dict_type=dict)
52
55
53
56
Read a plist file. *fp * should be a readable and binary file object.
54
57
Return the unpacked root object (which usually is a
@@ -62,10 +65,6 @@ This module defines the following functions:
62
65
63
66
* :data: `FMT_BINARY `: Binary plist format
64
67
65
- If *use_builtin_types * is true (the default) binary data will be returned
66
- as instances of :class: `bytes `, otherwise it is returned as instances of
67
- :class: `Data `.
68
-
69
68
The *dict_type * is the type used for dictionaries that are read from the
70
69
plist file.
71
70
@@ -80,7 +79,7 @@ This module defines the following functions:
80
79
.. versionadded :: 3.4
81
80
82
81
83
- .. function :: loads(data, \*, fmt=None, use_builtin_types=True, dict_type=dict)
82
+ .. function :: loads(data, \*, fmt=None, dict_type=dict)
84
83
85
84
Load a plist from a bytes object. See :func: `load ` for an explanation of
86
85
the keyword arguments.
@@ -124,75 +123,6 @@ This module defines the following functions:
124
123
125
124
.. versionadded :: 3.4
126
125
127
- The following functions are deprecated:
128
-
129
- .. function :: readPlist(pathOrFile)
130
-
131
- Read a plist file. *pathOrFile * may be either a file name or a (readable
132
- and binary) file object. Returns the unpacked root object (which usually
133
- is a dictionary).
134
-
135
- This function calls :func: `load ` to do the actual work, see the documentation
136
- of :func: `that function <load> ` for an explanation of the keyword arguments.
137
-
138
- .. deprecated :: 3.4 Use :func:`load` instead.
139
-
140
- .. versionchanged :: 3.7
141
- Dict values in the result are now normal dicts. You no longer can use
142
- attribute access to access items of these dictionaries.
143
-
144
-
145
- .. function :: writePlist(rootObject, pathOrFile)
146
-
147
- Write *rootObject * to an XML plist file. *pathOrFile * may be either a file name
148
- or a (writable and binary) file object
149
-
150
- .. deprecated :: 3.4 Use :func:`dump` instead.
151
-
152
-
153
- .. function :: readPlistFromBytes(data)
154
-
155
- Read a plist data from a bytes object. Return the root object.
156
-
157
- See :func: `load ` for a description of the keyword arguments.
158
-
159
- .. deprecated :: 3.4 Use :func:`loads` instead.
160
-
161
- .. versionchanged :: 3.7
162
- Dict values in the result are now normal dicts. You no longer can use
163
- attribute access to access items of these dictionaries.
164
-
165
-
166
- .. function :: writePlistToBytes(rootObject)
167
-
168
- Return *rootObject * as an XML plist-formatted bytes object.
169
-
170
- .. deprecated :: 3.4 Use :func:`dumps` instead.
171
-
172
-
173
- The following classes are available:
174
-
175
- .. class :: Data(data)
176
-
177
- Return a "data" wrapper object around the bytes object *data *. This is used
178
- in functions converting from/to plists to represent the ``<data> `` type
179
- available in plists.
180
-
181
- It has one attribute, :attr: `data `, that can be used to retrieve the Python
182
- bytes object stored in it.
183
-
184
- .. deprecated :: 3.4 Use a :class:`bytes` object instead.
185
-
186
- .. class :: UID(data)
187
-
188
- Wraps an :class: `int `. This is used when reading or writing NSKeyedArchiver
189
- encoded data, which contains UID (see PList manual).
190
-
191
- It has one attribute, :attr: `data ` which can be used to retrieve the int value
192
- of the UID. :attr: `data ` must be in the range `0 <= data <= 2**64 `.
193
-
194
- .. versionadded :: 3.8
195
-
196
126
197
127
The following constants are available:
198
128
0 commit comments