Skip to content

Handle client close errors on python 3.14#99

Merged
nezhar merged 1 commit into
mainfrom
handle-client-error
Jun 30, 2026
Merged

Handle client close errors on python 3.14#99
nezhar merged 1 commit into
mainfrom
handle-client-error

Conversation

@nezhar

@nezhar nezhar commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Compatibility patch for Python 3.14 to suppress a specific ValueError related to closed HTTP response file pointers, which can occur when using the Docker SDK. The patch is implemented in vibepod/cli.py and is thoroughly tested with new unit tests in tests/test_cli.py.

Python 3.14 compatibility patch:

  • Added _install_python314_http_client_flush_patch and _should_ignore_closed_http_response_flush_error functions to vibepod/cli.py to suppress the "I/O operation on closed file." error raised during HTTP response cleanup in Python 3.14. The patch is applied automatically at module import.
  • Imported http.client and sys in vibepod/cli.py to support the new patch logic.

@VibePod VibePod deleted a comment from coderabbitai Bot Jun 30, 2026
@nezhar nezhar force-pushed the handle-client-error branch from 95171c3 to c1f7168 Compare June 30, 2026 20:50
@augmentcode

augmentcode Bot commented Jun 30, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds a Python 3.14 compatibility workaround to prevent a Docker-SDK-triggered cleanup error when HTTP responses are finalized.

Changes:

  • Introduces a small filter to detect the specific closed-file ValueError during http.client.HTTPResponse.flush
  • Installs a runtime patch (Python >= 3.14 only) that wraps HTTPResponse.flush and suppresses that one edge case
  • Applies the patch automatically when vibepod.cli is imported
  • Adds unit tests covering the filter behavior and that the patch suppresses the targeted error

Technical Notes: The patch is gated by sys.version_info and marked idempotent via a function attribute to avoid double-wrapping.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/vibepod/cli.py Outdated
Comment thread tests/test_cli.py Outdated
@VibePod VibePod deleted a comment from coderabbitai Bot Jun 30, 2026
@nezhar nezhar force-pushed the handle-client-error branch from c1f7168 to f1552a8 Compare June 30, 2026 20:55
@VibePod VibePod deleted a comment from coderabbitai Bot Jun 30, 2026
@nezhar nezhar merged commit 00a60c7 into main Jun 30, 2026
29 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.

1 participant