Conversation
requests.get without a timeout waits forever on a stalled connection; fail into the existing RequestException handler instead. Fixes #2443
🤖 Open Code ReviewTarget: PR #2444 🔍 OpenCodeReview found 2 issue(s) in this PR. 1.
|
✅ Automated Test Results: PASSEDAll tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 1s [advisory, non-gating] AI-generated tests on branch test/auto-gen-0cd6d31c891e0241-20260930221021: 26/29 passed, 3 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
Fixes #2443
Summary
download_examplesinsrc/memos/cli.pyfetches the examples zip withrequests.get(zip_url)and notimeout.requestswaits indefinitely by default, so a stalled connection hangs the CLI forever — no error, no retry, no way out but Ctrl-C.Fix
Pass an explicit
timeout=60so a stalled download raisesrequests.RequestException, which the function already catches and reports:Regression test
Added
tests/test_cli_download_timeout.py:Trueruff check(repo-pinned 0.11.8) passes on both touched files.AI Disclosure