This is a fix for https://github.com/jupyter/notebook/issues/6164
`nest_asyncio` must be applied before any async tasks have been created
otherwise there could be tasks queued that are unpatched, and thus do
not respect nested loops. An example of an unpatched task can be seen in
the original issue:
```
<Task pending coro=<HTTP1ServerConnection._server_request_loop() running at /apps/python3/lib/python3.7/site-packages/tornado/http1connection.py:823>
```
which originates from Tornado.
A similar issue was reported in `nest-asyncio`: https://github.com/erdewit/nest_asyncio/issues/22
where the solution is to call `apply` on import so that unpatched tasks
do not get created.
The intent of the test is to make sure that log_json defaults
to True when JUPYTER_ENABLE_JSON_LOGGING is set to "true" so
this makes the test more explicit and to pass when json-logging
is not installed so that does not interfere due to validation.
Make sure the default value is handled properly based
on environment variables. Also checks the validation
code based on whether or not json_logging is imported.
This commit updates the super usage. Because Python 2 is not supported
anymore, super usage can be updated such that super is called without
any arguments in the default case where super is called with the class
name and self.
Note that all usage of super has not been updated - a few cases which
smelled funny have been ignored.
On Python 3, the default source file encoding for Python files is utf-8
and because Python 2 is no longer supported, the utf8 coding cookies can
be removed
* remove old JS tests, which are already converted to pytest
add test for a markdown heading
* Update markdown.js
remove old test [skip ci]
* remove debug statement
[skip ci]
* converted move multiselection to selenium test
* deleted the time library
* Remove move_multiselection
Co-authored-by: Diego Schurch <dschurch@NSL-DSCHURCHs-MacBook-Pro.local>
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