mox_fixture = self.useFixture(moxstubout.MoxStubout()) usage is deprecated from oslo.test 3.5.0

Bug #1778784 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Matt Riedemann
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Rocky
Fix Committed
Medium
Matt Riedemann

Bug Description

Due to this deprecation in oslo.test 3.5.0:

https://github.com/openstack/oslotest/commit/cae8c8d51a94b891ce5b311a91d01b4264b296d2#diff-72a674ad74b628edbd0f73729c353b85R24

We get this warning quite a bit:

nova/test.py:323: DeprecationWarning: Using class 'MoxStubout' (either directly or via inheritance) is deprecated in version '3.5.0'
      mox_fixture = self.useFixture(moxstubout.MoxStubout())

A simple alternative for nova is to just use the same fixture from mox3:

http://git.openstack.org/cgit/openstack/mox3/tree/mox3/fixture.py#n21

Matt Riedemann (mriedem)
tags: added: low-hanging-fruit
Chason Chan (chen-xing)
Changed in nova:
assignee: nobody → Chason Chan (chen-xing)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/579482

Changed in nova:
status: Triaged → In Progress
Erno Kuvaja (jokke)
Changed in glance:
importance: Undecided → Medium
Monica (monica01)
Changed in glance:
assignee: nobody → Monica (monica01)
Changed in nova:
assignee: Chason Chan (chen-xing) → melanie witt (melwitt)
Changed in nova:
assignee: melanie witt (melwitt) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/623309

Changed in nova:
assignee: Matt Riedemann (mriedem) → Balazs Gibizer (balazs-gibizer)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Matt Riedemann (mriedem)
no longer affects: nova/queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/623545

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

Reviewed: https://review.openstack.org/623309
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2f693360b4cf7616c6e1ff5573aedeab801e88b8
Submitter: Zuul
Branch: master

commit 2f693360b4cf7616c6e1ff5573aedeab801e88b8
Author: Matt Riedemann <email address hidden>
Date: Thu Dec 6 15:35:58 2018 -0500

    Ignore MoxStubout deprecation warnings

    Like how we ignore mox3 usage warnings, we can ignore
    MoxStubout deprecation warnings as well.

    In a py35 unit test run, these warnings show up over
    1000 times (probably closer to 17K+ based on the number
    of unit tests we run) and bloat the console logs.

    Change-Id: I598999303c8e91f448e48dea1049a24332ba2f53
    Closes-Bug: #1778784

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.openstack.org/623545
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bbc431f32bcf206beec899109853e58fbe23564a
Submitter: Zuul
Branch: stable/rocky

commit bbc431f32bcf206beec899109853e58fbe23564a
Author: Matt Riedemann <email address hidden>
Date: Thu Dec 6 15:35:58 2018 -0500

    Ignore MoxStubout deprecation warnings

    Like how we ignore mox3 usage warnings, we can ignore
    MoxStubout deprecation warnings as well.

    In a py35 unit test run, these warnings show up over
    1000 times (probably closer to 17K+ based on the number
    of unit tests we run) and bloat the console logs.

    Change-Id: I598999303c8e91f448e48dea1049a24332ba2f53
    Closes-Bug: #1778784
    (cherry picked from commit 2f693360b4cf7616c6e1ff5573aedeab801e88b8)

Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in glance:
assignee: Monica (monica01) → Matt Riedemann (mriedem)
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.1.0

This issue was fixed in the openstack/nova 18.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/625092

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.opendev.org/579482

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

Glance is not using MoxStubout, closing this.

Changed in glance:
status: In Progress → Fix Released
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.