-
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
tests are failing with Python 3.10.0a7 due to change in repr() #5995
Comments
Grumble. Ok, so we'll need to add an |
You could check name and value of each member instead of repr(). |
The whole point of that test is to check the repr.
…On Thu, Apr 22, 2021 at 9:40 AM Christian Heimes ***@***.***> wrote:
You could check name and value of each member instead of repr().
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5995 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBEDCKDTHAD4WPZ4ZL3TKARMPANCNFSM43MOYD6Q>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
If the repr is tested/guaranteed API, consider adding an explicit |
We do define explicit repr, for example: cryptography/src/cryptography/x509/extensions.py Lines 1022 to 1023 in 063a204
Edit: Oops I should really read the whole thing. We obviously don't have explicit reprs on our Enum subclasses. Adding those may be the path of least resistance. Certainly an option. |
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]>
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]>
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]>
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]>
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]>
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]>
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]>
There were some changes in repr() in 7th alpha of Python 3.10.
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-7
bpo-40066: Enum: adjust repr() to show only enum and member name (not value, nor angle brackets) and str() to show only member name. Update and improve documentation to match.
bpo-40066: Enum’s repr() and str() have changed: repr() is now EnumClass.MemberName and str() is MemberName. Additionally, stdlib Enum’s whose contents are available as module attributes, such as RegexFlag.IGNORECASE, have their repr() as module.name, e.g. re.IGNORECASE.
https://bugs.python.org/issue40066
Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1952522
The text was updated successfully, but these errors were encountered: