[Python-Dev] PEP 565: show DeprecationWarning in main (round 2) (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Tue Nov 28 02:54:07 EST 2017
- Previous message (by thread): [Python-Dev] PEP 565: show DeprecationWarning in __main__ (round 2)
- Next message (by thread): [Python-Dev] Allow tuple unpacking in return and yield statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
25.11.17 07:33, Nick Coghlan пише:
*
FutureWarning
: always reported by default. The intended audience is users of applications written in Python, rather than other Python developers (e.g. warning about use of a deprecated setting in a configuration file format).Given its presence in the standard library since Python 2.3,
FutureWarning
would then also have a secondary use case for libraries and frameworks that support multiple Python versions: as a more reliably visible alternative toDeprecationWarning
in Python 2.7 and versions of Python 3.x prior to 3.7.
I think it is worth to say more explicitly that the primary purpose of FutureWarning (warn about future behavior changes that will not be errors) is kept. It is just added a secondary purpose: a replacement for DeprecationWarning if you want to be sure that it is visible to end users.
I think that showing DeprecationWarning in main.py is just a first step. In future we can extend the scope of showing DeprecationWarning.
- Previous message (by thread): [Python-Dev] PEP 565: show DeprecationWarning in __main__ (round 2)
- Next message (by thread): [Python-Dev] Allow tuple unpacking in return and yield statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]