Skip to content
Snippets Groups Projects
Commit 00b990bf authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: remove ipdb option to be usable via --dev-opt, :books: update readme file

parent f9e20d92
No related branches found
No related tags found
2 merge requests!55Improve chown,!54add extra flag --dev-opt in order to provide extra dev options
......@@ -2,6 +2,12 @@
History
=======
10.0.0
------
Add option to include custom developer mode. Default is still to use reload and pdb. To use ipdb, use ``--dev-opt ipdb`` instead of ``--ipdb``.
9.0.1
-----
......
......@@ -229,12 +229,6 @@
"--no-dev", help="No dev options", action="store_false", dest="dev"
)
dev_option_group.add_argument(
"--ipdb",
help="Use ipdb rather than pdb",
action="store_true",
dest="ipdb",
)
dev_option_group.add_argument(
"--dev-opt",
help="add extra dev options",
nargs="+",
......@@ -327,7 +321,6 @@
run_isort = nmspc.isort
odoo_help = nmspc.odoo_help
dev = nmspc.dev
ipdb = nmspc.ipdb
dev_opts = nmspc.dev_opts
restore_filename = nmspc.DUMP
database = nmspc.database
......@@ -797,5 +790,6 @@
if run_isort:
isort()
# developer mode options
if dev:
if odoo_type in ("odoo10", "odoo11", "odoo13"):
......@@ -800,11 +794,17 @@
if dev:
if odoo_type in ("odoo10", "odoo11", "odoo13"):
dev_opts.append("reload")
# pdb should not be run if not interactive
if ipdb:
dev_opts.append("ipdb")
else:
# automatically add reload if not already asks for
if not any(opt not in dev_opts for opt in ("all", "reload")):
dev_opts.append("reload")
# XXX pdb should not be run if not interactive
# add pdb if no pubd, wdb, ipdb, pdb or all
# the list of available options differs by odoo version and can be
# seen with odoo --help, available with --odoo-help
if not any(
debugger not in dev_opts
for debugger in ("pubd", "wdb", "ipdb", "pdb", "all")
):
dev_opts.append("pdb")
arg.append(f"--dev={','.join(set(dev_opts))}")
if odoo_type in ("odoo8",):
arg.append("--auto-reload")
......@@ -807,7 +807,8 @@
dev_opts.append("pdb")
arg.append(f"--dev={','.join(set(dev_opts))}")
if odoo_type in ("odoo8",):
arg.append("--auto-reload")
if odoo_help:
arg.append("--help")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment