Closed rmalouf closed 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.
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:
Hi, Thank you for posting this. It looks like #250, #251 and this #255 are all trying to solve this same issue. Do you think you could merge your efforts? Would be wonderful to get this merged, since currently a simple "pip install" install fails. It looks like #251 has an attempt at backward-compatibility to earlier JHubs, so maybe that's preferable? Thanks again!
Dang it! Not sure how I missed that, but yes, those are fixes for the same problem and #251 is more general. I'll just close this one.
After upgrading to Jupyterhub > 3, running batchspawner-singleuser produces the error:
and the singleuser server never makes contact with the jupyterhub server. Issues #233 and #253 may be related to this.
The source of the problem is that Jupyterhub refactored the routines in services.auth to allow them to work with async code. Connected to that, they switched from using requests to tornado.HTTPClient. This was supposed to be a transparent and non-breaking change, but batchspawner-singleuser cheats by calling an internal function (
_api_request
) and pays the price!This PR just wraps the call to
_api_request
inasyncio.run()
and replaces thejson=
arg withbody=
.