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?
If the py3 pep8 is stricter, couldn't we just move to only that one? Michael On Wed., 4 Apr. 2018, 8:19 am Kevin L. Mitchell, <[email protected]> wrote: > On Wed, 2018-04-04 at 07:54 +1000, Michael Still wrote: > > Thanks to jichenjc for fixing the pep8 failures I was seeing on > > master. I'd decided they were specific to my local dev environment > > given no one else was seeing them. > > > > As I said in the patch that fixed the issue [1], I think its worth > > exploring how these got through the gate in the first place. There is > > nothing in the patch which stops us from ending up here again, and no > > real explanation for what caused the issue in the first place. > > While there was no discussion in the patch, the topic of the patch > hints at the cause: "fix_pep8_py3". These were probably pep8 errors > that would only occur if pep8 was running under Python 3 and not Python > 2. The first error was fixed by removing a debugging print that was > formatted as "print (…)", which would satisfy pep8 under Python 2—since > 'print' is a statement—but not under Python 3, where it's a function. > The second error was in a clause protected by six.PY2, and was caused > by "unicode" being missing in Python 3; the solution jichenjc chose > there was to disable the pep8 check for that line. > > The only way I can imagine stopping these errors in the future would be > to double-up on the pep8 check: have the gate run pep8 under both > Python 2 and Python 3. > -- > Kevin L. Mitchell <[email protected] > >__________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: [email protected]?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
