Skip to content


Warn on old config files #414

wants to merge 2 commits into from

2 participants

IPython member

add check_for_old_config() to utils.path, which warns users about old config files, and point them to new ones. Launching IPython will continue to raise the warning until you update your config files.

Should address #304.

Are there other config files I should check for besides '' and 'ipythonrc'?

IPython member

Is it worth adding some way to suppress the message without removing the config files? If users are running both 0.10 and 0.11 (e.g. to port their parallel code to the new architecture), it could get annoying.

Also, an equivalent warning in the Qt console might be helpful, although I guess there's less expectation that the old config would affect that.

@minrk minrk add ignore_old_config configurable
for users who still use multiple versions of IPython
IPython member

Sure, I added the configurable to suppress the warnings.

The Qt Console doesn't use any configuration at all (see #175), but once it does the warning will be added to its Application.

IPython member

OK, thanks. This looks good to me.

@minrk minrk added a commit that closed this pull request
@minrk minrk add ignore_old_config configurable
for users who still use multiple versions of IPython

closes gh-414
@minrk minrk closed this in 3273c8c
@dpsanders dpsanders referenced this pull request in minrk/ipython
@minrk minrk update nbconvert doc
update to new CLI

remove documentation of ill-advised `--script` option.
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request
@minrk minrk add ignore_old_config configurable
for users who still use multiple versions of IPython

closes gh-414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 4, 2011
  1. @minrk

    add check_for_old_config to warn users about old config files, and po…

    minrk committed
    …int them to new ones
    closes gh-304
Commits on May 5, 2011
  1. @minrk

    add ignore_old_config configurable

    minrk committed
    for users who still use multiple versions of IPython
Showing with 29 additions and 1 deletion.
  1. +4 −0 IPython/config/default/
  2. +3 −1 IPython/frontend/terminal/
  3. +22 −0 IPython/utils/
4 IPython/config/default/
@@ -11,6 +11,10 @@
# c.Global.nosep = True
+# If you still use multiple versions of IPytho on the same machine,
+# set this to True to suppress warnings about old configuration files
+# c.Global.ignore_old_config = False
# Set this to determine the detail of what is logged at startup.
# The default is 30 and possible values are 0,10,20,30,40,50.
# c.Global.log_level = 20
4 IPython/frontend/terminal/
@@ -37,7 +37,7 @@
from IPython.lib import inputhook
-from IPython.utils.path import filefind, get_ipython_dir
+from IPython.utils.path import filefind, get_ipython_dir, check_for_old_config
from IPython.core import usage
@@ -635,6 +635,8 @@ def _run_cmd_line_code(self):
def start_app(self):
+ if not getattr(self.master_config.Global, 'ignore_old_config', False):
+ check_for_old_config(self.ipython_dir)
if self.master_config.Global.interact:
self.log.debug("Starting IPython's mainloop...")
22 IPython/utils/
@@ -18,6 +18,7 @@
import sys
import IPython
+from IPython.utils import warn
from IPython.utils.process import system
from IPython.utils.importstring import import_item
@@ -399,3 +400,24 @@ def target_update(target,deps,cmd):
if target_outdated(target,deps):
+def check_for_old_config(ipython_dir=None):
+ """Check for old config files, and present a warning if they exist.
+ A link to the docs of the new config is included in the message.
+ This should mitigate confusion with the transition to the new
+ config system in 0.11.
+ """
+ if ipython_dir is None:
+ ipython_dir = get_ipython_dir()
+ old_configs = ['', 'ipythonrc']
+ for cfg in old_configs:
+ f = os.path.join(ipython_dir, cfg)
+ if os.path.exists(f):
+ warn.warn("""Found old IPython config file %r.
+ The IPython configuration system has changed as of 0.11, and this file will be ignored.
+ See for details on the new config system.
+ The current default config file is '', where you can suppress these
+ warnings with `Global.ignore_old_config = True`."""%f)
Something went wrong with that request. Please try again.