Skip to content

Conversation

@stepansergeevitch
Copy link
Contributor

@stepansergeevitch stepansergeevitch commented Jan 27, 2022

Fixed jupyter notebook async issues, extended dbapi jupyter examples.
This fix also add's an ability to use sync connection and cursor inside an asyncio loop, which we didn't support previously.
The issue was that basically loops can't be nested in asyncio, and all jupyter code is run inside a loop. The workaround for this is to create a thread inside a running loop and use new loop there. One problem is that a single httpx.AsyncClient should use the same loop always, so connection needs to cache it, which is done by storing AsyncJobThread

@stepansergeevitch stepansergeevitch changed the title Fix jupyter fix: Jupyter runtime Jan 27, 2022
Copy link
Contributor

@ptiurin ptiurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from that LGTM

Copy link
Contributor

@yuryfirebolt yuryfirebolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

84.0% 84.0% Coverage
0.0% 0.0% Duplication

@stepansergeevitch stepansergeevitch merged commit 1ade712 into main Jan 28, 2022
@stepansergeevitch stepansergeevitch deleted the fix_jupyter branch January 28, 2022 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants