-
Notifications
You must be signed in to change notification settings - Fork 1.7k
AMBARI-26070: Ambari throws SyntaxWarnings after moving to Python3 #3781
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
Conversation
Resolves "is" and "is not" compiler warnings introduced in python 3.8 when comparing literals. See https://discuss.python.org/t/demoting-the-is-operator-to-avoid-an-identity-crisis/86 for more details.
|
The changes look good overall. @JiaLiangC you also want to take a look? |
|
@virajjasani I encountered a similar warning message, and this modification looks good. |
|
Thanks @Danori, I encountered these warnings too. It appears in python 3.8+. |
virajjasani
left a comment
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.
+1
|
Thank you @JiaLiangC @Danori @wenwj0, merging the PR |
|
Oh looks like my commit didn't follow the typical conventions; would you guys like me to amend my commit before we merge? |
|
Looks like my bad, i did squash & merge, not sure why the PR title was not retained. Sorry about that. |
|
If you want to create the PR again, let me revert the commit first and then you can re-create the PR. |
|
Alright, I have taken care of this, no worries. Thank you everyone, once again! |
What changes were proposed in this pull request?
Resolves "is" and "is not" compiler warnings introduced in python 3.8 when comparing literals.
See https://discuss.python.org/t/demoting-the-is-operator-to-avoid-an-identity-crisis/86 for more details.
Before:

After:

How was this patch tested?
Manual test / validation in custom Rocky Linux 9 docker environment (planning on contributing support for Redhat 9 in the near future)
Please review Ambari Contributing Guide before opening a pull request.