Basically ran all .py files through 2to3. I made a copy of wmlparser2.py
called wmlparser3.py for the Python3 version, so as to not inconvenience anyone
who may be using it in their old Python2 scripts.
The old icon (misc/icon-amla-default.png) remains for compatibility purposes,
but I added a wmllint rule to update the path.
The new image was created with https://openclipart.org/detail/29043/heart, which is
released under the public domain (CC-0).
The error was caused by the fact that opening a file with codecs.open() is much stricter than using open(mode=rb), and throws a UnicodeDecodeError if a file can't be read as UTF-8 - which is the case for binary files.
Backticks as shortcut for repr() are removed from Python 3. Although all their usages were already commented out, I fixed it anyway in case the code is uncommented.
The undersized() function is supposed to warn if an image has a size below 60 x 60 pixels. I didn't manage to find any documentation about why it was commented out.
I also replaced the error message printed if the PIL library is missing with one more verbose and updated.
Most usages of the .keys() method were already safe, because they were either iterated only once, or they were wrapped in a call to sorted(), which casts them as lists
In most cases, calls to the .keys() method were unnecessary, because they were used to test if a dictionary has a key; this can be done by simply using the 'in' operator on the dictionary itself.
This bug prevented local spelling words from being added to the spellchecking dictionary, and it was caused by the fact that the map iterator was never iterated.
Replaced with an explicit for cycle.
This fixes the breakage caused by the Python 3 zip() function, which like all generators may be iterated only once; also, it finally returns a meaningful output, instead of the obscure list of filenames which was formerly returned
The main difference is that these functions return generators instead of lists. This actually breaks wmlscope's collision detection, which will be fixed in my next commit.