Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Document the news file format #212
Conversation
| 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``: |
larryhastings
Jun 23, 2017
Contributor
Format is <date>.bpo-<issue-number>.<nonce>.rst. The fields between and are theoretically tagged, so we can add more metadata later as needed.
Format is <date>.bpo-<issue-number>.<nonce>.rst. The fields between and are theoretically tagged, so we can add more metadata later as needed.
larryhastings
Jun 23, 2017
Contributor
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.
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.
brettcannon
Jun 23, 2017
Author
Member
Clarified in the latest commit.
Clarified in the latest commit.
|
Some feedback. |
| 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`` |
larryhastings
Jun 23, 2017
Contributor
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 in YYYY-MM-DD or YYYY-MM-DD-HH-MM-DD format, e.g. 2017-05-27or 2017-05-27-08-22-35
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-DDorYYYY-MM-DD-HH-MM-DDformat, e.g.2017-05-27or2017-05-27-08-22-35
| 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``: |
larryhastings
Jun 23, 2017
Contributor
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.
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.
|
|
||
| * ``<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 |
larryhastings
Jun 23, 2017
Contributor
There's no length requirement for the nonce. I think even a zero-character string would work.
There's no length requirement for the nonce. I think even a zero-character string would work.
| 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 |
larryhastings
Jun 23, 2017
Contributor
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.
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.
brettcannon
Jun 23, 2017
Author
Member
I dropped the mention.
I dropped the mention.
|
|
||
| - 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 |
larryhastings
Jun 23, 2017
Contributor
Bad English. Better: "The contents of a news file should be [...]"
Bad English. Better: "The contents of a news file should be [...]"
brettcannon
Jun 23, 2017
Author
Member
Fixed.
Fixed.
terryjreedy
Jun 23, 2017
Member
agreed
agreed
| 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:: |
larryhastings
Jun 23, 2017
Contributor
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-.
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-.
terryjreedy
Jun 23, 2017
Member
I was wondering about that ;-)
I was wondering about that ;-)
brettcannon
Jun 23, 2017
Author
Member
Clarified.
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. |
terryjreedy
Jun 23, 2017
Member
Will blurb add open some editor or editing window?
Will blurb add open some editor or editing window?
brettcannon
Jun 23, 2017
Author
Member
I believe it will open an editor, yes.
I believe it will open an editor, yes.
larryhastings
Jun 23, 2017
Contributor
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.
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.
terryjreedy
Jun 23, 2017
Member
Notepad is definitely lightweight, and for a typical news item, should be fine.
Notepad is definitely lightweight, and for a typical news item, should be fine.
willingc
Jun 23, 2017
Collaborator
If the editor is not set on macOS, it seems reasonable to default to TextEdit which is what the operating system does.
If the editor is not set on macOS, it seems reasonable to default to TextEdit which is what the operating system does.
brettcannon
Jun 23, 2017
Author
Member
This level of discussion is more appropriate in the core-workflow issue tracker.
This level of discussion is more appropriate in the core-workflow issue tracker.
| * ``<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`` |
terryjreedy
Jun 23, 2017
Member
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.)
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.)
brettcannon
Jun 23, 2017
Author
Member
How so? Just randomly bang on your keyboard and keep 6 letters. 😄
How so? Just randomly bang on your keyboard and keep 6 letters.
larryhastings
Jun 23, 2017
Contributor
Or any number of letters, even zero. The nonce is really just there as a final arbiter to prevent filename collisions.
Or any number of letters, even zero. The nonce is really just there as a final arbiter to prevent filename collisions.
brettcannon
Jun 23, 2017
Author
Member
I've now clarified this.
I've now clarified this.
|
|
||
| - 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 |
terryjreedy
Jun 23, 2017
Member
agreed
agreed
| `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. |
terryjreedy
Jun 23, 2017
Member
Will they be ignored if there is no corresponding object in the docs?
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. | |||
terryjreedy
Jun 23, 2017
Member
This contradicts Larry's comment above about not starting with 'bpo' or issue number.
This contradicts Larry's comment above about not starting with 'bpo' or issue number.
brettcannon
Jun 23, 2017
Author
Member
This is part of reST markup for a block literal so it actually doesn't when viewed as rendered HTML.
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. | ||
|
|
terryjreedy
Jun 23, 2017
Member
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.
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.
brettcannon
Jun 23, 2017
Author
Member
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.
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.
| 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 |
willingc
Jun 23, 2017
Collaborator
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.
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.
brettcannon
Jun 23, 2017
Author
Member
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. 😉
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.