Skip to content

Commit e4abc6a

Browse files
committed
add notebook_dir as trait to be deprecated
1 parent e0f3c08 commit e4abc6a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

jupyter_server/serverapp.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,20 @@ def _update_pylab(self, change):
10501050
)
10511051
self.exit(1)
10521052

1053+
notebook_dir = Unicode(config=True,
1054+
help=_("DEPRECATED, use root_dir.")
1055+
)
1056+
1057+
@default('notebook_dir')
1058+
def _default_notebook_dir(self):
1059+
self.log.warning(_("\n notebook_dir is deprecated, use root_dir.\n"))
1060+
return self.root_dir
1061+
1062+
@validate('notebook_dir')
1063+
def _update_notebook_dir(self, change):
1064+
self.log.warning(_("\n notebook_dir is deprecated, use root_dir.\n"))
1065+
self.root_dir = change['value']
1066+
10531067
root_dir = Unicode(config=True,
10541068
help=_("The directory to use for notebooks and kernels.")
10551069
)

0 commit comments

Comments
 (0)