title: Flask Bug on Python 3.4? Development server can't run if app contains relative imports
body: <p>By design, Python 3 <a href="https://stackoverflow.com/questions/16981921/relative-imports-in-python-3">cannot run</a> a module that contains relative imports as a script. Attempting to do so yields the following error:</p>
  
  <pre><code>$ python mypackage/run.py
  [...traceback...]
  SystemError: Parent module '' not loaded, cannot perform relative import
  </code></pre>
  
  <p>The solution is to invoke the module with <code>python -m mypackage.run</code> instead of the more familiar <code>python mypackage/run.py</code>.</p>
  
  <p>In Flask, the latter is how one normally runs the development server. However, the Flask development server immediately spawns a child process that reloads the code (and subsequently reloads code when files are changed on disk).</p>
  
  <p>The result is this:</p>
  
  <pre><code>$ python -m mypackage.run
   * Running on http://127.0.0.1:5000/
   * Restarting with reloader
  [...traceback...]
  SystemError: Parent module '' not loaded, cannot perform relative import
  </code></pre>
  
  <p>So now the server starts properly, but the child process reloads the code improperly.</p>