22import traceback
33import urllib .parse
44
5- from notebook .base .handlers import IPythonHandler
65import threading
76import json
87import os
1110
1211from .pull import GitPuller
1312from .version import __version__
13+ from ._compat import get_base_handler
14+
15+ JupyterHandler = get_base_handler ()
1416
1517
1618jinja_env = jinja2 .Environment (loader = jinja2 .FileSystemLoader (
1719 os .path .join (os .path .dirname (__file__ ), 'templates' )
1820 ),
1921)
2022
21- class SyncHandler (IPythonHandler ):
23+ class SyncHandler (JupyterHandler ):
2224 def __init__ (self , * args , ** kwargs ):
2325 super ().__init__ (* args , ** kwargs )
2426
@@ -132,7 +134,7 @@ def pull():
132134 self .git_lock .release ()
133135
134136
135- class UIHandler (IPythonHandler ):
137+ class UIHandler (JupyterHandler ):
136138 @web .authenticated
137139 async def get (self ):
138140 app_env = os .getenv ('NBGITPULLER_APP' , default = 'notebook' )
@@ -169,7 +171,7 @@ async def get(self):
169171 await self .flush ()
170172
171173
172- class LegacyGitSyncRedirectHandler (IPythonHandler ):
174+ class LegacyGitSyncRedirectHandler (JupyterHandler ):
173175 """
174176 The /git-pull endpoint was previously exposed /git-sync.
175177
@@ -185,7 +187,7 @@ async def get(self):
185187 self .redirect (new_url )
186188
187189
188- class LegacyInteractRedirectHandler (IPythonHandler ):
190+ class LegacyInteractRedirectHandler (JupyterHandler ):
189191 """
190192 The /git-pull endpoint was previously exposed /interact.
191193
0 commit comments