Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JupyterHub 4 deprecation warning #306

Open
cmd-ntrf opened this issue Apr 4, 2024 · 1 comment · May be fixed by #317
Open

JupyterHub 4 deprecation warning #306

cmd-ntrf opened this issue Apr 4, 2024 · 1 comment · May be fixed by #317
Labels

Comments

@cmd-ntrf
Copy link
Contributor

cmd-ntrf commented Apr 4, 2024

After spawning a job with batchspawner 1.3.0 and JupyterHub 4.1.4, the following deprecation warning is logged:

[I 2024-04-04 15:55:26.989 JupyterHub log:192] 200 POST /hub/api/batchspawner ([email protected]) >
[W 2024-04-04 15:55:27.093 JupyterHub spawner:172]
     The shared database session at Spawner.db is deprecated, and will be removed.
     Please manage your own database and connections.

     Contact JupyterHub at https://github.com/jupyterhub/jupyterhub/issues/3700
     if you have questions or ideas about direct database needs for your Spawner.

This warning is triggered when a Spawner access the property db. In the case of BatchSpawner, it happens only here:

self.db.commit()

And base on git blame, this line was added 9 years ago as it was recommended by JupyterHub doc at the time.
88b6a4f

Based on this JupyterHub commit jupyterhub/jupyterhub@ac3ef1e , db has been depecrated since JupyterHub 3. So we either remove it entirely if it serves no purpose for any of the supported JupyterHub versions, or we check if JupyterHub version is smaller than 3 before executing the db commit line.

@cmd-ntrf cmd-ntrf added the bug label Apr 4, 2024
@rcthomas
Copy link
Contributor

rcthomas commented Apr 4, 2024

Similarly jupyterhub/wrapspawner#55, some overlapping users for both packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants