Moved 'assert mode == keyboard_mode' ouside the branches.
This means that if a unknown mode comes its gonna get catched by the
assert and never gona get to the else statement.
For this, the else stament moved to before the assert, caching the mode
error before the assert.
Previously know as validate_notebook_mode changed name to
validate_dualmode_mode to represent better the method.
Added a docstring.
Removed the handling of index being None.
instead of the monkeypatch we did to keep the backport patch small
requiring tornado 5 simplifies things a ton because tornado.concurrent.Future is asyncio.Future
Eliminated the Kernel and Kernelspec handlers. The Websocket (ZMQ)
channels handler still remains. This required turning a few methods
into coroutines in the Notebook server.
Renamed the Gateway config object to GatewayClient in case we want
to extend NB server (probably jupyter_server at that point) with
Gateway server functionality - so an NB server could be a Gateway
client or a server depending on launch settings.
Add code to _replace_ the channels handler rather than rely on position
within the handlers lists.
Updated mock-gateway to return the appropriate form of results.
Updated the session manager tests to use a sync ioloop to call the
now async manager methods.
Created a singleton class `Gateway` to store all configuration options
for a Gateway. This class also holds some help methods to make it easier
to use the options and determine if the gateway option is enabled.
Updated the NotebookTestBase class to allow for subclasses to infuence
the patched environment as well as command line options via argv.
Added a test to ensure various gateway configuration items can be
set via the environment or command-line.
This change alleviates a significant pain-point for consumers of Jupyter
Kernel and Enterprise Gateway projects by embedding the few classes defined
in the NB2KG server extension directly into the Notebook server. All code
resides in a separate gateway directory and the 'extension' is enabled
via a new configuration option `--gateway-url`.
Renamed classes from those used in standard NB2KG code so that Notebook
servers using the existing NB2KG extension will still work.
Added test_gateway.py to exercise overridden methods. It does this by
mocking the call that issues requests to the gateway server.
Updated the _Running a notebook server_ topic to include a description
of this feature.
- separates nbserver_extension config loading into new
init_server_extension_config method
- adds init_server_extension_config to the initialize funciton before
the init_webapp call
- adds nbserver_extension configuration found in config.d files (by the
BaseJSONConfigLoader) to both the underlying NotebookApp config object
and the self.nbserver_extensions value
- makes self.nbserver_extensions the canonical location for identifying
all nbserver_extensions rather than temporary extensions variable
As per issue #3335, we want all js tests migrated to selenium. This change migrates the test of buffered execution requests.
Test Plan:
py.test -v notebook/tests/selenium/test_buffering.py