This introduces Python 3 compatibility for Django Evolution. Most of the
work needed for compatibility has been introduced in prior commits, and
this change handles the remaining syntactical and string differences.
One of the highlights is that the default Pickle protocol changed
(twice) in Python 3. We now force usage of protocol 0, which is an
ASCII-based payload format and the default in Python 2.
There's also a difference in default string types used for Django field
names. Unless otherwise explicitly set, field names (used for indexes
and other parts of the schema definitions) are based on the attribute
name in the model, which on Python 2 is a byte string and on Python 3 is
a unicode string. To get the right string type on each Python version,
we convert the names to the native string type using
str(). We don't
want or need to actually encode or decode --
str() is the most
compatible way here.
The rest of the changes mostly have to do with exception handling, print
statements, and removing/adding prefixes on certain string types.
There's still work that's needed on getting all the management commands
fully tested. That will be part of upcoming changes.