mineo/python-musicbrainz-ngs — pull request #2 by JonnyJD (2012-03-28 13:37:59+00:00)
Title: use absolute imports, even intra-package

Starting with Python 3, imports are always absolute by default.
This means a package is searched in the library path
and in the current directory of the active script.

Intra-package imports can bo done in two ways:
from packagename import module (absolute)
from . import module	(relative)

With absolute imports you have to use the actual name of the package and
change the import when the name of the package changes.
The relative import is "name-agnostic".

However, there are also downsides with the relative approach:

Relative imports break outside of the package context.
```python -m pkg/module``` breaks with:
```ValueError: Attempted relative import in non-package```
in Python 2 and 3.
Making a quick syntax-check impossible and breaking
epydoc with:
```Bad dotted name```

Therefore we use absolute imports unless there is a specific
reason to use relative imports.

Please note that you can still use a library in the same folder (locally)
without installing it to a library path.