diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2018-11-17 18:10:49 -0800 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2018-11-17 18:10:49 -0800 |
commit | 7dad614367f72f0c99952c486b39eb1ed8aef600 (patch) | |
tree | c573b1766752851704ce8da3bdfe8d1238883480 /README.rst | |
parent | 5a1a8a970e5facd2b6c2bc347deeb0133f6d15f4 (diff) | |
download | natsort-7dad614367f72f0c99952c486b39eb1ed8aef600.tar.gz |
Change recommendation about how to detect DeprecationWarningsformal-deprecation-notices
If you turn DeprecationWarnings into errors, code can stop just due to
python startup DeprectionWarnings - you'll never even get to your code!
It's much better just to allow DeprecationWarnings to bubble up.
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -430,10 +430,11 @@ code with the following flag .. code-block:: console - $ python -Werror::DeprecationWarning my-code.py + $ python -Wdefault::DeprecationWarning my-code.py -This will turn any deprecation warnings into an error so that you can immediately -find old APIs. +By default ``DeprecationWarnings`` are not shown, but this will cause them to be shown. +Alternatively, you can just set the environment variable ``PYTHONWARNINGS`` to +"default::DeprecationWarning" and then run your code. Dropping Python 2.6 and 3.3 Support =================================== |