Permalink
Browse files

Don't touch config files during install. (report by Thomas Ballinger)

  • Loading branch information...
1 parent 460fc0c commit bbea96bf5fcd3cfc9b048b9fdb65905e2aedf0f9 @inducer committed Jun 6, 2012
Showing with 12 additions and 15 deletions.
  1. +0 −7 pudb/__init__.py
  2. +10 −6 pudb/debugger.py
  3. +1 −1 pudb/source_view.py
  4. +1 −1 pudb/var_view.py
View
7 pudb/__init__.py
@@ -4,13 +4,6 @@
-from pudb.settings import load_config, save_config
-CONFIG = load_config()
-save_config(CONFIG)
-
-
-
-
CURRENT_DEBUGGER = []
def _get_debugger():
if not CURRENT_DEBUGGER:
View
16 pudb/debugger.py
@@ -5,7 +5,13 @@
import urwid
import bdb
-from pudb import CONFIG
+from pudb.settings import load_config, save_config
+CONFIG = load_config()
+save_config(CONFIG)
+
+
+
+
HELP_TEXT = """\
@@ -541,7 +547,6 @@ def insert_watch(w, size, key):
# {{{ stack listeners
def examine_frame(w, size, key):
- from pudb import CONFIG
_, pos = self.stack_list._w.get_focus()
self.debugger.set_frame_index(self.translate_ui_stack_index(pos))
@@ -1259,8 +1264,7 @@ def event_loop(self, toplevel=None):
self.message("Package 'pygments' not found. "
"Syntax highlighting disabled.")
- from pudb import CONFIG
- WELCOME_LEVEL = "e004"
+ WELCOME_LEVEL = "e005"
if CONFIG["seen_welcome"] < WELCOME_LEVEL:
CONFIG["seen_welcome"] = WELCOME_LEVEL
from pudb import VERSION
@@ -1274,6 +1278,8 @@ def event_loop(self, toplevel=None):
"look familiar.\n\n"
"If you're new here, welcome! The help screen (invoked by hitting "
"'?' after this message) should get you on your way.\n"
+ "\nChanges in version 2012.2.1:\n\n"
+ "- Don't touch config files during install.\n"
"\nChanges in version 2012.2:\n\n"
"- Add support for BPython as a shell.\n"
"- You can now run 'python -m pudb script.py' on Py 2.6+.\n"
@@ -1476,8 +1482,6 @@ def make_frame_ui(frame_lineno):
code.co_name, class_name,
self._format_fname(code.co_filename), lineno)
- from pudb import CONFIG
-
frame_uis = [make_frame_ui(fl) for fl in self.debugger.stack]
if CONFIG["current_stack_frame"] == "top":
frame_uis = frame_uis[::-1]
View
2 pudb/source_view.py
@@ -32,7 +32,7 @@ def rows(self, (maxcol,), focus=False):
return 1
def render(self, (maxcol,), focus=False):
- from pudb import CONFIG
+ from pudb.debugger import CONFIG
render_line_nr = CONFIG["line_numbers"]
hscroll = self.dbg_ui.source_hscroll_start
View
2 pudb/var_view.py
@@ -9,7 +9,7 @@
except ImportError:
HAVE_NUMPY = 0
-from pudb import CONFIG
+from pudb.debugger import CONFIG
# data ------------------------------------------------------------------------
class FrameVarInfo(object):

1 comment on commit bbea96b

@thomasballinger

Great, thanks! Fixed for me now (sudo pip uninstall on a system Python, rm -r .config/pudb, sudo pip install; as far as I know this should be enough to test this)

Please sign in to comment.