Saving should increment last_modified. Renaming should not. Noticed
because incrementing last_modified on rename results in a scary error
message from the frontend.
The test actually passes on my VM (Win 7),
but not on Jenkins (Server 2012).
I haven't figured out how to identify the subset of Windows systems where it won't work,
but since the problem appears to be in the test,
not the tested code, skipping on Windows seems the right way to go.
> Adapting to protocol vX for kernel Y
instead of
> Kernel Y speaks protocol version X
some have interpreted the "Kernel speaks" statement was an error message;
this should be clearer about what's happening,
and that there is no error.
in kernel channel handlers
we were accidentally relying on loading Session.key from config set via the default_secure decorator,
which forced the key to be the same for every kernel.
- Adds a `GenericCheckpointMixin` as a helper for implementing the two
boundary-traversing Checkpoint API methods, `create_checkpoint` and
`restore_checkpoint`.
- `GenericFileCheckpointManager` is implemented as a subclass of
`FileCheckpointManager` using `GenericCheckpointMixin`. Note that
this is the safe subtyping relationship because of method
signature *contra*variance: `FileCheckpointManager` accepts
`FileContentsManager` in its method signatures type, whereas
`GenericFileCheckpointManager` accepts any `ContentsManager`.
- Moved Checkpoint-related classes to their own files.
On `create_checkpoint` and `restore_checkpoint`, pass a path and a
`ContentsManager` to `CheckpointManager` instead of an already-loaded
model.
The `CheckpointManager` base class provides a correct implementation of
these methods that's generic across any ContentsManager, but subclasses
are free to specialize when the storage backend of `ContentsManager` is
shared.
multiplex on a 'channel' key in message,
rather than separate websockets.
Unlike zmq, there aren't different message patterns that require the channels to be separate.
Reduces FD count by factor of 3 and connection complexity in js.
Changed the public checkpoint API to:
- `create_checkpoint(self, nb, path)`
- `get_checkpoint_content(self, checkpoint_id, path)`
- `rename_checkpoint(self, checkpoint_id, old_path, new_path)`
- `delete_checkpoint(self, checkpoint_id, path)`
- `list_checkpoints(self, path)`
All paths in the above are API-style paths, and the `nb` argument to
`create_checkpoint` is a dictionary suitable for passing to
`nbformat.write`.
The new `get_checkpoint_content` method returns an unvalidated notebook
content dictionary. It is used by `ContentManager.restore_checkpoint`
to load content to be written via `save`.