- connect iopub first (tiny effect on the race!)
- docstrings, log details
- resolve immediately if kernel is busy, rather than setting up timeouts, futures
- use gen.with_timeout instead of separately managed timeout
- use gen.multi to wait for both futures instead of duplicated check in each handler, third Future
- add various cancel conditions (sockets closed, kernel stopped, etc.)
_check_trash() was added (in #3304) because TrashPermissionError didn't
exist, yet.
Now that it does, we can use it, and stop guessing what will cause a
permission problem.
Closes: #3374
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
* This is a potential fix to issue #4669. The fix simply catches the
recusrive symlink error and moves on. It is possibble that the
try/except belongs in the utils but I wanted to limit the scope.
* It looks like too many levels is error number 40 on linux.
* Switch to using errno instead of hardcoding the number.
* Fix spelling, smarter assert methods
* Log unrecognised errors and continue listing directory
* Skip recursive symlink test entirely on Windows
* Fix which test is skipped on Windows
Co-authored-by: Thomas Kluyver <thomas@kluyver.me.uk>
KernelManager's last_activity attribute is added following the instance's
creation. Culling (independently) uses this attribute and should ensure
it exists prior to its use, else skip the culling check for that instance.
Fixes#5345
* 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
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>