jupyterhub / nbgitpuller

Jupyter server extension to sync a git repository one-way to a local path
https://nbgitpuller.readthedocs.io
BSD 3-Clause "New" or "Revised" License
212 stars 86 forks source link

Use async/await instead of gen.coroutine/yield #246

Closed consideRatio closed 2 years ago

consideRatio commented 2 years ago

Closes #243.

This contains two commits, where the first commit was the obvious replacements. I think it was correct to make the second commit but I'm never fully confident about this. It would be great to have @minrk or someone confident about how things work review this.

Note I've figured out that this project currently require python 3.7+, and that this kind of change would require python 3.5+.

consideRatio commented 2 years ago

calling an asyncio coroutine only creates an object to be run, no execution actually happens, whereas calling a tornado coroutine schedules it immediately

Ahhh!! That explains a lot. You may have said this before tonme but now i finally get it i think. I invested some hours learning more about async with a youtube playlist earlier :)

Thanks for the quick review Min!

yuvipanda commented 2 years ago

Thanks a lot, @consideRatio! And thanks for the review, @minrk :)