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

Update import for backwards compatibility #169

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RRosio
Copy link
Collaborator

@RRosio RRosio commented Oct 16, 2023

JupyterServer handlers are not compatible with Notebook 6 series, this updates mitigates error that Notebook 6 users installing the latest version of the jupyter_nbextensions_configurator, may encounter.

@xyepeng
Copy link

xyepeng commented Oct 22, 2023

I think your solution can solve my problem, but can you explain the specific steps? I am a novice

@RRosio
Copy link
Collaborator Author

RRosio commented Oct 31, 2023

Hi @xyepeng, this is an update that will help jupyter_nbextensions_configurator work with both Notebook 6 and Notebook 7. The current main branch has some merged updates that haven't been released yet and this is a small follow up to those changes. Notebook 7 has a different codebase than Notebook 6, where Notebook 6 has its own handlers, in Notebook 7 we want the handlers to be imported from jupyter_server package. In this PR I am making sure we first check if the handlers can be imported from the notebook module (Notebook 6), otherwise we have Notebook 7 and we need to import from jupyter_server

@strelok372
Copy link

Hi! I suppose, this PR should fix 'No module named 'notebook.base'' problem? If yes, maybe could you explain how to install nbextension with your fix manually? I'd like to test it and have already downloaded it

@RRosio
Copy link
Collaborator Author

RRosio commented Nov 29, 2023

Hi @strelok372, apologies for the delay in my reply. Yes, this is the issue that this PR addresses. The import statement is being updated so that in the case that importing the modules/functionality requested from the notebook fails, then they are instead requested from jupyter_server. This is because Notebook 7 is a different codebase than Notebook 6, and those imports are not present in the Notebook 7 codebase but rather the JupyterServer codebase.
You can try modifying those imports and installing a local version of this package. I am blocked on another issue that comes up with a different packagejupyter_contrib_core: Jupyter-contrib/jupyter_contrib_core#15. Those changes may also be necessary to make locally! If you can clone this repository and either apply the changes or checkout them out, then pip install -e . you will be able to try these changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants