* 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
* Check for invalid characters prior to rename
On Windows platforms, rename operations containing ':' are problematic
since the operation succeeds, but creates an unintended "alternate data
stream" that gives the user the impression their file contents have been
deleted. This change performs cursory validation of the destination
name on platforms in which issues can occur. Currently, non-Windows
systems don't require this level of validation.
Fixes#5190
* Apply changes per review comments
Prior to this change, the request timeout for a Gateway request
was synchronized with KERNEL_LAUNCH_TIMEOUT only if KLT
was greater. However, the two are closely associated and KLT
should be adjusted if the configurable request_timeout is greater.
This change ensures that the two values are synchronized to the
greater value. It changes the two configurable timeouts to default
to 40 (to match that of KLT) and removes the 2-second pad,
since that wasn't helpful and only confused the situation.
These changes were prompted by this issue: jupyter/enterprise_gateway#792