* Restore detection of missing terminado package
* Properly handle terminals_enabled config
* Disambiguate terminado availability from web settings
* Further clarity on terminal availability
* Rename terminals_in_use back to terminals_available
* added `--autoreload` flag
When passed, the webapp will watch for any changes to its Python source. On
change, all changed packages will be reimported and the webapp will restart.
Also works on Python source files in Jupyter server extensions. Implemented
using the built in `autoreload` parameter in the constructor of
`tornado.web.Application`.
* updated .gitignore
* Add env variable support for port options
In order to better support use cases relating to containerized environments,
this change adds environment variable support for the `--port` option. Since
anyone setting a specific port probably doesn't want port retry logic enabled,
the `--port-retries` option has also been backed by an env.
Option `--port` will be backed by env `JUPYTER_PORT` and still defaults to `8888`.
Option `--port-retries` will be backed by env `JUPYTER_PORT_RETRIES` and still
defaults to `50`.
The CLI options will override those set via the envrionment, but environment
values override those set via configuration files.
Closes#5212
* Fixup after merge
This adds functionality to track a terminal's last activity and
optionally cull terminals that have been inactive for some specified
duration.
Resolves: #3868
This commit uses the approach used in jupyter_server #191 first proposed
by David Brochart. This reduces code duplication and alleviates redundancy
relative to configurable options.
Also, the startup message now includes the version information.
Co-authored-by: David Brochart <david.brochart@gmail.com>
When it was originally added, the PR for launching a browser via a redirect file (jupyter#4260) created some issues for some environments-namely WSL, Chromebook, and Android (jupyter#4346 (comment), jupyter/help#496). The reason for the break in these environments is due to the file structure/path differences between the runtime and the browser.
This commit adds a setting to the `jupyter_notebook_config.py` that allows users to disable the use of redirect file for launching a browser in favor of the original, yet visible, URL + token approach. This setting: `c.NotebookApp.use_redirect_file` will be set to True by default.
`check_pid` returns `True` if the PID for a notebook server still exists. Therefore, the `if check_pid(pid):` statements on lines 424 and 437 evaluate to `True` even though the notebook server is still running.
This commit simply adds a `not` to each line: `if not check_pid(pid):` so that the conditional only evaluates to `True` if `check_pid` returns `False`, which happens when the notebook server has shutdown, as expected.