Skip to content

[paramiko] Update to 5.1.* - #16640

Open
hoangchunghien wants to merge 1 commit into
python:mainfrom
hoangchunghien:paramiko-5.1
Open

hoangchunghien wants to merge 1 commit into
python:mainfrom
hoangchunghien:paramiko-5.1

Conversation

@hoangchunghien

Copy link
Copy Markdown
Contributor

Closes: #16561

stubtest failed on the stubsabot bump with one error: paramiko.kex_mlkem failed to find stubs. paramiko 5.1 adds that module for the mlkem768x25519-sha256 hybrid key exchange (ML-KEM-768 with X25519), and Transport prefers it when it is available.

The new kex_mlkem.pyi follows kex_curve25519.pyi: the two message constants, and KexMLKEM768X25519 with name, hash_algo, transport, the two private keys, is_available, start_kex and parse_next.

mlkem_key holds a cryptography.hazmat.primitives.asymmetric.mlkem.MLKEM768PrivateKey, which only exists from cryptography 48, while these stubs require cryptography>=37.0.0. Rather than raise that floor, I typed it as Incomplete | None with a comment. Happy to switch to the real type and bump the dependency if you prefer.

stubtest for paramiko 5.1, mypy_test.py stubs/paramiko, pyright_test.py stubs/paramiko (with cryptography installed), black, ruff and flake8 pass locally.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant