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 flake 8 style warnings (issue #7925) #7952
Conversation
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/ through the 2to3 (https://docs.python.org/2/library/2to3.html). Checked the result, fixed: - 'maxint' -> 'maxsize' that 2to3 missed. - 'cmp=' parameter for a 'sorted()' with a 'key=' version. - try/except wrapping of configparser import as there are still python 2.7 systems that lack a compatibility shim Signed-off-by: Gregor Kopka <gregor@kopka.net> Closes openzfs#7925
Codecov Report
@@ Coverage Diff @@
## master #7952 +/- ##
==========================================
+ Coverage 78.49% 78.6% +0.11%
==========================================
Files 376 376
Lines 114030 114030
==========================================
+ Hits 89508 89634 +126
+ Misses 24522 24396 -126
Continue to review full report at Codecov.
|
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.
Thanks for the quick fix. I verified this is now working as expected on all of the TEST builders.
|
@GregorKopka are there any remaining concerns that this won't work with python 2.6? The CentOS 6 builder appears to be fine, but I wanted to double check. |
|
@behlendorf As I buried my last python 2.6 installation over half a decade ago I have no way to test them on an actual living interpreter - should you feel unsure you might have to ask someone who is either versed in necromancy or has access to a system with 2.6 to test it there. That being said, as the changes I made to make the scripts compatible with python 3 don't use any new constructs or language features, no external stuff (apart from the configparser module name) was touched and they run on the CentOS 6 builders... it should be fine. |
|
Since everything does work on the CentOS 6 builder, I'm good with this. |
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/ through the 2to3 (https://docs.python.org/2/library/2to3.html). Checked the result, fixed: - 'maxint' -> 'maxsize' that 2to3 missed. - 'cmp=' parameter for a 'sorted()' with a 'key=' version. - try/except wrapping of configparser import as there are still python 2.7 systems that lack a compatibility shim Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregor Kopka <gregor@kopka.net> Closes openzfs#7925 Closes openzfs#7952
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/ through the 2to3 (https://docs.python.org/2/library/2to3.html). Checked the result, fixed: - 'maxint' -> 'maxsize' that 2to3 missed. - 'cmp=' parameter for a 'sorted()' with a 'key=' version. - try/except wrapping of configparser import as there are still python 2.7 systems that lack a compatibility shim Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregor Kopka <gregor@kopka.net> Closes openzfs#7925 Closes openzfs#7952
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/ through the 2to3 (https://docs.python.org/2/library/2to3.html). Checked the result, fixed: - 'maxint' -> 'maxsize' that 2to3 missed. - 'cmp=' parameter for a 'sorted()' with a 'key=' version. - try/except wrapping of configparser import as there are still python 2.7 systems that lack a compatibility shim Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregor Kopka <gregor@kopka.net> Closes openzfs#7925 Closes openzfs#7952
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/ through the 2to3 (https://docs.python.org/2/library/2to3.html). Checked the result, fixed: - 'maxint' -> 'maxsize' that 2to3 missed. - 'cmp=' parameter for a 'sorted()' with a 'key=' version. - try/except wrapping of configparser import as there are still python 2.7 systems that lack a compatibility shim Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Gregor Kopka <gregor@kopka.net> Closes #7925 Closes #7952
Motivation and Context
Issue #7925
Description
Ran zts-report.py and test-runner.py from ./tests/test-runner/bin/
through the 2to3 (https://docs.python.org/2/library/2to3.html).
Checked the result, fixed:
python 2.7 systems that lack a compatibility shim
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by.