diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index fde44f3..db3d0ac 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -159,13 +159,6 @@ def BdbQuit_excepthook(et, ev, tb, excepthook=None): "`BdbQuit_excepthook` is deprecated since version 5.1", ) - -def BdbQuit_IPython_excepthook(self, et, ev, tb, tb_offset=None): - raise ValueError( - "`BdbQuit_IPython_excepthook` is deprecated since version 5.1", - DeprecationWarning, stacklevel=2) - - RGX_EXTRA_INDENT = re.compile(r'(?<=\n)\s+') @@ -270,21 +263,6 @@ class Pdb(OldPdb): C = coloransi.TermColors cst = self.color_scheme_table - cst['NoColor'].colors.prompt = C.NoColor - cst['NoColor'].colors.breakpoint_enabled = C.NoColor - cst['NoColor'].colors.breakpoint_disabled = C.NoColor - - cst['Linux'].colors.prompt = C.Green - cst['Linux'].colors.breakpoint_enabled = C.LightRed - cst['Linux'].colors.breakpoint_disabled = C.Red - - cst['LightBG'].colors.prompt = C.Blue - cst['LightBG'].colors.breakpoint_enabled = C.LightRed - cst['LightBG'].colors.breakpoint_disabled = C.Red - - cst['Neutral'].colors.prompt = C.Blue - cst['Neutral'].colors.breakpoint_enabled = C.LightRed - cst['Neutral'].colors.breakpoint_disabled = C.Red # Add a python parser so we can syntax highlight source while # debugging. diff --git a/IPython/core/excolors.py b/IPython/core/excolors.py index 5b7bcf6..d488681 100644 --- a/IPython/core/excolors.py +++ b/IPython/core/excolors.py @@ -34,9 +34,10 @@ def exception_colors(): >>> ec.active_scheme_name 'NoColor' >>> sorted(ec.active_colors.keys()) - ['Normal', 'caret', 'em', 'excName', 'filename', 'filenameEm', 'line', - 'lineno', 'linenoEm', 'name', 'nameEm', 'normalEm', 'topline', 'vName', - 'val', 'valEm'] + ['Normal', 'breakpoint_disabled', 'breakpoint_enabled', 'caret', 'em', + 'excName', 'filename', 'filenameEm', 'line', 'lineno', 'linenoEm', 'name', + 'nameEm', 'normalEm', 'prompt', 'topline', 'vName', 'val', 'valEm'] + """ ex_colors = ColorSchemeTable() @@ -70,6 +71,10 @@ def exception_colors(): "line": C.NoColor, "caret": C.NoColor, "Normal": C.NoColor, + # debugger + "prompt": C.NoColor, + "breakpoint_enabled": C.NoColor, + "breakpoint_disabled": C.NoColor, }, ) ) @@ -99,6 +104,10 @@ def exception_colors(): "line": C.Yellow, "caret": C.White, "Normal": C.Normal, + # debugger + "prompt": C.Green, + "breakpoint_enabled": C.LightRed, + "breakpoint_disabled": C.Red, }, ) ) @@ -132,6 +141,10 @@ def exception_colors(): "line": C.Red, "caret": C.Normal, "Normal": C.Normal, + # debugger + "prompt": C.Blue, + "breakpoint_enabled": C.LightRed, + "breakpoint_disabled": C.Red, }, ) ) @@ -161,6 +174,10 @@ def exception_colors(): "line": C.Red, "caret": C.Normal, "Normal": C.Normal, + # debugger + "prompt": C.Blue, + "breakpoint_enabled": C.LightRed, + "breakpoint_disabled": C.Red, }, ) ) diff --git a/IPython/utils/coloransi.py b/IPython/utils/coloransi.py index a4a14c5..b41f230 100644 --- a/IPython/utils/coloransi.py +++ b/IPython/utils/coloransi.py @@ -71,8 +71,34 @@ class TermColors: Normal = '\033[0m' # Reset normal coloring _base = '\033[%sm' # Template for all other colors -# Build the actual color table as a set of class attributes: -make_color_table(TermColors) + Black = "0;30" + Red = "0;31" + Green = "0;32" + Brown = "0;33" + Blue = "0;34" + Purple = "0;35" + Cyan = "0;36" + LightGray = "0;37" + # Light colors + DarkGray = "1;31" + LightRed = "1;32" + LightGreen = "1;33" + Yellow = "1;34" + LightBlue = "1;35" + LightPurple = "1;36" + LightCyan = "1;37" + White = "1;38" + # Blinking colors. Probably should not be used in anything serious. + BlinkBlack = "5;30" + BlinkRed = "5;31" + BlinkGreen = "5;32" + BlinkYellow = "5;33" + BlinkBlue = "5;34" + BlinkPurple = "5;35" + BlinkCyan = "5;36" + BlinkLightGray = "5;37" + + class InputTermColors: """Color escape sequences for input prompts.