★ wanayoo — archive 1999 https://github.com/python/devguide/pull/212Nouvelle recherche | Portail wanayoo
Skip to content
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

Document the news file format #212

Merged
merged 10 commits into from Jun 23, 2017
Merged

Document the news file format #212

merged 10 commits into from Jun 23, 2017

Conversation

@brettcannon
Copy link
Member

@brettcannon brettcannon commented May 27, 2017

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.

@brettcannon brettcannon changed the title [WIP] Document the news file format Document the news file format Jun 23, 2017
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``:

This comment has been minimized.

@larryhastings

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.

This comment has been minimized.

@larryhastings

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.

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

Clarified in the latest commit.

Copy link
Contributor

@larryhastings larryhastings left a comment

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``

This comment has been minimized.

@larryhastings

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
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``:

This comment has been minimized.

@larryhastings

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.


* ``<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

This comment has been minimized.

@larryhastings

larryhastings Jun 23, 2017
Contributor

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

This comment has been minimized.

@larryhastings

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.

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

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

This comment has been minimized.

@larryhastings

larryhastings Jun 23, 2017
Contributor

Bad English. Better: "The contents of a news file should be [...]"

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

Fixed.

This comment has been minimized.

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::

This comment has been minimized.

@larryhastings

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-.

This comment has been minimized.

@terryjreedy

terryjreedy Jun 23, 2017
Member

I was wondering about that ;-)

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

Clarified.

brettcannon added 2 commits Jun 23, 2017
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.

This comment has been minimized.

@terryjreedy

terryjreedy Jun 23, 2017
Member

Will blurb add open some editor or editing window?

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

I believe it will open an editor, yes.

This comment has been minimized.

@larryhastings

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.

This comment has been minimized.

@terryjreedy

terryjreedy Jun 23, 2017
Member

Notepad is definitely lightweight, and for a typical news item, should be fine.

This comment has been minimized.

@willingc

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.

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

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``

This comment has been minimized.

@terryjreedy

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 comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

How so? Just randomly bang on your keyboard and keep 6 letters. 😄

This comment has been minimized.

@larryhastings

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.

This comment has been minimized.

@brettcannon

brettcannon Jun 23, 2017
Author Member

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

This comment has been minimized.

`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.

This comment has been minimized.

@terryjreedy

terryjreedy Jun 23, 2017
Member

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.

This comment has been minimized.

@terryjreedy

terryjreedy Jun 23, 2017
Member

This contradicts Larry's comment above about not starting with 'bpo' or issue number.

This comment has been minimized.

@brettcannon

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.

The spam module sporadically came up short on spam. This change
raises the amount of spam in the module by making it more spammy.

This comment has been minimized.

@terryjreedy

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.

This comment has been minimized.

@brettcannon

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.

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

This comment has been minimized.

@willingc

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.

This comment has been minimized.

@brettcannon

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. 😉

brettcannon added 2 commits Jun 23, 2017
@brettcannon brettcannon merged commit daaa4b5 into python:master Jun 23, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@brettcannon brettcannon deleted the brettcannon:use-blurb branch Jun 23, 2017
@brettcannon
Copy link
Member Author

@brettcannon brettcannon commented Jun 23, 2017

Thanks for all the feedback, everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.