GenericCheckpointsMixin should consider Futures returned from contents manager?
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
Hi! We implemented our own custom contents manager and we'd like to return Futures from its methods as they can involve slow external API calls. Jupyter handlers deal really well with it as all contents manager calls are wrapped with `yield maybe_future` in the handlers (which made me think we should use async functions in the CM at the beginning). E.g. https://github.com/jupyter/notebook/blob/d17caf92c0817e8bc771209a1e867f0c73e34724/notebook/services/contents/handlers.py#L111.
However, in `GenericCheckpointsMixin`, return values are read without considering that they can be a Future (e.g. https://github.com/jupyter/notebook/blob/b8b66332e2023e83d2ee04f83d8814f567e01a4e/notebook/services/contents/checkpoints.py#L79), so it fails when our CM gives it one. Was it done intendedly? otherwise implementing our own Checkpoints just because of it seems to be an overkill.
Contributor guide
Assessment
This issue has not been assessed yet.