refactor: replace httpx with stdlib urllib in push path
httpx was used in push.py for the presigned mpack protocol (presign POST, R2 PUT, unpack-mpack POST) with http2=False — no HTTP/2 benefit, just unnecessary async complexity causing ReadError on large uploads.
- Remove httpx and asyncio from push.py entirely - Add _urllib_post() and _urllib_put() using urllib.request.urlopen() - Synchronous: no event loop overhead, plain socket with 300s timeout - _make_push_ssl_ctx() and _make_r2_client() deleted - test_push_mpack_e2e.py: patch _urllib_post/_urllib_put instead of httpx
transport.py retains httpx for HTTP/2 (hub API calls benefit from multiplexing). push.py → single large binary upload, no HTTP/2 needed.
sha256:7e95b29f2d502ad5eccf2a57af4092763a2e705f1bf1569a8cb7e063b6e6d5bd
sha
+8
~5
−12
symbols
sha256:2bfa754fae073913a95e3fc530b2929ee8040d365297c6756b5a13d3c3f7f899
snapshot
+8
symbols added
~5
symbols modified
−12
symbols removed
0
dead code introduced
Older
Merge branch 'dev' into main
sha256:c016bc8bb8ecb2cb51865be3b60751a3d18227a7d0ff6cb5a5cebbda7f4fb989
All commits
Newer
fix: use http.client for R2 PUT to avoid Content-Type auto-injection
sha256:7a59846a92918d24b441ef3821a51fa47e16feedc844f411204c853a120fce89
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:7e95b29f2d502ad5eccf2a57af4092763a2e705f1bf1569a8cb7e063b6e6d5bd --body "your comment"
No comments yet. Be the first to start the discussion.