fix(python): honor zero reconnect attempts#1798
Open
fjbarrett wants to merge 1 commit into
Open
Conversation
Treat only a missing or None maxReconnectAttempts value as the default. This preserves an explicit zero so Python matches the TypeScript WebSocket client configuration semantics. Add regression coverage for both the None default and zero-attempt cases. Co-Authored-By: Codex <codex@openai.com>
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
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.
Summary
maxReconnectAttemptsonly when the option is missing orNone0, matching the TypeScript WebSocket clientNonedefault and zero-attempt behavior with regression testsTesting
python -m pytest sdks/python/tests/test_ws_client.py -q(10 passed)python -m pytest sdks/python/tests -q(269 passed, 66 deselected)npm test(51 core suites passed; 822 core tests and 269 Python tests passed)AI assistance
OpenAI Codex assisted with implementation and verification. I reviewed the complete diff and take responsibility for the change.
Closes #1797