zulip/zerver/tornado
Tim Abbott ae0a929988 tornado: Ensure that tornado doesn't autoreload into syntax errors.
We've for a long time been plagued by run-dev.py needing to be
restarted every time one does a rebase that has merge conflicts,
because the Tornado process restarts itself into a syntax error and
crashes.

This fixes the Tornado autoreload process to check explicitly for
whether files actually syntax-check before trying to actually reload
the Tornado process to run that code.

There are a few things that are a bit janky:
* Ideally, this would go into Tornado upstream
* We removed the `_watched_files` feature, which we weren't using.
* Ideally, we'd use something other than `importlib.reload` that just
  does the syntax-check without adjusting the state within our current
  process.

Fixes #4351.
2018-05-20 16:50:10 -07:00
..
__init__.py tornado: Move tornado_ioloop_logging to new zerver/tornado tree. 2016-11-26 21:24:05 -08:00
application.py tornado: Import autoreload module from upstream Tornado. 2018-05-20 16:49:17 -07:00
autoreload.py tornado: Ensure that tornado doesn't autoreload into syntax errors. 2018-05-20 16:50:10 -07:00
descriptors.py Mypy: Migrate tornado/descriptors.py to python3 function annotations. 2018-03-15 12:54:43 -07:00
event_queue.py zerver/tornado: Change use of typing.Text to str. 2018-05-12 15:22:38 -07:00
exceptions.py zerver/lib: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
handlers.py tornado: Extract AsyncDjangoHandlerBase and mark as nocoverage. 2018-05-15 18:39:52 -07:00
ioloop_logging.py tornado: Sort imports in files with no merge conflicts. 2017-11-15 15:53:11 -08:00
socket.py zerver/tornado: Change use of typing.Text to str. 2018-05-12 15:22:38 -07:00
views.py zerver/tornado: Change use of typing.Text to str. 2018-05-12 15:22:38 -07:00
websocket_client.py mypy: Use Python 3 type syntax in zerver/tornado/websocket_client.py. 2017-12-09 16:50:12 -08:00