I starting rfc to leave limit for number of characters on gerrit be 100 per line because current limit of 80 making problems with patches. Example is: https://gerrit.wikimedia.org/r/#/c/372064
Description
Details
Related Objects
- Mentioned Here
- T189615: UnicodeDecode error: invalid continuation byte
Event Timeline
What do you mean by problems? Just click the gear icon and change your diff preferences to 100 or whatever number works for you (mine is set to 72). I see no reason to change this.
Also: this is not an RFC-level problem, removing that tag.
I was a little bit confused in https://gerrit.wikimedia.org/r/#/c/372064. Jenkins added +1. After a few months I uploaded a new file, but the old left unchanged and Jenkins complained about the unchanged file!
There was added a limit for new code to have lines under 80 characters, but old lines still can pass with 100.
But this limit seems too restrictive to me. I would leave 100 for old and 100 for new code. Therefore we started this RFC if 100 characters per line would be acceptable for the community.
Ah, I didn't see the Jenkins history. Yeah, that could be problematic. That's because tox was upgraded, I believe?
Don‘t see any reason to ignore PEP8 especially for new lines. The patchset you pointed out failed due syntax errors. And btw it is very easy to keep the changed lines below 80 chars.
Change 407507 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Revert "tox.ini: Configure Jenkins to fail when lines are longer than 79 characters"
Well, PEP8 allows 80–100 if a community is decided to allow more
And btw it is very easy to keep the changed lines below 80 chars.
In these days of 16:9 monitors and 1920x1080 resolutions (usual notebook for everyday use) it is funny to restrict lines to a third of a monitor just to be able to make 3-way comparison? Or why? In addition it sometimes requires to add some crazy hacks like
...\ ...
(I personally *hate* this one in code)
Change 407507 abandoned by Zoranzoki21:
Revert "tox.ini: Configure Jenkins to fail when lines are longer than 79 characters"
Reason:
I have problem with cannot merge. I will upload new change
Change 407517 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Allow 100 characters per line
@Dvorava: let’s have a Monitor with 1920 dots resolution so see patch diffs side by side in a normal char size of 12 points. Gives 80 chars. Ok say 10 points is enough. But you need some frames an line numbers. I think this is a good reason for 80 chars limit. Or take python‘s IDLE. The default wide is 80 chars. Good enough to pin to windows side by side without needing a slider so show the lines. You may use brackets zu continue lines too, divide code in smaller parts to avoid indenting, shorten expressions by assigning it to identifiers etc.
Well, for example Gerrit, on my current machine, 7 years old laptop, 15.6'' 1366x768, can almost handle 100 chars side-by-side (I think 96 or so, but I have got a dock on the left side of the screen. Otherwise it would be over 100. See screenshot). But I am going to buy a new one and I think this is really too narrow for modern ones. And as for reading: It is really too narrow to even keep track of what the code is doing when reading the code. I don't say: Let's remove the limit at all. I don't say let's break PEP8. I just simply say this is not really helpful in anything. Gerrit, 82 chars on marked line, still a space on the right and even more if left dock would be at the bottom:
The screen resolution of my desktop computer is 1280 * 1024.
It's an old monitor, but it's been working fine for me.
According to statcounter statistics for Jan 2018, 2.92% of desktop have a screen resolution of 1280*720 and 4.44% of them 1280*1024.
However I don't mind if the limit is changed if I'm the only one here who feels more comfortable with 80 character limit.
Change 407517 abandoned by Zoranzoki21:
Allow 100 characters per line
Reason:
Nothing. We have to live with limit.