Supply use_2to3=True to the setup function so that the source will automatically be translated to valid Python 3.x code. All but the oldest versions of distribute will understand this command, while setuptools prints a warning but ignores the unrecognised option.
Fix incompatibilities that are not addressed by the 2to3 tool: - string literals that were not explicitly bytestring literals - use of chr, which returns unicode in Python 3; use literal instead - imports from the exceptions module which was removed in Python 3 - str instance checks; check isinstance(bytes, ...) instead - use of deprecated assertEquals in tests; rename to assertEqual
Changed all occurences of XREP to ROUTER and all XREQ to DEALER. Removed some imports.