Skip to content
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

Replace optparse with argparse #362

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

William-Brown5515
Copy link
Contributor

@William-Brown5515 William-Brown5515 commented Sep 10, 2024

Optparse is deprecated - no longer developed. Mostly a like-for-like replacement, but we use vars on the argparse object to output the values in a similar way to optparse.

The old version option on the constructor is unavailable, and so it has been replaced by adding an argument with the 'version' action.

Resolves #275
Resolves GT-540

@William-Brown5515 William-Brown5515 requested a review from a team as a code owner September 10, 2024 12:39
@tofu-rocketry tofu-rocketry self-assigned this Sep 10, 2024
@tofu-rocketry tofu-rocketry added this to the 4.0.0 milestone Sep 10, 2024
bin/receiver.py Outdated Show resolved Hide resolved
bin/receiver.py Outdated Show resolved Hide resolved
Copy link
Member

@tofu-rocketry tofu-rocketry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there. Just note that it's best to just add commits, rather than amend, while code is under review as it makes it easier to see what's changed between each review.

bin/receiver.py Outdated Show resolved Hide resolved
bin/receiver.py Outdated Show resolved Hide resolved
bin/sender.py Outdated Show resolved Hide resolved
Optparse is deprecated - no longer developed. Mostly a like-for-like
replacement, but we use vars on the argparse object to output the
values in a similar way to optparse.

The old version option on the constructor is unavailable, and so it has
been replaced by adding an argument with the 'version' action.
Removal of 'optional' on deprecated arguments, using only 'ver' for
version numbers, removal of unnecessary parentheses.
@tofu-rocketry tofu-rocketry merged commit b8772d3 into apel:dev Sep 11, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

optparse deprecating
2 participants