-
Notifications
You must be signed in to change notification settings - Fork 5
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
switch from optparse to argparse #24
Comments
@nikolas, just a few hints to get you started, if you don't mind:
try:
from argparse import ArgumentParser # New since Python 2.7
parser = ArgumentParser()
except ImportError:
from optparse import OptionParser # Deprecated since Python 2.7
parser = OptionParser()
parser.add_argument = parser.add_option # use add_argument in any case
parser.add_argument('foo', help='foo does bar and baz')
# ... and a similar try-except block for the actual parsing and evaluation |
@bittner thanks for the tips! |
Another note: I just see, until Django 1.7 optparse's See Also |
This deprecation warning is a bit annoying. Any news? |
This affects Anything else? What is the exact deprecation warning, and when does it occur? (I don't notice any with Python 3.4 and Django 1.8) |
@mixxorz We should address this deprecation warning now that we're under the hood of the |
Closing this issue in favor of issue 2 in |
I noticed
behave.py
usesoptparse
.. I think we should switch toargparse
as it's better supported.From https://docs.python.org/2/library/optparse.html
I'll try to make a PR for this at some point, unless you get to it before I do.
The text was updated successfully, but these errors were encountered: