Warnings in python

Having problems to see warnings in python. You can use the flag -w.

$ python -Wd manage.py runserver
/path/to/.pyenv/versions/phcommt310/lib/python3.10/site-packages/django/conf/__init__.py:240: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale.
  warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)
System check identified no issues (0 silenced).

In python 3.7, you have pythondevmode – https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDEVMODE

Leave a comment