-
Notifications
You must be signed in to change notification settings - Fork 75
Fix #24: Migrate FuseArgs
away from using Optparse
#95
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
base: master
Are you sure you want to change the base?
Conversation
This is the first of a 3-patch series of commits to address libfuse#24 This commit introduces tests for the current `Optparse` based implementation to ensure that the next commit doesn't break current usage compatibility. The next commit would introduce the `ArgumentParser` based implementation. The final commit will attempt to do some minor clean up to make the code a bit more idomatic / pythonic.
This PR changes the `Optparse` based implementation to one base on `ArgumentParser` for `FuseArgs`, without touching the tests introduced in the previous commit. We delete the `subbedopts` sub-module and implemented all of the argument parsing/handling in the main Fuse/FuseArgs implementation.
The PR is split into distinct commits:
This ensures that we maintain backwards compatibility. I could break these into 2 separate PRs if that would be easier to review / track. |
FuseArgs
away from using Optparse
Seems like there's a bit more work left on this w.r.t parsing strings that have implicit arguments such as Aside: It might seem like we'd have to add some deprecation messages for code that relies on |
Thanks, that looks promising. Please fix the tests that fail to now start in the CI, and we'll then take it from there. |
@lonetwin can you please rebase on |
This PR addresses #24. It replaces the
Optpase
based implementation ofFuseArgs
to one based onArgumentParser
and also adds some tests for the parsing functionality.