Skip to content

Commit

Permalink
sagemathgh-36506: Support launching notebook 7
Browse files Browse the repository at this point in the history
    
As reported in sagemath#36414, running `sage -notebook` fails with jupyter
notebook 7.

This seems to be just a matter of a changed import, which we fix.

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.

Fixes: sagemath#36414
    
URL: sagemath#36506
Reported by: Gonzalo Tornaría
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Oct 25, 2023
2 parents 3d067ed + 14a70ed commit 4661842
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bin/sage-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ class NotebookJupyter():
def __init__(self, argv):
self.print_banner()
try:
from notebook.notebookapp import main
try:
# notebook 6
from notebook.notebookapp import main
except ImportError:
# notebook 7
from notebook.app import main
except ImportError:
import traceback
traceback.print_exc()
Expand Down

0 comments on commit 4661842

Please sign in to comment.