-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26822]Upgrade the deprecated module 'optparse' #23730
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
[SPARK-26822]Upgrade the deprecated module 'optparse' #23730
Conversation
|
Yea I noticed it before. |
|
ok to test |
|
Can you keep the PR template? How did you test? |
|
Test build #102024 has finished for PR 23730 at commit
|
|
|
Thanks for the prompt reply and suggestions, I will commit the update ASAP. |
srowen
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.
Looks good pending tests but dev/run-tests.py needs a similar change.
469fa31 to
6e7ba67
Compare
|
Test build #102111 has finished for PR 23730 at commit
|
|
@HyukjinKwon , @felixcheung , @srowen , Thanks for suggestions, I've updated the changes and finished the tests. |
|
Test build #102112 has finished for PR 23730 at commit
|
Solve ValueError: 'int' is not callable
| if failure_count: | ||
| sys.exit(-1) | ||
|
|
||
|
|
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.
Let's remove this newline.
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.
Hi @HyukjinKwon
I add the newline to solve PEP8: expected 2 blank lines after class or function definition, found 1, can we keep the newline here?
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.
If it's for PEP8, keep it.
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.
Yea that's fine. I wonder why it didn't fail by pep8 check before tho.
|
Test build #102113 has finished for PR 23730 at commit
|
|
retest this please |
|
Test build #102115 has finished for PR 23730 at commit
|
|
Test build #102117 has finished for PR 23730 at commit
|
|
Merged to master |
|
@srowen , @felixcheung , @HyukjinKwon Thank you all for helping me to do the work. Best regards, |
Follow the [official document](https://docs.python.org/2/library/argparse.html#upgrading-optparse-code) to upgrade the deprecated module 'optparse' to 'argparse'. ## What changes were proposed in this pull request? This PR proposes to replace 'optparse' module with 'argparse' module. ## How was this patch tested? Follow the [previous testing](apache@7e3eb3c), manually tested and negative tests were also done. My [test results](https://gist.github.com/cchung100m/1661e7df6e8b66940a6e52a20861f61d) Closes apache#23730 from cchung100m/solve_deprecated_module_optparse. Authored-by: cchung100m <cchung100m@cs.ccu.edu.tw> Signed-off-by: Sean Owen <sean.owen@databricks.com>
Follow the official document to upgrade the deprecated module 'optparse' to 'argparse'.
What changes were proposed in this pull request?
This PR proposes to replace 'optparse' module with 'argparse' module.
How was this patch tested?
Follow the previous testing, manually tested and negative tests were also done. My test results