Opened 9 days ago

Last modified 4 days ago

#35894 assigned Cleanup/optimization

Move away from the term "patch" to refer to a contribution/pull request in the contributor documentation

Reported by: Baptiste Mispelon Owned by: Baptiste Mispelon
Component: Documentation Version: 5.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

No one effectively contributes via patches anymore (according to the Trac database, only ~10 patches were submitted in the past 12 months), I think it's time we update Trac and our documentation to reflect that.

I've created a PR to change the wording on Trac itself: https://github.com/django/code.djangoproject.com/pull/224

What's left now is to update our contributing guides in the documentation.

Attachments (1)

issue35894.diff (36.0 KB ) - added by Baptiste Mispelon 9 days ago.

Download all attachments as: .zip

Change History (12)

by Baptiste Mispelon, 9 days ago

Attachment: issue35894.diff added

comment:1 by Baptiste Mispelon, 9 days ago

Has patch: set

I've attached a patch for the documentation changes 🙃

(If you insist, I've also opened a PR: https://github.com/django/django/pull/18780)

comment:2 by Baptiste Mispelon, 9 days ago

I also considered replacing the expression "ready for checkin" with "ready for merging" (which has the huge advantage of having the exact same number of letters), but that would require a database migration on Trac which could be a bit annoying (though not impossible).

If you think that's worth it I can look into that as well.

comment:3 by Tim Graham, 8 days ago

There were some recent changes along these lines in 55a2e3136b13d1af95a4129001dac963c26d8415.

I'd prefer not to rename files and cause external broken links (Cool URIs Don't Change). (E.g. you proposed to rename ....writing-code/submitting-patches.txt to .../writing-code/pull-requests.txt.)

You also proposed to remove the ".. _patch-review-checklist:" heading which I have used extensively in Trac comments as well as on the PatchReviewChecklist wiki page (but if the page is renamed the link will break anyway).

It's possible Django will use Git, GitHub, and "pull requests" forever, but it might be worth considering if these specific terms should really be embedded in URLs.

comment:4 by Claude Paroz, 8 days ago

I also think that "pull request" is a GitHubism. Not that we should not use it, but having "patch" here and there as a more generic term doesn't shock me.

in reply to:  3 comment:5 by Sarah Boyce, 8 days ago

Summary: Rename "patch" to "pull request" in the contributor documentationMove away from the term "patch" to refer to a contribution/pull request in the contributor documentation
Triage Stage: UnreviewedAccepted

Replying to Tim Graham:

I'd prefer not to rename files and cause external broken links (Cool URIs Don't Change). (E.g. you proposed to rename ....writing-code/submitting-patches.txt to .../writing-code/pull-requests.txt.)

You also proposed to remove the ".. _patch-review-checklist:" heading which I have used extensively in Trac comments as well as on the PatchReviewChecklist wiki page (but if the page is renamed the link will break anyway).

I agree we should be careful not to break links here

I'm in favor of updating from patch, to either "pull request"/"contribution"/"solution"/"fix"

I think "Has patch" -> "Has pull request" as when someone marks this as Yes, I expect to see something reviewable in GitHub which has also triggered our CI

"Patch needs improvement" could be "Requested changes" (I have stolen that from GitHub but is perhaps less of a GitHubism)

Will review the PR in detail for more specific cases

comment:6 by Sarah Boyce, 8 days ago

Patch needs improvement: set

comment:7 by Baptiste Mispelon, 8 days ago

Thanks everyone for the feedback, I'll try to address it point by point

1) Not breaking existing URLs

This is a very good point, but I think we should address that via setting up 301 redirects in the server configuration (this is something I can do as a member of the ops team)
I'll also note that there is some precedent for breaking docs links (found via git log --diff-filter=RD --stat -- docs/): d8b6a76bc745b21c6cf2b29c220a91bcae7fd3d7, 8eae094638acf802c8047b341d126d94bc9b45a3, or 3d14cbc86781ea1051af7f0c421bee3ecf2f9842

2) Not breaking URL fragments / heading names

I'm not opposed to re-adding some directives like .. _patch-review-checklist to try and preserve deep links people might have used, but I think it should be part of a documented policy. Why is this heading on this page important that it requires preserving? Should that apply to all references throughout the documentation? If not, what's the cutoff, how do we measure it?
I don't think it's realistic to expect headings not to ever change names, and without a policy in place (ideally enforced by some kind of automated tool) those "backwards-compatibilty" references are at risk of being removed by accident.

3) Githubisms

I would argue that the term "pull request" is general enough as to not be a "githubism" (it is used on bitbucket for example). In any case, this word reflects the reality of our contributing process today and for the foreseeable future, unlike the word "patch" which one could also call an "SVNism" .

4) Patch is a generic term

I think that one might be a matter of opinion (and mine is that it's not) which would be hard to quantify objectively. My belief is that the majority of our new contributors do not know what a "patch" is, but they know what a "pull reqest" is.

I'll also point out that the Python devguide recently made changes in a similar direction: https://github.com/python/devguide/commit/0ad84cdd913dfd58df1fe4862eb7bf06cc8f4882

Also also, our documentation currently uses the word "patch" for several different meanings:
1) As a synonym for "pull request" essentially
2) To point to a specific commit in the context of a security release
3) A "patch" release
4) The HTTP method

Replacing one of these (1) would be an improvement in my opinion.

comment:8 by Sarah Boyce, 8 days ago

I'm not opposed to re-adding some directives like .. _patch-review-checklist to try and preserve deep links people might have used, but I think it should be part of a documented policy. Why is this heading on this page important that it requires preserving?

For example, https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#patch-review-checklist has been on an automated welcome message on GitHub PRs for first time contributors for quite a while - so this link is used and shared quite extensively. I think it's normal to share a particular version of the docs in a link, but often in the internal docs, I share "dev" links so folks get the latest information on our processes - unfortunately these links are more "brittle".
Setting a redirect would be great 👍

This is not a documented policy. I'd say we change header names (though never really touched the Wiki). References we don't change very often and file renaming/removing is also quite rare.

comment:9 by Claude Paroz, 8 days ago

unlike the word "patch" which one could also call an "SVNism"

I don't agree, "patch" is still used in the Git world (see https://git-scm.com/docs/git-format-patch for example). Once again, I don't oppose to this proposal, just that we don't need to purge all "patch" occurrences in our docs. It may still make sense in some contexts.

comment:10 by Tim Graham, 8 days ago

If "patch" has lost its meaning among new contributors, or makes people think we're using SVN, I'm very surprised.
https://en.wikipedia.org/wiki/Patch_(computing)
https://git-scm.com/docs/SubmittingPatches

For "pull request", I was thinking about GitLab, which uses "merge request."

comment:11 by Baptiste Mispelon, 4 days ago

Patch needs improvement: unset

I've updated the PR after some reviews, here's the current summary:

  • "patch" is replaced with a mixture of "pull request", "change" or "contribution" on all the pages that talk about contributing to Django (this matches the current effective practice and is similar to what was done on the Python devguide)
  • The word "patch" is kept when talking about an actual patch file
  • The word "patch" is kept in the names of some files and in some anchors, so as not to break existing links

There are also two PRs connected to this ticket:

While these two PRs are related, they don't technically require to be merged/deployed in any specific order. I personally suggest waiting until the docs change in this ticket are live before deploying them.

Note: See TracTickets for help on using tickets.
Back to Top