ethanlin01x opened a new pull request, #3776:
URL: https://github.com/apache/iggy/pull/3776

   ## Which issue does this PR address?
   
   Closes #3742
   
   ## Rationale
   
   The Python binding accepts only a bare server address, so reconnection and 
auto-login cannot be configured from Python, which makes the SDK's session 
recovery (#2880) unreachable: a session dropped by a server restart surfaces as 
`Unauthenticated` on the next call and applications have to hand-roll 
connect/login/probe retry loops.
   
   ## What changed?
   
   `IggyClient(...)` only took `host:port`, with `AutoLogin::Disabled` 
hardcoded and the reconnection policy untunable. It now also accepts a 
`TcpConfig` mirroring the Rust `TcpClientConfig` (`auto_login`, `reconnection`, 
`heartbeat_interval`, the TLS options, `nodelay`), keyword-only, with every 
unset field falling back to the Rust default instead of a value duplicated in 
the binding. Durations are `datetime.timedelta` validated at construction, 
which also fixes the pre-existing conversion that cast a negative timedelta 
into a huge unsigned duration. Type names follow the maintainer's guidance in 
the issue (`TcpConfig`, `TcpReconnectionConfig`); scope is TCP only, and the 
bare-address constructor and `from_connection_string` are unchanged.
   
   ## Local Execution
   
   - Passed
   - Pre-commit hooks ran
   
   ## AI Usage
   
   1. Tools:  Code.
   2. Scope: Claude was used to help generate and review this PR and all the 
changes are checked by the human.
   3. Verification: `cargo check` and `cargo clippy --all-features 
--all-targets -- -D warnings` pass; unit tests cover defaults, round-trips and 
duration validation, and integration tests against a real server prove 
credentials are replayed on connect without a manual `login_user()`.
   4. Yes.
   
   
   1. Which tools? Claude
   2. Scope of usage? help generate and review this PR
   3. How did you verify the generated code works correctly?  Integration tests 
against a real server prove credentials are replayed on connect without a 
manual `login_user()`.
   4. Can you explain every line of the code if asked? Yes, all the changes are 
checked by the human.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to