feat: add timeout parameter to Python API functions#597
Merged
Conversation
dionhaefner
requested review from
apaleyes,
jpbrodrick89 and
xalelax
as code owners
May 19, 2026 08:07
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #597 +/- ##
==========================================
- Coverage 77.12% 77.07% -0.06%
==========================================
Files 32 32
Lines 4489 4492 +3
Branches 738 738
==========================================
Hits 3462 3462
- Misses 724 727 +3
Partials 303 303 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Benchmark ResultsBenchmarks use a no-op Tesseract to measure pure framework overhead. 🚀 0 faster, ✅ No significant performance changes detected. Full results
|
apaleyes
reviewed
May 21, 2026
Contributor
Author
|
@apaleyes done |
apaleyes
approved these changes
May 22, 2026
dionhaefner
enabled auto-merge (squash)
May 22, 2026 11:03
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issue or PR
n/a
Description of changes
In pathological cases, HTTP requests can hang forever (e.g. when a container runs out of memory or just hangs indefinitely). This is hard to detect and work around if it happens deep within a call stack. This PR introduces a
timeoutparameter toTesseract.from_urlandTesseract.from_imageso users can at least fail gracefully if requests hang.Testing done
CI