Skip to content

Commit

Permalink
Merge pull request #831 from c2zwdjnlcg/fix-tests
Browse files Browse the repository at this point in the history
Fix for notebook version 7+
  • Loading branch information
devstein authored Sep 13, 2023
2 parents 8ffc0d2 + 8910498 commit 3dbd044
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sparkmagic/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ipywidgets>5.0.0
notebook>=4.2
tornado>=4
requests_kerberos>=0.8.0
nest_asyncio==1.5.5
nest_asyncio>1.5.5
12 changes: 9 additions & 3 deletions sparkmagic/sparkmagic/serverextension/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import json
from notebook.utils import url_path_join
from notebook.base.handlers import IPythonHandler

try:
from jupyter_server.utils import url_path_join
from jupyter_server.base.handlers import JupyterHandler as BaseHandler
except ImportError:
from notebook.utils import url_path_join
from notebook.base.handlers import IPythonHandler as BaseHandler

from tornado import web
from tornado import gen
from tornado.web import MissingArgumentError
Expand All @@ -13,7 +19,7 @@
from sparkmagic.utils.sparklogger import SparkLog


class ReconnectHandler(IPythonHandler):
class ReconnectHandler(BaseHandler):
logger = None

@web.authenticated
Expand Down

0 comments on commit 3dbd044

Please sign in to comment.