b9c619abc1
There's no reason to assume that sys.path[0] is an appropriate location for generating code. Specifically that doesn't work with extend_sys_path which puts the additional directories at the end of sys.path. In order to create a new migrations module, instead of using an arbitrary entry from sys.path, import as much as possible from the path to the module, then create missing submodules from there. Without this change, the tests introduced in the following commit fail, which seems sufficient to prevent regressions for such a refactoring. |
||
---|---|---|
.. | ||
operations | ||
__init__.py | ||
autodetector.py | ||
executor.py | ||
graph.py | ||
loader.py | ||
migration.py | ||
optimizer.py | ||
questioner.py | ||
recorder.py | ||
state.py | ||
topological_sort.py | ||
writer.py |