2
2
import traceback
3
3
import urllib .parse
4
4
5
- from notebook .base .handlers import IPythonHandler
6
5
import threading
7
6
import json
8
7
import os
11
10
12
11
from .pull import GitPuller
13
12
from .version import __version__
13
+ from ._compat import get_base_handler
14
+
15
+ JupyterHandler = get_base_handler ()
14
16
15
17
16
18
jinja_env = jinja2 .Environment (loader = jinja2 .FileSystemLoader (
17
19
os .path .join (os .path .dirname (__file__ ), 'templates' )
18
20
),
19
21
)
20
22
21
- class SyncHandler (IPythonHandler ):
23
+ class SyncHandler (JupyterHandler ):
22
24
def __init__ (self , * args , ** kwargs ):
23
25
super ().__init__ (* args , ** kwargs )
24
26
@@ -132,7 +134,7 @@ def pull():
132
134
self .git_lock .release ()
133
135
134
136
135
- class UIHandler (IPythonHandler ):
137
+ class UIHandler (JupyterHandler ):
136
138
@web .authenticated
137
139
async def get (self ):
138
140
app_env = os .getenv ('NBGITPULLER_APP' , default = 'notebook' )
@@ -169,7 +171,7 @@ async def get(self):
169
171
await self .flush ()
170
172
171
173
172
- class LegacyGitSyncRedirectHandler (IPythonHandler ):
174
+ class LegacyGitSyncRedirectHandler (JupyterHandler ):
173
175
"""
174
176
The /git-pull endpoint was previously exposed /git-sync.
175
177
@@ -185,7 +187,7 @@ async def get(self):
185
187
self .redirect (new_url )
186
188
187
189
188
- class LegacyInteractRedirectHandler (IPythonHandler ):
190
+ class LegacyInteractRedirectHandler (JupyterHandler ):
189
191
"""
190
192
The /git-pull endpoint was previously exposed /interact.
191
193
0 commit comments