Skip to content

Commit 510430b

Browse files
authored
Update jupyterhub to version 1.0.0 (#609)
* MAINT: update jupyterhub version to 1.0.0 * DEV: use JupyterHub.shutdown_on_logout configuration * TST: fix mocking failures on unit tests * CLN: remove SimphonyRemoteAuthMixin class since it is no longer requried to close user sessions upon logout
1 parent 405125c commit 510430b

File tree

8 files changed

+9
-54
lines changed

8 files changed

+9
-54
lines changed

jupyterhub/jupyterhub_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
# Choose between system-user mode and virtual-user mode
1818
setting_mode = ('system_user', 'virtual_user')[1]
1919

20+
# Ensures user sessions are closed upon logout - this is especially
21+
# useful for admin users to switch between user and admin apps
22+
c.JupyterHub.shutdown_on_logout = True
23+
2024
if setting_mode == 'virtual_user':
2125
c.JupyterHub.spawner_class = ('remoteappmanager.jupyterhub.spawners.'
2226
'VirtualUserSpawner')
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
from .world_authenticator import WorldAuthenticator # noqa
22
from .basic_authenticator import BasicAuthenticator # noqa
33
from .github_whitelist_authenticator import GitHubWhitelistAuthenticator # noqa
4-
from .simphony_remote_auth_mixin import SimphonyRemoteAuthMixin # noqa

remoteappmanager/jupyterhub/auth/basic_authenticator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
from jupyterhub.auth import Authenticator
44
from traitlets import Dict
55

6-
from .simphony_remote_auth_mixin import SimphonyRemoteAuthMixin
76

8-
9-
class BasicAuthenticator(SimphonyRemoteAuthMixin, Authenticator):
7+
class BasicAuthenticator(Authenticator):
108
""" Simple authenticator based on a fixed set of users"""
119

1210
#: Dictionary of regular username: password keys allowed

remoteappmanager/jupyterhub/auth/github_whitelist_authenticator.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from traitlets.config import LoggingConfigurable
44
from traitlets import Unicode, Float, Set
55

6-
from .simphony_remote_auth_mixin import SimphonyRemoteAuthMixin
7-
86

97
class FileWhitelistMixin(LoggingConfigurable):
108
"""
@@ -61,8 +59,7 @@ def whitelist(self, value):
6159
pass
6260

6361

64-
class GitHubWhitelistAuthenticator(
65-
SimphonyRemoteAuthMixin, FileWhitelistMixin, GitHubOAuthenticator):
62+
class GitHubWhitelistAuthenticator(FileWhitelistMixin, GitHubOAuthenticator):
6663
"""A github authenticator that also verifies that the
6764
user belongs to a specified whitelisted user as provided
6865
by an external file (so that we don't have to restart

remoteappmanager/jupyterhub/auth/simphony_remote_auth_mixin.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

remoteappmanager/jupyterhub/auth/world_authenticator.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
from jupyterhub.auth import Authenticator
77

8-
from .simphony_remote_auth_mixin import SimphonyRemoteAuthMixin
98

10-
11-
class WorldAuthenticator(SimphonyRemoteAuthMixin, Authenticator):
9+
class WorldAuthenticator(Authenticator):
1210
""" This authenticator authenticates everyone """
1311

1412
@gen.coroutine

remoteappmanager/jupyterhub/tests/test_spawners.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def new_spawner(spawner_class):
4949
# Mock user
5050
user = mock.Mock()
5151
user.name = username()
52+
user.escaped_name = user.name
5253
user.url = 'http://my-callback.com'
5354
user.admin = False
5455
user.state = None

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tornado==5.1.1
44
requests==2.20.0
55
docker==2.2
66
escapism==0.0.1
7-
jupyterhub==0.9.6
7+
jupyterhub==1.0.0
88
jupyter_client>=4.3.0
99
click==6.6
1010
tabulate==0.7.5

0 commit comments

Comments
 (0)