Skip to content

Commit 3a98032

Browse files
authored
Merge pull request #36 from Zsailer/notebook_dir
add notebook_dir as trait to be deprecated
2 parents 7d2fe81 + 9107c4e commit 3a98032

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/source/extending/handlers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ following:
115115
Called when the extension is loaded.
116116
117117
Args:
118-
nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance.
118+
nb_server_app: handle to the Notebook webserver instance.
119119
"""
120120
web_app = nb_server_app.web_app
121121
host_pattern = '.*$'

jupyter_server/serverapp.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,16 @@ def _update_pylab(self, change):
11241124
)
11251125
self.exit(1)
11261126

1127+
notebook_dir = Unicode(
1128+
config=True,
1129+
help=_("DEPRECATED, use root_dir.")
1130+
)
1131+
1132+
@observe('notebook_dir')
1133+
def _update_notebook_dir(self, change):
1134+
self.log.warning(_("notebook_dir is deprecated, use root_dir"))
1135+
self.root_dir = change['new']
1136+
11271137
root_dir = Unicode(config=True,
11281138
help=_("The directory to use for notebooks and kernels.")
11291139
)

0 commit comments

Comments
 (0)