# HG changeset patch
# User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr>
# Date 1657200699 -7200
#      Thu Jul 07 15:31:39 2022 +0200
# Node ID 6622ff6748b4cc382be020e5624da43ad46cdca9
# Parent  7384c6e3eda3272832f7f0aa210f43154b442ca7
✨ set PYTHONDEVMODE when running in dev mode

diff --git a/NEWS.rst b/NEWS.rst
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -9,15 +9,17 @@
 
 odoorpc merged a fix for the python 3.10 compatibility, so update the requirements accordingly.
 
+Set PYTHONDEVMODE when in dev mode. This will only be used with 3.7 python to display some additional messages.
+See https://docs.python.org/3/library/devmode.html#devmode
+
 16.5.1
 ------
 
 Avoid trying to set db_host with an empty value.
-
 16.5.0
 ------
 
-Fix path used when running chown in the image, it was using /var/lib/odoo which is not where the data is present when running.
+Fix path used when running chown in the image, it was using ``/var/lib/odoo`` which is not where the data is present when running.
 
 When running tests, only install modules that are not going to be tested. Modules to be tested will be installed during the tests.
 
diff --git a/odoo_scripts/docker_dev_start.py b/odoo_scripts/docker_dev_start.py
--- a/odoo_scripts/docker_dev_start.py
+++ b/odoo_scripts/docker_dev_start.py
@@ -888,6 +888,7 @@
             arg.append(f"--dev={','.join(set(dev_opts))}")
         if odoo_type in (ODOO_8,):
             arg.append("--auto-reload")
+        options["environment"]["PYTHONDEVMODE"] = 1
 
     project_version = "local"