Skip to content

Conversation

@modocache
Copy link
Contributor

What's in this pull request?

optparse was marked deprecated as of Python 2.7. Use its replacement, argparse. It comes with some handy features that make setting up the argument parsing a tad simpler.

Why merge this pull request?

Besides the fact that optparse is deprecated and no longer maintained, it also does not support features argparse does. The full list is here: https://www.python.org/dev/peps/pep-0389/#why-aren-t-getopt-and-optparse-enough

What downsides are there to merging this pull request?

One could argue that optparse is working out just fine for this project for now, and that a change this large confuses git blame too much to be worth it.

args = parser.parse_args()

# When invoked via Xcode, it will automatically be passed a "build action".
if len(args) == 0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, my bad--I hadn't caught this aspect of the argument parsing. This replacement probably won't work as-is--let me keep working on this.

optparse was marked deprecated as of Python 2.7. Use its replacement,
argparse. It comes with some handy features that make setting up the
argument parsing a tad simpler.
@ddunbar
Copy link
Contributor

ddunbar commented Feb 20, 2016

LGTM, aside from the one comment I made on the commit.

modocache referenced this pull request in modocache/swift-package-manager Feb 20, 2016
optparse was marked deprecated as of Python 2.7. Use its replacement,
argparse. It comes with some handy features that make setting up the
argument parsing a tad simpler.
@modocache
Copy link
Contributor Author

@ddunbar I've addressed your comment: modocache@b93a048#commitcomment-16219249 -- thanks for the quick reviews!! 💨

@ddunbar
Copy link
Contributor

ddunbar commented Feb 20, 2016

Looks good, thanks!

ddunbar added a commit that referenced this pull request Feb 20, 2016
[bootstrap] Replace optparse with argparse (NFC)
@ddunbar ddunbar merged commit 6b8ec91 into swiftlang:master Feb 20, 2016
@modocache modocache deleted the argparse branch February 20, 2016 13:57
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
[tests] Add explicit test for synthetic edges on directory tree nodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants