Commit Graph

7 Commits

Author SHA1 Message Date
Evan
51cf2cdfda fix(ssh-tunnel): address re-review feedback on _load_private_key
- add circular-import justification comment on the deferred get_default_port import
- drop no-op continue in the per-type loop
- add NOTE clarifying last_exc reflects the final (RSAKey) attempt
- clarify docstring re paramiko 3.2+ PKey.from_path() and why it's unsafe here
- strengthen ed25519/RSA tests with isinstance assertions on the parsed key type
- add test for passphrase-protected key without password (PasswordRequiredException)
- add test for an unparseable key (SSHException listing all attempted types)
- de-duplicate test setup via _make_manager / _make_ssh_tunnel helpers
- consistent assertion messages across key-type tests

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 10:25:30 -07:00
Amin Ghadersohi
5a6cdd8e06 fix(ssh-tunnel): address review feedback on _load_private_key
- Re-raise PasswordRequiredException immediately instead of absorbing it
  into the try-next-type loop, so callers see an actionable "key requires
  passphrase" error rather than "Unable to parse"
- Add `from last_exc` to the final raise to preserve the exception chain
  for traceback tools (Sentry et al.)
- Narrow last_exc type annotation to SSHException | None
- Add test_create_tunnel_accepts_ecdsa_private_key (NIST P-256) to cover
  the third entry in _SSH_KEY_TYPES
- Move RSA and ECDSA crypto imports to module level (rm inline import)
2026-05-21 20:48:31 +00:00
Claude Code
da76c68158 test(ssh-tunnel): assert ed25519 SSH keys load for tunnel setup
Closes #24180

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 20:48:31 +00:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Hugh A. Miles II
eb05225f0d feat(sshtunnel): add configuration for SSH_TIMEOUT (#24369) 2023-06-13 12:29:40 -04:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Hugh A. Miles II
8b0c68c0d2 chore(ssh): Allow users to set TUNNEL_TIMEOUT from config (#24202) 2023-05-24 16:25:02 -04:00