Follow the advice of the 3.9 docs and test with python3 -X dev: https://docs.python.org/3.9/library/devmode.html#devmode
Note that dev mode was added in Python 3.7: https://docs.python.org/3.7/using/cmdline.html?highlight=devmode#envvar-PYTHONDEVMODE