feat(python): add HttpConfig transport configuration - #3992
Conversation
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
ethanlin01x
left a comment
There was a problem hiding this comment.
I ran this locally and it works well. I have a few suggestions, mostly around tests and docs.
| logger.info("Connecting to IggyClient") | ||
| await client.connect() | ||
| logger.info("Connected.") | ||
| # HTTP is a stateless transport: log in explicitly rather than relying |
There was a problem hiding this comment.
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.
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.
89fddbd to
2eaaada
Compare
|
@ethanlin01x Could you please check now. |
slbotbm
left a comment
There was a problem hiding this comment.
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 | ...).
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
AI Usage
Claude Sonnet 5