Skip to content

Increase default request timeout and make it configurable - #42

Merged
jaraco merged 2 commits into
mainfrom
issue-38-timeout
Oct 3, 2026
Merged

jaraco merged 2 commits into
mainfrom
issue-38-timeout

Conversation

@jaraco

@jaraco jaraco commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Client.aquery used httpx's default 5-second timeout, which Wolfram|Alpha full-results queries can exceed, causing intermittent httpx.ReadTimeout failures in CI.

  • Adds a Client.timeout setting, defaulting to 30 seconds (more than Wolfram|Alpha's own ~20s totaltimeout).
  • Configurable via Client(app_id, timeout=...) or by subclassing.
  • Doctest covering the default and override; news fragment added.

Fixes #38

🤖 Generated with Claude Code

httpx's default 5-second timeout is shorter than Wolfram|Alpha queries can take.

Fixes #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread wolframalpha/__init__.py Outdated
Comment thread wolframalpha/__init__.py Outdated
Comment thread wolframalpha/__init__.py Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jaraco
jaraco merged commit 3d1bfaa into main Oct 3, 2026
26 of 36 checks passed
@jaraco
jaraco deleted the issue-38-timeout branch October 3, 2026 00:59
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.

Live API tests intermittently fail in CI with httpx.ReadTimeout

1 participant