<div dir="auto">I think the bit I am lost on is the concept of running pep8 "under" a version of python. Is this an artifact of what version of pep8 I have installed somehow?<div dir="auto"><br></div><div dir="auto">If the py3 pep8 is stricter, couldn't we just move to only that one?</div><div dir="auto"><br></div><div dir="auto">Michael</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed., 4 Apr. 2018, 8:19 am Kevin L. Mitchell, <<a href="mailto:klmitch@mit.edu">klmitch@mit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 2018-04-04 at 07:54 +1000, Michael Still wrote:<br>
> Thanks to jichenjc for fixing the pep8 failures I was seeing on<br>
> master. I'd decided they were specific to my local dev environment<br>
> given no one else was seeing them.<br>
><br>
> As I said in the patch that fixed the issue [1], I think its worth<br>
> exploring how these got through the gate in the first place. There is<br>
> nothing in the patch which stops us from ending up here again, and no<br>
> real explanation for what caused the issue in the first place.<br>
<br>
While there was no discussion in the patch, the topic of the patch<br>
hints at the cause: "fix_pep8_py3". These were probably pep8 errors<br>
that would only occur if pep8 was running under Python 3 and not Python<br>
2. The first error was fixed by removing a debugging print that was<br>
formatted as "print (…)", which would satisfy pep8 under Python 2—since<br>
'print' is a statement—but not under Python 3, where it's a function.<br>
The second error was in a clause protected by six.PY2, and was caused<br>
by "unicode" being missing in Python 3; the solution jichenjc chose<br>
there was to disable the pep8 check for that line.<br>
<br>
The only way I can imagine stopping these errors in the future would be<br>
to double-up on the pep8 check: have the gate run pep8 under both<br>
Python 2 and Python 3.<br>
--<br>
Kevin L. Mitchell <<a href="mailto:klmitch@mit.edu" target="_blank" rel="noreferrer">klmitch@mit.edu</a>>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>