My fix removes the only occurrence of cmp() in magic.py, so we should drop the line importing past.builtins.cmp. Updated patch accordingly, also improved commit message. Attached patch v2, hoping bugtracker can handle attachments.