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 <klmi...@mit.edu>
signature.asc
Description: This is a digitally signed message part
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev