pep8 job failing with F821 in test_l3

Bug #1611400 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Critical
Ihar Hrachyshka

Bug Description

New flake8 was released today, and probably broke neutron pep8 job with:

pep8 runtests: commands[2] | flake8
./neutron/tests/unit/extensions/test_l3.py:2931:19: F821 undefined name '_'
            msg = _("Failure mocking...")
                  ^

Tags: gate-failure
Changed in neutron:
importance: Undecided → High
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
tags: added: gate-failure
Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: High → Critical
Revision history for this message
Sreekumar S (sreesiv) wrote :

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/346376

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Seems like it's not really new flake8, because I can reproduce it with flake8 2.5.5 too. I also compared pip freeze output in my local venv and for the gate job that merged it, and there are no real differences. I am hugely puzzled now.

summary: - pep8 job failing with new flake8 3.0.4
+ pep8 job failing with F821 in test_l3
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

Actually I cannot find the failure in gate job now. And also I cannot reproduce in my env.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Hirofumi, I was not sure, so I asked Jakub Libosvar to test it in his environment, and he was able to catch the error. Not sure what's going on, but there is definitely a violation of flake.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/352941
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a200f4a7b670abd7f6fc59847782719057bfe6ef
Submitter: Jenkins
Branch: master

commit a200f4a7b670abd7f6fc59847782719057bfe6ef
Author: Ihar Hrachyshka <email address hidden>
Date: Tue Aug 9 16:32:33 2016 +0200

    pep8: fixed F821 violation in a unit test

    The _ symbol should have been imported explicitly. Actually, there is no
    use case for translatable messages in unit tests, it's just a waste of
    translator time to mark it as such. The patch removes the translation
    marker for good.

    Change-Id: I76bef710a1030dcb4eb35778ebf44ed600016f17
    Closes-Bug: #1611400

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.0.0.0b3

This issue was fixed in the openstack/neutron 9.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.