jupyterhub / batchspawner

Custom Spawner for Jupyterhub to start servers in batch scheduled systems
BSD 3-Clause "New" or "Revised" License
190 stars 134 forks source link

Upgrade `singleuser.py` for JupyterHub 3 #251

Closed mahendrapaipuri closed 1 year ago

mahendrapaipuri commented 1 year ago

The _api_request method of HubAuth in JupyterHub 3 is made into a coroutine. So, batchspawner-singleuser in its current implementation will fail to communicate with JupyterHub as request is never awaited.

This PR modifies the singleuser.py function to make it work for JupyterHub 2 and 3.

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

loikki commented 1 year ago

Thanks, it solved my issue.

mahendrapaipuri commented 1 year ago

In fact, this PR is more elegant solution than what I proposed here. I havent seen it before submitting this PR.

@ryanlovett I think we need to merge #247 into main and make a new release as JupyterHub 3.0.0 has been already around for few months.

gridley commented 1 year ago

Awesome!! I was wrestling to get jupyterhub to work with slurm on my cluster forever, and this fixed it for me. Thank you! :smile:

mbmilligan commented 1 year ago

247 was merged which addresses the same issue, so closing this PR. Thank you for the contribution though!