Skip to content

Fix Python client timeout unit and disconnect handling - #9

Merged
wadoon merged 2 commits into
fix/client-test-compilationfrom
fix/python-client-stability
Jun 22, 2026
Merged

Fix Python client timeout unit and disconnect handling#9
wadoon merged 2 commits into
fix/client-test-compilationfrom
fix/python-client-stability

Conversation

@unp1

@unp1 unp1 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Python client stability (keyext.client.python):

  • Cache service-loader lookups for macros and script commands #13 LspEndpoint's timeout=2000 is seconds in Python (≈33 min), not the milliseconds the literal suggests. Naively changing it to 2.0 would abort long-running KeY proofs. Instead the default is now None (wait indefinitely), documented as seconds when set.
  • To make "no timeout" safe, the reader thread now wakes any pending callers when the server closes the connection, so call_method fails fast with ConnectionError instead of hanging forever.

Tests: tests/test_lsp_endpoint.py covers the default, a finite (seconds) timeout, and the disconnect-wakeup (the latter two fail on the old code).

Notes:

PR has been created with AI tooling

unp1 and others added 2 commits June 22, 2026 20:21
The test pre-loaded a response before the request was registered, so the
reader could deliver it before callSync registered its waiting future; the
handler then NPE'd and callSync blocked forever (no timeout). It is an
artificial scenario and is covered deterministically by the client-stability
PR's callSync test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@unp1
unp1 force-pushed the fix/python-client-stability branch from 97d5ef8 to 366a372 Compare June 22, 2026 18:24
@unp1
unp1 force-pushed the fix/client-test-compilation branch from ff41056 to 61e6d2f Compare June 22, 2026 18:49
@wadoon
wadoon merged commit 3dad4e7 into fix/client-test-compilation Jun 22, 2026
3 checks passed
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.

2 participants