From aa93c3d3d6dc67643ba4ff5482f23104589f1409 2006-12-05 21:02:40 From: vivainio Date: 2006-12-05 21:02:40 Subject: [PATCH] rocky's pydb patch \#4 --- diff --git a/IPython/Debugger.py b/IPython/Debugger.py index 913762c..25039c1 100644 --- a/IPython/Debugger.py +++ b/IPython/Debugger.py @@ -15,7 +15,7 @@ details on the PSF (Python Software Foundation) standard license, see: http://www.python.org/2.2.3/license.html -$Id: Debugger.py 1955 2006-11-29 09:44:32Z vivainio $""" +$Id: Debugger.py 1961 2006-12-05 21:02:40Z vivainio $""" #***************************************************************************** # @@ -97,11 +97,14 @@ class Pdb(OldPdb): stdin=None, stdout=None): # Parent constructor: - OldPdb.__init__(self,completekey,stdin,stdout) + if has_pydb and completekey is None: + OldPdb.__init__(self,stdin=stdin,stdout=stdout) + else: + OldPdb.__init__(self,completekey,stdin,stdout) + self.prompt = prompt # The default prompt is '(Pdb)' # IPython changes... - self.prompt = prompt # The default prompt is '(Pdb)' - self.is_pydb = prompt == 'ipydb>' + self.is_pydb = has_pydb if self.is_pydb: @@ -117,7 +120,6 @@ class Pdb(OldPdb): self.old_all_completions = __IPYTHON__.Completer.all_completions __IPYTHON__.Completer.all_completions=self.all_completions - # Do we have access to pydb's list command parser? self.do_list = decorate_fn_with_doc(self.list_command_pydb, OldPdb.do_list) self.do_l = self.do_list diff --git a/IPython/Magic.py b/IPython/Magic.py index fa27c88..d7bf19c 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Magic functions for InteractiveShell. -$Id: Magic.py 1956 2006-11-30 05:22:31Z fperez $""" +$Id: Magic.py 1961 2006-12-05 21:02:40Z vivainio $""" #***************************************************************************** # Copyright (C) 2001 Janko Hauser and @@ -693,7 +693,6 @@ Currently the magic system has the following functions:\n""" """Print the definition header for any callable object. If the object is a class, print the constructor information.""" - print "+++" self._inspect('pdef',parameter_s, namespaces) def magic_pdoc(self, parameter_s='', namespaces=None): diff --git a/IPython/Release.py b/IPython/Release.py index eb25b64..952f575 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Release data for the IPython project. -$Id: Release.py 1955 2006-11-29 09:44:32Z vivainio $""" +$Id: Release.py 1961 2006-12-05 21:02:40Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez @@ -22,7 +22,7 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '1954' +revision = '1955' #version = '0.7.3.svn' diff --git a/IPython/iplib.py b/IPython/iplib.py index bce0905..7e4756f 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 1956 2006-11-30 05:22:31Z fperez $ +$Id: iplib.py 1961 2006-12-05 21:02:40Z vivainio $ """ #***************************************************************************** @@ -1427,13 +1427,12 @@ want to merge them back into the new files.""" % locals() return have_pydb = False - if sys.version[:3] >= '2.5': - # use pydb if available - try: - from pydb import pm - have_pydb = True - except ImportError: - pass + # use pydb if available + try: + from pydb import pm + have_pydb = True + except ImportError: + pass if not have_pydb: # fallback to our internal debugger pm = lambda : self.InteractiveTB.debugger(force=True) diff --git a/doc/ChangeLog b/doc/ChangeLog index fd47a7b..9b50800 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-12-5 Ville Vainio + + * Magic.py, iplib.py, completer.py: Apply R. Bernstein's + pydb patch 4 (rm debug printing, py 2.5 checking) + 2006-11-30 Walter Doerwald * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: "refresh" (mapped to "r") refreshes the screen by restarting the iterator.