mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.6k stars 386 forks source link

Compatibility with `jupyter-fs=1.0.0` #1239

Closed mahendrapaipuri closed 2 months ago

mahendrapaipuri commented 3 months ago

jupyter-fs 1.0.0 has landed last week and now it uses AsyncContentsManager by default in its MetaManager. When used along with jupytext, this will be broken as jupytext, for the moment, only supports sync ContentsManager. There is a stale PR #1021 that attempts to add AsyncContentsManager support to jupytext but has not progressed in a while.

Probably we should document clearly that jupytext is only compatible with SyncMetaManager of jupyter-fs that has been added in 1.0.0. In fact jupytef-fs>0.3.1 uses AsyncContentsManager by default and SyncMetaManager is only added in 1.0.0. So, I guess for the jupyter-fs versions 0.4.0 and 0.4.1, jupytext is not compatible.

@mwouts Did you have an opportunity to look into it? Cheers!

mwouts commented 3 months ago

Hi @mahendrapaipuri , yes that's correct, I have not made significant progress on the async contents manager. From what I remember the impact was very big and I did not identify a big demand for that. Of course I am happy to reconsider and restart that work!

Yes I did saw the incompatibility between jupytext and recent version of jupyter-fs (there's a test on the CI in which I had to pin the version of jupyter-fs). It's a great news that now jupyter-fs has a sync contents manager! If I understand correctly, you're suggesting that we document how to use jupytext with that sync contents manager in its latest version? That would be great!

mahendrapaipuri commented 3 months ago

Well, we should clearly document the compatbility with jupyter-fs. Moreover, I think we need to improve this code here. In the case of jupyter-fs there is no Async in its class name (its MetaManager) and so, the warning will never be triggered (I guess).

We should look into base classes (the classes that current contents manager has dervied from) and check if they are based on sync or async variants and emit the logs. Maybe using inspect can be used to check the base classes.

What do you think?