-
Notifications
You must be signed in to change notification settings - Fork 419
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mhils
reviewed
Aug 6, 2024
src/OpenSSL/crypto.py
Outdated
ed448.Ed448PrivateKey, | ||
rsa.RSAPrivateKey, | ||
] | ||
# TODO: Turn this into `PublicKey | PrivateKey` once we use `|`. |
There was a problem hiding this comment.
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]
Not on older pythons
…On Tue, Aug 6, 2024, 9:30 AM Maximilian Hils ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/OpenSSL/crypto.py
<#1348 (comment)>:
> @@ -84,6 +84,14 @@
]
+_PrivateKey = Union[
+ dsa.DSAPrivateKey,
+ ec.EllipticCurvePrivateKey,
+ ed25519.Ed25519PrivateKey,
+ ed448.Ed448PrivateKey,
+ rsa.RSAPrivateKey,
+]
+# TODO: Turn this into `PublicKey | PrivateKey` once we use `|`.
Can't we do that right away?
>>> a = Union[1,2]>>> b = Union[3,4]>>> Union[a,b]typing.Union[1, 2, 3, 4]
—
Reply to this email directly, view it on GitHub
<#1348 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBBY3S7BWLDZBWCFBQ3ZQDFYRAVCNFSM6AAAAABMCHLMESVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMRRGMYTONZYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
> 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) |
Ohhh, yeah, i guess I didn't try that. Will fix this evening
…On Tue, Aug 6, 2024, 9:59 AM Maximilian Hils ***@***.***> wrote:
> docker run --rm -it python:3.7.0Python 3.7.0 (default, Oct 16 2018, 07:10:55)
[GCC 6.3.0 20170516] on linuxType "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)
—
Reply to this email directly, view it on GitHub
<#1348 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBGRHDB6NUZTWY26CB3ZQDJFJAVCNFSM6AAAAABMCHLMESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRGM3DSNRRGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Allow passing cryptography keys instead. Refs pyca#1321
mhils
approved these changes
Aug 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow passing cryptography keys instead.
Refs #1321