Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate passing PKey instances to use_privatekey #1348

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

alex
Copy link
Member

@alex alex commented Aug 6, 2024

Allow passing cryptography keys instead.

Refs #1321

ed448.Ed448PrivateKey,
rsa.RSAPrivateKey,
]
# TODO: Turn this into `PublicKey | PrivateKey` once we use `|`.
Copy link
Member

Choose a reason for hiding this comment

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

Can't we do that right away?

>>> a = Union[1,2]
>>> b = Union[3,4]
>>> Union[a,b]
typing.Union[1, 2, 3, 4]

@alex
Copy link
Member Author

alex commented Aug 6, 2024 via email

@mhils
Copy link
Member

mhils commented Aug 6, 2024

> docker run --rm -it python:3.7.0
Python 3.7.0 (default, Oct 16 2018, 07:10:55)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing import Union
>>> a = Union[str, int]
>>> b = Union[bool, float]
>>> Union[a,b]
typing.Union[str, int, bool, float]

This looks ok to me? (I've also tested 3.8-3.10)

@alex
Copy link
Member Author

alex commented Aug 6, 2024 via email

Allow passing cryptography keys instead.

Refs pyca#1321
@mhils mhils merged commit b0cb4b4 into pyca:main Aug 6, 2024
35 checks passed
@alex alex deleted the pkey-deprecation branch August 6, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants