-
-
Notifications
You must be signed in to change notification settings - Fork 846
Document the news file format #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
committing.rst
Outdated
itself contains various sub-directories representing classifications for what | ||
was affected (e.g. ``Misc/NEWS.d/next/Library`` for changes relating to the | ||
standard library). The file name itself should be of the format | ||
``<date>.<issue-number>.<nonce>.rst``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format is <date>.bpo-<issue-number>.<nonce>.rst
. The fields between and are theoretically tagged, so we can add more metadata later as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess below you suggest that "bpo-" is considered part of the issue number? That kind of suggests we'd have other things there besides bpo-, which right now I don't think blurb would permit. It certainly wouldn't emit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified in the latest commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback.
committing.rst
Outdated
standard library). The file name itself should be of the format | ||
``<date>.<issue-number>.<nonce>.rst``: | ||
|
||
* ``<date>`` is today's date in ``YYYY-MM-DD`` format, e.g. ``2017-05-27`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually emit YYYY-MM-DD-HH-MM-SS, both to further prevent collisions, and to ensure that entries are added in strict chronological order. It doesn't make a big difference, but I'd like it if you mentioned it. Changing the line to
<date>
is today's date inYYYY-MM-DD
orYYYY-MM-DD-HH-MM-DD
format, e.g.2017-05-27
or2017-05-27-08-22-35
committing.rst
Outdated
itself contains various sub-directories representing classifications for what | ||
was affected (e.g. ``Misc/NEWS.d/next/Library`` for changes relating to the | ||
standard library). The file name itself should be of the format | ||
``<date>.<issue-number>.<nonce>.rst``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess below you suggest that "bpo-" is considered part of the issue number? That kind of suggests we'd have other things there besides bpo-, which right now I don't think blurb would permit. It certainly wouldn't emit it.
committing.rst
Outdated
|
||
* ``<date>`` is today's date in ``YYYY-MM-DD`` format, e.g. ``2017-05-27`` | ||
* ``<issue-number>`` is the issue number the change is for, e.g. ``bpo-12345`` | ||
* ``<nonce>`` is a unique, six-character string to guarantee the file name is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no length requirement for the nonce. I think even a zero-character string would work.
committing.rst
Outdated
put a new entry after the first or first two entries rather than at the very | ||
top. This way if you commit, pull new changesets and merge, the merge will | ||
succeed automatically. | ||
**No editing should be done to ``Misc/NEWS``**. While this was the traditional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we decided to remove Misc/NEWS from the CPython tree. It'll be generated just-in-time as part of the release process so tarballs look the same. But it should no longer be checked in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the mention.
committing.rst
Outdated
|
||
- bpo-15304: Fix warning message when `os.chdir()` fails inside | ||
`test.support.temp_cwd()`. Patch by Chris Jerdonek. | ||
A news file contents should be valid reStructuredText. An 80 character column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad English. Better: "The contents of a news file should be [...]"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
committing.rst
Outdated
A news file contents should be valid reStructuredText. An 80 character column | ||
width should be used. The "default role" | ||
(single backticks) in reST can be used to refer to objects in the documentation. | ||
Example news entry:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also like this to mention that, unlike in Misc/NEWS, news entries in Misc/NEWS.d shouldn't start with a -
, shouldn't indent subsequent lines, and shouldn't start with Issue #
or bpo-
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about that ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified.
requirement. | ||
News entries go into the ``Misc/NEWS.d`` directory as individual files. The | ||
easiest way to create a news entry is to use the | ||
`blurb <https://pypi.org/project/blurb/>`_ tool and its ``blurb add`` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will blurb add open some editor or editing window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it will open an editor, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It opens $EDITOR.
If $EDITOR isn't set, it will try a sane default on some platforms ("notepad" on Windows, /etc/alternatives/editor on Linux (if present)). I think when Ned got it working on macOS he said it shouldn't try to guess on that platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notepad is definitely lightweight, and for a typical news item, should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the editor is not set on macOS, it seems reasonable to default to TextEdit which is what the operating system does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This level of discussion is more appropriate in the core-workflow issue tracker.
committing.rst
Outdated
* ``<issue-number>`` is the issue number the change is for, e.g. ``12345`` | ||
for ``bpo-12345`` | ||
* ``<nonce>`` is a unique, six-character string to guarantee the file name is | ||
unique across branches, e.g. ``Yl4gI2`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a problem for hand written files. Will the nonce remain the same in backported files? (I can take 'unique across branches' either way.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How so? Just randomly bang on your keyboard and keep 6 letters. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or any number of letters, even zero. The nonce is really just there as a final arbiter to prevent filename collisions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now clarified this.
committing.rst
Outdated
|
||
- bpo-15304: Fix warning message when `os.chdir()` fails inside | ||
`test.support.temp_cwd()`. Patch by Chris Jerdonek. | ||
A news file contents should be valid reStructuredText. An 80 character column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
committing.rst
Outdated
`test.support.temp_cwd()`. Patch by Chris Jerdonek. | ||
A news file contents should be valid reStructuredText. An 80 character column | ||
width should be used. The "default role" | ||
(single backticks) in reST can be used to refer to objects in the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will they be ignored if there is no corresponding object in the docs?
@@ -235,10 +251,10 @@ it is common to simply paste the NEWS entry into the commit message. Here | |||
is an example:: | |||
|
|||
bpo-42: the spam module is now more spammy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This contradicts Larry's comment above about not starting with 'bpo' or issue number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of reST markup for a block literal so it actually doesn't when viewed as rendered HTML.
The spam module sporadically came up short on spam. This change | ||
raises the amount of spam in the module by making it more spammy. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have never added spaces before acknowledgements before and I believe same was generally true. Unless the resulting News/changelog is formatted differently from before, blank lines might make it harder, not easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean the indent, that's once again because it's reST formatting for a literal block. If you mean the newline then I personally have always used it.
Regardless, I didn't change this format and so if you want to discuss the formatting of commit messages that belongs in a separate issue.
committing.rst
Outdated
and the checkin message. If the patch has been heavily modified then "Initial | ||
patch by <x>" is an appropriate alternate wording. | ||
|
||
If you omit correct attribution in the initial checkin, then update ``ACKS`` | ||
and ``NEWS`` in a subsequent checkin (don't worry about trying to fix the | ||
and ``NEWS.d`` in a subsequent checkin (don't worry about trying to fix the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally accepted usage is "check-in" for a noun or adjective or "check in" for a verb. No need to update for this PR as it's "checkin" throughout the document. Future revisions should probably correct this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't point that out to the son of a former school teacher who almost had a minor in English and expect them not to fix it immediately. 😉
Thanks for all the feedback, everyone! |
This should not be merged until larryhastings/blurb relocates to python/core-workflow, python/cpython is updated appropriately, and python/core-workflow#66 is closed.