Skip to content

feat(python): add QUIC, HTTP, and WebSocket transport support - #3790

Open
saie-ch wants to merge 1 commit into
apache:masterfrom
saie-ch:python_feat_protocol
Open

feat(python): add QUIC, HTTP, and WebSocket transport support#3790
saie-ch wants to merge 1 commit into
apache:masterfrom
saie-ch:python_feat_protocol

Conversation

@saie-ch

@saie-ch saie-ch commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Closes #2835

Rationale:

The Python SDK only exposed TCP via IggyClient(). QUIC, HTTP, and WebSocket were reachable only through the untested
from_connection_string() path — no constructors, no docs, no examples, no tests.

What changed?

Added IggyClient.tcp/quic/http/websocket() classmethods mirroring the Rust builder's with_tcp/with_quic/with_http/with_websocket(). Fixed
a QUIC bug along the way: quinn::Endpoint::client needs an active Tokio runtime, which a synchronous Python call site doesn't have — both
quic() and from_connection_string() now enter it explicitly. Added integration tests, examples, and CI wiring for all three
previously-untested transports.

Local Execution:

  • Passed
  • Pre-commit hooks ran (prek run) — ruff, pyrefly, cargo fmt, markdownlint, typos all clean. cargo clippy -D warnings run manually against
    foreign/python (excluded from the root workspace, so the repo's pre-push hook doesn't reach it). Built server + extension locally, ran
    full pytest suite (337 passed, only pre-existing Docker-dependent TLS tests skipped for lack of a daemon), and manually exercised all
    three new example pairs end-to-end.

AI Usage:

Claude Code (Sonnet).
Built iggy-server and the Python extension locally, ran the full pytest suite against a live 4-transport server (337 passed), and manually ran all three new example pairs (QUIC/HTTP/WebSocket producer+consumer) end-to-end. Also ran cargo clippy -D warnings, cargo fmt, ruff check/format, pyrefly, and markdownlint, and confirmed the diff stayed scoped to only foreign/python, examples/python, and CI config with nothing touching core/sdk or other SDKs

Closes apache#2835. Adds explicit IggyClient.tcp/quic/http/websocket()
constructors mirroring the Rust builder, fixes a QUIC connection-string
bug (endpoint creation needs an active Tokio runtime), and adds
tests/examples/CI/docs for all three previously-untested transports.
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 1, 2026
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.72727% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.55%. Comparing base (53a7ff9) to head (261062d).

Files with missing lines Patch % Lines
foreign/python/src/client.rs 92.72% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3790      +/-   ##
============================================
- Coverage     75.58%   75.55%   -0.03%     
  Complexity      969      969              
============================================
  Files          1317     1317              
  Lines        155244   155354     +110     
  Branches     128866   128946      +80     
============================================
+ Hits         117339   117384      +45     
+ Misses        34361    34343      -18     
- Partials       3544     3627      +83     
Components Coverage Δ
Rust Core 75.56% <ø> (+<0.01%) ⬆️
Java SDK 62.71% <ø> (ø)
C# SDK 71.13% <ø> (-1.20%) ⬇️
Python SDK 92.31% <92.72%> (+0.04%) ⬆️
PHP SDK 84.52% <ø> (ø)
Node SDK 95.30% <ø> (+0.10%) ⬆️
Go SDK 43.08% <ø> (ø)
Files with missing lines Coverage Δ
foreign/python/src/client.rs 98.12% <92.72%> (-1.02%) ⬇️

... and 52 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@slbotbm

slbotbm commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR. I'll review this after #3776 has been merged.

/request-review @slbotbm

@github-actions
github-actions Bot requested a review from slbotbm August 1, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(python): Add QUIC, HTTP, and WebSocket Transport Protocol Support to Python SDK

2 participants