Python 2 allowed import foo to mean either “import absolute module foo from the system path” or “import foo from the parent package of the current module.” Python 3 allows only the former meaning, with from . import foo or from .foo import bar being used for relative imports. Python 2 also supports these Python-3-compatible syntaxes.
In some cases, relative imports written as import foo are compatible with circular imports, while from . import foo does not work with circular imports. Therefore, convert some relative imports from relative to absolute.
This patch depends on 18 and 19. Import those first.