ipython/ipython — pull request #6886 by minrk (2014-11-08 06:53:58+00:00)
Title: require tornado 4

WebSocketHandler changes make continuing to support tornado 3 problematic.

tornado 4 also drops support for the ancient draft76 implementation of websockets. This is fine for actual users, but phantomjs is stuck with it while it's using QtWebKit on Qt4.

This PR includes a copy of draft 76 support from tornado-3.2.2, and a small subclass of WebSocketHandler based on tornado 4.1.

These are only used when we are spawning a server for testing with phantomjs.
Under all 'real' circumstances, unpatched tornado 4 WebSocketHandlers are used without draft 76 support.

Draft76 support will only last as long as it takes to figure out how to get js tests running without draft76, and should never be enabled under any other circumstances.

I've tried so many other options this week:

- several tests fail with slimerjs, in ways I couldn't figure out. Some focus and keyboard-related tests fail if the window isn't focused (this includes running with xvfb)
- I installed phantomjs 2, which uses Qt5, but even casperjs master doesn't support it, yet

At this point, I think we should abandon both phantomjs and slimerjs and investigate another way to test javascript, such as selenium or jasmine via something like Sauce Labs. But that's a nightmarish project, and not something we should consider before 3.0.