File: API-NOTES

package info (click to toggle)
mutagen 1.8-1.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,276 kB
  • ctags: 1,878
  • sloc: python: 7,762; makefile: 4
file content (47 lines) | stat: -rw-r--r-- 1,621 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
This file documents deprecated parts of the Mutagen API. New code
should not use these parts, and several months after being added here,
they may be removed. Note that we do not intend to ever deprecate or
remove large portions of the API. All of these are corner cases that
arose from when Mutagen was still part of Quod Libet, and should never
be encountered in normal use.

General:
--------
FileType constructors require a filename. However, the 'delete' and
'save' methods should not be called with one.

No modules, types, functions, or attributes beginning with '_' are
considered public API. These can and do change drastically between
Mutagen versions. This is the standard Python way of marking a
function protected or private.

FLAC:
-----
The 'vc' attribute predates the FileType API and has been deprecated
since Mutagen 0.9; this also applies to the 'add_vc' method. The
standard 'tags' attribute and 'add_tags' method should be used
instead.

ID3:
----
None of the Spec objects are considered part of the public API.

APEv2:
------
Python 2.5 forced an API change in the APEv2 reading code. Some things
which were case-insensitive are now case-sensitive. For example,
given:

    tag = APEv2()
    tag["Foo"] = "Bar"
    print "foo" in tag.keys()

Mutagen 1.7.1 and earlier would print "True", as the keys were a str
subclass that compared case-insensitively. However, Mutagen 1.8 and
above print "False", as the keys are normal strings.

    print "foo" in tag

Still prints "True", however, as __getitem__, __delitem__, and
__setitem__ (and so any operations on the dict itself) remain
case-insensitive.