Skip to content

Commit 44e62d5

Browse files
erlend-aaslandhugovkAlexWaygoodezio-melotti
authored
Rework the docs for NEWS/What's New entries (#1238)
- Add links to CPython repo where appropriate - Add some information about how to word NEWS entries - Break up in subsubsections instead of keeping all the text in a single large subsection - Mention that test, docs, and strictly internal changes seldom require NEWS entries - Use more appropriate markup iso. double backticks Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
1 parent 477be7d commit 44e62d5

File tree

1 file changed

+40
-17
lines changed

1 file changed

+40
-17
lines changed

core-developers/committing.rst

+40-17
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,20 @@ to enter the public source tree. Ask yourself the following questions:
8080
Updating NEWS and What's New in Python
8181
--------------------------------------
8282

83-
Almost all changes made to the code base deserve an entry in ``Misc/NEWS.d``.
84-
If the change is particularly interesting for end users (e.g. new features,
85-
significant improvements, or backwards-incompatible changes), then an entry in
86-
the ``What's New in Python`` document (in ``Doc/whatsnew/``) should be added
87-
as well. Changes that affect documentation only generally do not require
88-
a ``NEWS`` entry.
83+
Changes that require NEWS entries
84+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8985

90-
There are two notable exceptions to this general principle, and they
91-
both relate to changes that:
86+
Most changes made to the codebase deserve an entry in :cpy-file:`Misc/NEWS.d`,
87+
except for the following:
9288

93-
* Already have a ``NEWS`` entry
94-
* Have not yet been included in any formal release (including alpha
95-
and beta releases)
89+
* documentation changes
90+
* test changes
91+
* strictly internal changes with no user-visible effects
92+
* changes that already have a ``NEWS`` entry
93+
* reverts that have not yet been included in any formal release
94+
(including alpha and beta releases)
9695

97-
These are the two exceptions:
96+
For the last two, note the following:
9897

9998
#. **If a change is reverted prior to release**, then the corresponding
10099
entry is simply removed. Otherwise, a new entry must be added noting
@@ -105,8 +104,24 @@ These are the two exceptions:
105104
change and the original** ``NEWS`` **entry remains valid**, then no additional
106105
entry is needed.
107106

108-
If a change needs an entry in ``What's New in Python``, then it is very
109-
likely not suitable for including in a maintenance release.
107+
Changes that require "What's New in Python" entries
108+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109+
110+
If a change is particularly interesting for end users (e.g. new features,
111+
significant improvements, or backwards-incompatible changes), add an entry in
112+
the "What's New in Python" document (in :cpy-file:`Doc/whatsnew/`)
113+
in addition to the ``NEWS`` entry.
114+
115+
In most cases, it is sufficient to reuse the wording from the ``NEWS`` entry
116+
in the "What's New in Python" entry.
117+
118+
.. note::
119+
120+
A change that needs an entry in "What's New in Python",
121+
is very likely not suitable for inclusion in a maintenance release.
122+
123+
How to add a NEWS entry
124+
^^^^^^^^^^^^^^^^^^^^^^^
110125

111126
``NEWS`` entries go into the ``Misc/NEWS.d`` directory as individual files. The
112127
``NEWS`` entry can be created by using `blurb-it <https://blurb-it.herokuapp.com/>`_,
@@ -132,6 +147,17 @@ to the standard library). The file name itself should be in the format
132147
As a result, a file name can look something like
133148
``Misc/NEWS.d/next/Library/2017-05-27-16-46-23.gh-issue-12345.Yl4gI2.rst``.
134149

150+
How to write a NEWS entry
151+
^^^^^^^^^^^^^^^^^^^^^^^^^
152+
153+
All ``NEWS`` entries end up being part of the changelog.
154+
The changelog contains *a lot* of entries,
155+
and its intended audience is mainly users, not core devs and contributors.
156+
Take this into consideration when wording your ``NEWS`` entry.
157+
Describe the user-visible effects of your change succinctly and accurately;
158+
avoid long technical elaborations, digressions, and do not expect or require
159+
the reader to have read the actual diff for the change.
160+
135161
The contents of a ``NEWS`` file should be valid reStructuredText. An 80 character
136162
column width should be used. There is no indentation or leading marker in the
137163
file (e.g. ``-``). There is also no need to start the entry with the issue
@@ -146,9 +172,6 @@ The inline Sphinx roles like ``:func:`` can be used help readers
146172
find more information. You can build HTML and verify that the
147173
link target is appropriate by using :ref:`make html <building-using-make>`.
148174

149-
While Sphinx roles can be beneficial to readers, they are not required.
150-
Inline ````code blocks```` can be used instead.
151-
152175

153176
Working with Git_
154177
-----------------

0 commit comments

Comments
 (0)