[REM] core: remnants of debugger support

It's done nothing since #78857 and it doesn't seem like anyone has
cared (found no issues or tickets).

Rather than restore the feature, just remove the leftover bits.

X-original-commit: 4a7cfc8844eb9b754f16f9d013452d5bde8770b5
Part-of: odoo/odoo#115176
This commit is contained in:
Xavier Morel
2023-03-14 13:30:19 +01:00
parent a3748a2a6a
commit 09023b6f87
3 changed files with 3 additions and 23 deletions
+1 -2
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
SUPPORTED_DEBUGGER = {'pdb', 'ipdb', 'wdb', 'pudb'}
from . import _monkeypatches
from . import appdirs
from . import cloc
@@ -10,7 +10,6 @@ from . import win32
from .barcode import *
from .config import config
from .date_utils import *
from .debugger import *
from .float_utils import *
from .func import *
from .image import *
+2 -2
View File
@@ -293,7 +293,7 @@ class configmanager(object):
group = optparse.OptionGroup(parser, "Advanced options")
group.add_option('--dev', dest='dev_mode', type="string",
help="Enable developer mode. Param: List of options separated by comma. "
"Options : all, [pudb|wdb|ipdb|pdb], reload, qweb, werkzeug, xml")
"Options : all, reload, qweb, werkzeug, xml")
group.add_option('--shell-interface', dest='shell_interface', type="string",
help="Specify a preferred REPL to use in shell mode. Supported REPLs are: "
"[ipython|ptpython|bpython|python]")
@@ -529,7 +529,7 @@ class configmanager(object):
self.options['translate_modules'].sort()
dev_split = opt.dev_mode and [s.strip() for s in opt.dev_mode.split(',')] or []
self.options['dev_mode'] = 'all' in dev_split and dev_split + ['pdb', 'reload', 'qweb', 'werkzeug', 'xml'] or dev_split
self.options['dev_mode'] = 'all' in dev_split and dev_split + ['reload', 'qweb', 'werkzeug', 'xml'] or dev_split
if opt.pg_path:
self.options['pg_path'] = opt.pg_path
-19
View File
@@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import importlib
import logging
import types
_logger = logging.getLogger(__name__)
SUPPORTED_DEBUGGER = {'pdb', 'ipdb', 'wdb', 'pudb'}
def post_mortem(config, info):
if config['dev_mode'] and isinstance(info[2], types.TracebackType):
debug = next((opt for opt in config['dev_mode'] if opt in SUPPORTED_DEBUGGER), None)
if debug:
try:
# Try to import the xpdb from config (pdb, ipdb, pudb, ...)
importlib.import_module(debug).post_mortem(info[2])
except ImportError:
_logger.error('Error while importing %s.' % debug)