Skip to content

Conversation

awalker4
Copy link
Collaborator

PDF page splitting uses asyncio but the SDK is not async. Therefore, we had to manage our own event loop, which can lead to issues in other event loop contexts. Uvloop is one context that does not allow us to use nested event loops. When we find ourselves in a uvloop.Loop, we have to fallback to non splitting mode. #135 will make the whole SDK async so we don't have to hack this.

Closes #133

PDF page splitting uses asyncio but the SDK is not async. Therefore, we had to manage our own event
loop, which can lead to issues in other event loop contexts. Uvloop is one context that does not
allow us to use nested event loops. When we find ourselves in a uvloop.Loop, we have to fallback to
non splitting mode.
@awalker4 awalker4 enabled auto-merge (squash) July 31, 2024 23:06
@awalker4 awalker4 requested a review from pawel-kmiecik August 5, 2024 00:49
Copy link
Contributor

@pawel-kmiecik pawel-kmiecik left a comment

Choose a reason for hiding this comment

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

LGTM!

@awalker4 awalker4 merged commit 2c3fcbe into main Aug 5, 2024
7 checks passed
@awalker4 awalker4 deleted the uvloop-fix branch August 5, 2024 07:29
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.

bug/nest-asyncio conflict with uvloop
2 participants