

The _main_ module (as such code is considered relatively unlikely to DeprecationWarning: reported by default for code that runs directly in.Python application developers with specific support obligations).
PYTHON RUNNER 3.7 SOFTWARE
The intended audience is Python developers that take an active interest inĮnsuring the future compatibility of their software (e.g.

(This will be in addition to the existing use of FutureWarning Use of FutureWarning (rather than DeprecationWarning) for backwardsĬompatibility warnings that are intended to be seen by users of anĪpplication. The standard library documentation will be updated to explicitly recommend the

Personal or locally distributed scripts are likely to start seeing relevantĭeprecation warnings again (as they did in Python 2.6 and earlier). Shouldn’t see any change from the status quo, while users of more ad hoc This means that tool developers that create an installable or executableĪrtifact (such as a zipapp archive) for distribution to their users

code executed directly at the interactive prompt.This change will lead to DeprecationWarning being displayed by default for: _main_ module, the first occurrence of each DeprecationWarning will once This means that in cases where the nominal location of the warning (asĭetermined by the stacklevel parameter to warnings.warn) is in the The current set of default warnings filters consists of:ĭefault :: DeprecationWarning : _main_ ignore :: DeprecationWarning ignore :: PendingDeprecationWarning ignore :: ImportWarning ignore :: BytesWarning ignore :: ResourceWarning Specification New default warnings filter entry Test cases, and that other test runners are advised to follow that example. Unittest test runner displays all warnings by default when executing Subsystem more approachable for new Python developers.Īs part of the documentation updates, it will be made clearer that the Interpreter and standard library documentation to help make the warnings The PEP also proposes a number of small adjustments to the reference They will continue to be silenced by default for packaged code distributed as Single file scripts will revert to reporting these warnings by default, while This change will mean that code entered at the interactive prompt and code in To improve this situation, this PEP proposes a single adjustment to theĭefault warnings filter: displaying deprecation warnings attributed to the main Standard library, or in third party libraries) to users of those APIs. Providing advance notice of breaking changes in APIs (whether in CPython, the However, this change has had the unfortunate side effect of makingĭeprecationWarning markedly less effective at its primary intended purpose: Those users explicitly opted in to seeing them. Happened to be written in Python, wouldn’t be visible to their users unless Test runners, code generators), as well as any other applications that merely Tools that were themselves written in Python (e.g. In Python 2.7 and Python 3.2, the default warning filters were updated to hideĭeprecationWarning by default, such that deprecation warnings in development Recommended filter settings for interactive shells.Recommended filter settings for test runners.Toggle light / dark / auto colour theme PEP 565 – Show DeprecationWarning in _main_ Author : Nick Coghlan Status : Final Type : Standards Track Created : 1 Python-Version : 3.7 Post-History : 1, 2 Resolution : Python-Dev message PEP 565 – Show DeprecationWarning in _main_ | Following system colour scheme Selected dark colour scheme Selected light colour scheme Python Enhancement Proposals
