From 90dbfc36a67de3f58bc1686ce4d61f77fe2ec142 2013-07-29 18:27:09 From: MinRK Date: 2013-07-29 18:27:09 Subject: [PATCH] cleanup pylab deprecation extra substitution was unnecessary because argparse supports passing args with spaces --- diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 963115a..793294a 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -297,16 +297,9 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): # warn and transform into current syntax argv = argv[:] # copy, don't clobber idx = argv.index('-pylab') - warn.warn("`-pylab` and `--pylab` flags have been deprecated.\n" - " Use `--matplotlib=` and import pylab manually.") - sub = '--pylab' - if len(argv) > idx+1: - # check for gui arg, as in '-pylab qt' - gui = argv[idx+1] - if gui in ('wx', 'qt', 'qt4', 'gtk', 'auto'): - sub = '--pylab='+gui - argv.pop(idx+1) - argv[idx] = sub + warn.warn("`-pylab` flag has been deprecated.\n" + " Use `--matplotlib ` and import pylab manually.") + argv[idx] = '--pylab' return super(TerminalIPythonApp, self).parse_command_line(argv)