FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Do not throw error when in a uvloop context by awalker4 · Pull Request #142 · Unstructured-IO/unstructured-python-client · GitHub

fix: Do not throw error when in a uvloop context - #142

Merged
awalker4 merged 2 commits into
mainfrom
uvloop-fix
Aug 5, 2024
Merged

fix: Do not throw error when in a uvloop context#142
awalker4 merged 2 commits into
mainfrom
uvloop-fix

Conversation

Copy link
Copy Markdown
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 enabled auto-merge (squash) July 31, 2024 23:06
awalker4 requested a review from pawel-kmiecik August 5, 2024 00:49

pawel-kmiecik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM!

awalker4 merged commit 2c3fcbe into main Aug 5, 2024
awalker4 deleted the uvloop-fix branch August 5, 2024 07:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL