-
Notifications
You must be signed in to change notification settings - Fork 175
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
fix: update Uname parser to fix LooseVersion comparision error #3814
Conversation
39939fd
to
e949e18
Compare
@xiangce @chenlizhong please help review, thanks! |
1e2b25b
to
8842a7b
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.
Since the pad_release
method is also updated, please add tests to cover the new updates.
Exception: TypeError: '<' not supported between instances of 'str' and 'int' is returned when the fixed_by or introduced_in doesn't have distribution part in release and version and other release parts are the same as current kernel. The detailed update is not doing comparation the distribution part in release. Signed-off-by: Ping Qin <[email protected]>
When _lv_release in self and other both or neither have the distribution part, compare them directly. Otherwise, removing the distribution part first, then doing the comparation without the distribution part and raising a warning. Signed-off-by: Ping Qin <[email protected]>
@qinpingli - you may miss this comment? and btw, since a |
Signed-off-by: Ping Qin <[email protected]>
You are right! Sorry for missing it. Now, new test cases are added, please help take a look again, thanks! |
ffc8155
to
0da0096
Compare
7aca83a
to
5c9cc3b
Compare
Signed-off-by: Ping Qin <[email protected]>
* fix: enhance Uname.fixed_by() Exception: TypeError: '<' not supported between instances of 'str' and 'int' is returned when the fixed_by or introduced_in doesn't have distribution part in release and version and other release parts are the same as current kernel. The detailed update is not doing comparation the distribution part in release. Signed-off-by: Ping Qin <[email protected]> * fix: Update Uname.fixed_by() When _lv_release in self and other both or neither have the distribution part, compare them directly. Otherwise, removing the distribution part first, then doing the comparation without the distribution part and raising a warning. Signed-off-by: Ping Qin <[email protected]> * fix: Add test for pad_release() and warnings in fixed_by() * fix: seperate the test cases for warnings in a different method Signed-off-by: Ping Qin <[email protected]> (cherry picked from commit 0862442)
* fix: enhance Uname.fixed_by() Exception: TypeError: '<' not supported between instances of 'str' and 'int' is returned when the fixed_by or introduced_in doesn't have distribution part in release and version and other release parts are the same as current kernel. The detailed update is not doing comparation the distribution part in release. Signed-off-by: Ping Qin <[email protected]> * fix: Update Uname.fixed_by() When _lv_release in self and other both or neither have the distribution part, compare them directly. Otherwise, removing the distribution part first, then doing the comparation without the distribution part and raising a warning. Signed-off-by: Ping Qin <[email protected]> * fix: Add test for pad_release() and warnings in fixed_by() * fix: seperate the test cases for warnings in a different method Signed-off-by: Ping Qin <[email protected]>
Detailed error is:
TypeError: '<' not supported between instances of 'str' and 'int'
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
The issue is: #3815