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 28, 2023
2 parents ca7af6b + 14a70ed commit 3a35bef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=aa7054a0e6a582d2db1475dc47f63a54e6ac569f
md5=40eab024557ad51e08dfb08e2753a465
cksum=802824779
sha1=06f137fde88bc4ee5ce277b1706e258dad6bdce0
md5=e771b6ed8eaa2f6f706eb0a774685c2e
cksum=3654829791
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c47788b02a42ef4907a0e61e702fbe9bbef27590
05c386f49cc9961b375274e2e48c05065c5fffe4
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 3a35bef

Please sign in to comment.