[Python-checkins] devguide: #12296: clarify paragraph about backward-compatibility. Patch by Moritz Neeb,

ezio.melotti python-checkins at python.org
Mon Feb 10 09:29:01 CET 2014


http://hg.python.org/devguide/rev/4ce6bfb27267
changeset:   665:4ce6bfb27267
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Mon Feb 10 10:28:49 2014 +0200
summary:
  #12296: clarify paragraph about backward-compatibility.  Patch by Moritz Neeb, Jyrki Pulliainen, and Éric Araujo.

files:
  patch.rst |  15 +++++++++------
  1 files changed, 9 insertions(+), 6 deletions(-)


diff --git a/patch.rst b/patch.rst
--- a/patch.rst
+++ b/patch.rst
@@ -55,13 +55,16 @@
 
 Second, be aware of backwards-compatibility considerations. While the core
 developer who eventually handles your patch will make the final call on whether
-something is acceptable, having you think about backwards-compatibility early
-will help prevent having your patch rejected on these grounds. Basically just
-put yourself in the shoes of someone whose code will be broken by a change to
-pre-existing semantics. It is guaranteed that any change made **will** break
+something is acceptable, thinking about backwards-compatibility early
+will help prevent having your patch rejected on these grounds. Put yourself in
+the shoes of someone whose code will be broken by the change(s) introduced by
+the patch. It is quite likely that any change made will break
 someone's code, so you need to have a good reason to make a change as you will
-be forcing someone somewhere to update their code (this obviously does not apply
-to new semantics).
+be forcing someone to update their code. (This obviously does not apply to new
+classes or functions; new arguments should be optional and have default values
+which maintain the existing behavior.) If in doubt, have a look at
+:PEP:`387` or :ref:`discuss <communication>` the issue with experienced
+developers.
 
 Third, make sure you have proper tests to verify your patch works as expected.
 Patches will not be accepted without the proper tests!

-- 
Repository URL: http://hg.python.org/devguide


More information about the Python-checkins mailing list