Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure compatibility with both sync and async contents managers #62

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

yjoer
Copy link
Contributor

@yjoer yjoer commented Oct 8, 2024

Following #61, I inspected the class used by the instance bounded to self.contents_manager by printing its type before the should_hide(...) function returns. This is what I got before installing Jupytext.

<class 'jupyter_server.services.contents.largefilemanager.AsyncLargeFileManager'>

After installing Jupytext, the contents manager changed.

<class 'jupytext.contentsmanager.build_jupytext_contents_manager_class.<locals>.JupytextContentsManager'>

After digging for a while, Jupytext does not support an async contents manager and overrides the contents manager with a subclass of LargeFileManager since 1.14.3.

Along these lines, I came up with a change to ensure we can call both sync and async methods.

Copy link

github-actions bot commented Oct 8, 2024

Binder 👈 Launch a Binder on branch yjoer/jupyterlab-quickopen/fix-1

@jtpio jtpio added the bug Something isn't working label Oct 8, 2024
@jtpio
Copy link
Member

jtpio commented Oct 9, 2024

Thanks @yjoer for working on this!

Feel free to undraft the PR if you feel like this is ready for review and merge.

@yjoer
Copy link
Contributor Author

yjoer commented Oct 9, 2024

I tested this manually by uninstalling and reinstalling Jupytext. It should be good to go.

@yjoer yjoer marked this pull request as ready for review October 9, 2024 18:59
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jtpio jtpio merged commit 367d06e into jupyterlab-contrib:main Oct 9, 2024
7 checks passed
@yjoer yjoer deleted the fix-1 branch October 9, 2024 19:17
@jtpio
Copy link
Member

jtpio commented Oct 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants