-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use well-defined enum representation #6042
Conversation
a568d8b
to
85b51e0
Compare
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.
The motivation here is that __repr__
changed in 3.10 and we have tests on that, right?
@reaperhulk opinions on doing this vs. just putting a branch in the tests?
.github/workflows/ci.yml
Outdated
@@ -30,6 +30,7 @@ jobs: | |||
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.1.5"}} | |||
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.2.5"}} | |||
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.3.2"}} | |||
- {VERSION: "3.10-dev", TOXENV: "py310", OPENSSL: {TYPE: "openssl", VERSION: "1.1.1k"}} |
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.
This doesn't need an openssl
type, it can just use the default one.
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.
So just {VERSION: "3.10-dev", TOXENV: "py310"}
?
Exactly
…On Mon, May 10, 2021 at 8:32 AM Christian Heimes ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/ci.yml
<#6042 (comment)>:
> @@ -30,6 +30,7 @@ jobs:
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.1.5"}}
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.2.5"}}
- {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.3.2"}}
+ - {VERSION: "3.10-dev", TOXENV: "py310", OPENSSL: {TYPE: "openssl", VERSION: "1.1.1k"}}
So just {VERSION: "3.10-dev", TOXENV: "py310"}?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6042 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBHXZGHPHPRPOJQVAD3TM7G7JANCNFSM44Q644AQ>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Correct, the object and string representation were changed during the alphas. IIRC it changed again between last alpha and first beta. PyCA's tests contain checks for representation of some objects, for example:
Miro asked me to look into the matter to unblock Python 3.10 update for next Fedora release. https://bugzilla.redhat.com/show_bug.cgi?id=1952522 |
Python 3.10 changed enum's object and string representation. PyCA cryptography now uses a custom subclass of enum.Enum() will well-defined __repr__ and __str__ from Python 3.9. Related: https://bugs.python.org/issue40066 Fixes: pyca#5995 Signed-off-by: Christian Heimes <[email protected]>
I think I'm in favor of implementing |
Python 3.10 changed enum's object and string representation. PyCA
cryptography now uses a custom subclass of enum.Enum() will well-defined
__repr__
and__str__
from Python 3.9.Related: https://bugs.python.org/issue40066
Fixes: #5995
Signed-off-by: Christian Heimes [email protected]