Skip to content

Commit

Permalink
Move open_browser to the top level configs of classes.
Browse files Browse the repository at this point in the history
This follows on changes to Jupyter Server and ExtensionApp which moves open_browser to the ExtensionApp config.

See jupyter-server/jupyter_server#375

Fixes jupyterlab#9579
  • Loading branch information
jasongrout committed Jan 8, 2021
1 parent 9fd1548 commit 3c02eff
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 13 deletions.
3 changes: 2 additions & 1 deletion examples/example_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ class App(mod.ExampleApp):
JS console errors, JS errors, and Python logged errors.
"""
name = __name__
open_browser = False

serverapp_config = {
"open_browser": False,
"base_url": "/foo/",
"root_dir": osp.abspath(example_dir)
}
Expand Down
3 changes: 2 additions & 1 deletion jupyterlab/browser_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ class BrowserApp(LabApp):
JS console errors, JS errors, and Python logged errors.
"""
name = __name__
open_browser = False

serverapp_config = {
"open_browser": False,
"base_url": "/foo/"
}
ip = '127.0.0.1'
Expand Down
5 changes: 0 additions & 5 deletions jupyterlab/labapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,6 @@ class LabApp(NBClassicConfigShimMixin, LabServerApp):
expose_app_in_browser = Bool(False, config=True,
help="Whether to expose the global app instance to browser via window.jupyterlab")

# By default, open a browser for JupyterLab
serverapp_config = {
"open_browser": True
}

@default('app_dir')
def _default_app_dir(self):
app_dir = get_app_dir()
Expand Down
1 change: 0 additions & 1 deletion jupyterlab/labhubapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ class OverrideSingleUserNotebookApp(SingleUserNotebookApp):

# Disable the default jupyterlab extension and enable ourself
serverapp_config = {
"open_browser": True,
"jpserver_extensions": { "jupyterlab": False, "jupyterlab.labhubapp": True }
}

Expand Down
4 changes: 0 additions & 4 deletions jupyterlab/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ class JestApp(ProcessTestApp):

test_config = Dict(dict(foo='bar'))

serverapp_config = {
"open_browser": False
}

@deprecated(removed_version=4)
def get_command(self):
"""Get the command to run"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def run(self):
'tornado>=6.1.0',
'jupyter_core',
'jupyterlab_server~=2.0',
'jupyter_server~=1.1',
'jupyter_server~=1.2',
'nbclassic~=0.2',
'jinja2>=2.10'
]
Expand Down

0 comments on commit 3c02eff

Please sign in to comment.