Skip to content

feat(python): add HttpConfig transport configuration - #3992

Open
saie-ch wants to merge 3 commits into
apache:masterfrom
saie-ch:python-http-config
Open

feat(python): add HttpConfig transport configuration#3992
saie-ch wants to merge 3 commits into
apache:masterfrom
saie-ch:python-http-config

Conversation

@saie-ch

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

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Relates to #2835.

Rationale

Python's HTTP transport was only reachable through the untested from_connection_string() path, with no config object like TCP got in #3776.

What changed?

Added HttpConfig, accepted by IggyClient.http(...), mirroring the TcpConfig pattern.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

Claude Sonnet 5

@github-actions

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 29, 2026
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.93%. Comparing base (5916e6f) to head (2eaaada).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
foreign/python/src/config.rs 96.61% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3992      +/-   ##
============================================
+ Coverage     84.91%   84.93%   +0.02%     
  Complexity     1405     1405              
============================================
  Files          1224     1224              
  Lines        179301   179371      +70     
  Branches     145615   145614       -1     
============================================
+ Hits         152250   152350     +100     
+ Misses        23024    22974      -50     
- Partials       4027     4047      +20     
Components Coverage Δ
Rust Core 85.80% <ø> (+<0.01%) ⬆️
Java SDK 67.35% <ø> (ø)
C# SDK 75.47% <ø> (+0.08%) ⬆️
Python SDK 90.27% <97.14%> (+0.20%) ⬆️
PHP SDK 85.65% <ø> (ø)
Node SDK 96.24% <ø> (+0.11%) ⬆️
Go SDK 69.29% <ø> (+0.03%) ⬆️
Files with missing lines Coverage Δ
foreign/python/src/client.rs 99.85% <100.00%> (+<0.01%) ⬆️
foreign/python/src/lib.rs 100.00% <100.00%> (ø)
foreign/python/src/config.rs 96.93% <96.61%> (-0.10%) ⬇️

... and 44 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.

@ethanlin01x ethanlin01x left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I ran this locally and it works well. I have a few suggestions, mostly around tests and docs.

Comment thread foreign/python/tests/test_http_config.py
Comment thread foreign/python/tests/test_http_config.py
Comment thread examples/python/http/producer.py Outdated
logger.info("Connecting to IggyClient")
await client.connect()
logger.info("Connected.")
# HTTP is a stateless transport: log in explicitly rather than relying

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: "stateless" is loose here - HttpClient does hold a JWT and swaps it on /users/refresh-token. It explains the missing reconnection policy fine, but not the missing auto-login. The second half of the sentence already gives the real reason, so dropping the first clause would be enough. Same in consumer.py and the README.

Comment thread foreign/python/tests/test_http_config.py
Comment thread foreign/python/tests/test_http_config.py Outdated
Assert heartbeat_interval in config tests, add a real HTTP send/poll
round trip, rename TestClientConstruction to avoid colliding with
test_client_config.py, and drop the inaccurate "stateless" framing
around the missing AutoLogin.
@saie-ch
saie-ch force-pushed the python-http-config branch from 89fddbd to 2eaaada Compare August 31, 2026 04:21
@saie-ch

saie-ch commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

@ethanlin01x Could you please check now.

@slbotbm slbotbm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As was requested in the websocket pr: fold the http config example into existing examples as comments, and change the exposed API signature to IggyClient( ... | HttpConfig | ...).

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author PR is waiting on author response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants