Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29342128: Noissue - Add requirement for Python 3.5 compatibility to Python section of the coding style guide (Closed)

Created:
May 17, 2016, 5:28 p.m. by Vasily Kuznetsov
Modified:
May 19, 2016, 1 p.m.
CC:
Felix Dahlke, Jon Sonesen
Visibility:
Public.

Description

Noissue - Add requirement for Python 3.5 compatibility to Python section of the coding style guide

Patch Set 1 #

Total comments: 12

Patch Set 2 : Fix the translation boilerplate #

Patch Set 3 : Replace Python 3.5 with Python 3.5+ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M pages/coding-style.html View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12
Vasily Kuznetsov
I added a rule about python version compatibility that requires 2.7 and 3.5. It doesn't ...
May 17, 2016, 5:30 p.m. (2016-05-17 17:30:18 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 17, 2016, 5:51 p.m. (2016-05-17 17:51:01 UTC) #2
Vasily Kuznetsov
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 18, 2016, 8:50 a.m. (2016-05-18 08:50:50 UTC) #3
Sebastian Noack
This is the suggested change to the coding style guide in regard of Python 3, ...
May 18, 2016, 4:23 p.m. (2016-05-18 16:23:30 UTC) #4
Wladimir Palant
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 18, 2016, 6:28 p.m. (2016-05-18 18:28:09 UTC) #5
Wladimir Palant
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 18, 2016, 6:47 p.m. (2016-05-18 18:47:47 UTC) #6
Sebastian Noack
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 18, 2016, 7:06 p.m. (2016-05-18 19:06:32 UTC) #7
Vasily Kuznetsov
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 19, 2016, 9:03 a.m. (2016-05-19 09:03:31 UTC) #8
Sebastian Noack
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 19, 2016, 10:10 a.m. (2016-05-19 10:10:24 UTC) #9
Vasily Kuznetsov
https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 and ...
May 19, 2016, 10:52 a.m. (2016-05-19 10:52:28 UTC) #10
Wladimir Palant
LGTM https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html File pages/coding-style.html (right): https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style.html#newcode47 pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7 ...
May 19, 2016, 11:33 a.m. (2016-05-19 11:33:26 UTC) #11
Sebastian Noack
May 19, 2016, 11:51 a.m. (2016-05-19 11:51:54 UTC) #12
LGTM

https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style....
File pages/coding-style.html (right):

https://codereview.adblockplus.org/29342128/diff/29342129/pages/coding-style....
pages/coding-style.html:47: <li>Make the code compatible with both Python 2.7
and Python 3.5 (see <a
href="https://docs.python.org/dev/howto/pyporting.html">this guide</a>). Use <a
href="https://docs.python.org/2/library/__future__.html">__future__ imports</a>
to address syntactic differences but avoid <a
href="https://pythonhosted.org/six/">six</a>, <a
href="http://python-future.org/compatible_idioms.html">python-future</a>, etc.
to not introduce additional dependencies.</li>
On 2016/05/19 11:33:26, Wladimir Palant wrote:
> On 2016/05/19 10:10:24, Sebastian Noack wrote:
> > Yes, Python 3.6+ will in theory be backwards compatible with Python 3.5. But
> > nevertheless, as soon as Python 3.6 is out, we should test it as well (which
> in
> > most cases just means to add an env to the tox.ini).
> 
> As long as this is about automated testing - yes, testing in newer Python
> versions is a good thing. Manual testing should always happen with Python 3.5,
> since that's the platform we are going to use for a long time. And it makes
> sense to mention this explicitly here, since we probably want to have a
> consistent baseline Python version throughout all projects. Whether it's
Python
> 3.5 or Python 3.5+ I don't really care.

I agree, that when manually testing it's important to test on 3.5. However, if
you take the style guide literally you would test on 2.7, 3.5 and each newer
version anyway. Plus, new code as well as code migrated to Python 3, will have
automated tests anyway. So IMO no reason to be even more explicit.

Powered by Google App Engine
This is Rietveld