In the natural evolution of programming languages it is sometimesnecessary to make changes that modify the behavior of older programs.This PEP proposes a policy for implementing these changes in a mannerrespectful of the installed base of Python users.
Implementation of this PEP requires the addition of a formal warningand deprecation facility that will be described in another proposal.
These guidelines apply to future versions of Python that introducebackward-incompatible behavior. Backward incompatible behavior is amajor deviation in Python interpretation from an earlier behaviordescribed in the standard Python documentation. Removal of a featurealso constitutes a change of behavior.
This PEP does not replace or preclude other compatibility strategiessuch as dynamic loading of backwards-compatible parsers. On the otherhand, if execution of “old code” requires a special switch or pragmathen that is indeed a change of behavior from the point of view of theuser and that change should be implemented according to theseguidelines.
In general, common sense must prevail in the implementation of theseguidelines. For instance changing “sys.copyright” does not constitutea backwards-incompatible change of behavior!
Source:https://github.com/python/peps/blob/main/peps/pep-0005.rst
Last modified:2025-02-01 08:55:40 GMT