diff --git a/lower-constraints.txt b/lower-constraints.txt index c0d07206025..51d4c804171 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -106,7 +106,7 @@ pylint==2.2.0 PyMySQL==0.7.6 pyparsing==2.1.0 pyperclip==1.5.27 -pyroute2==0.5.3 +pyroute2==0.5.5 python-dateutil==2.5.3 python-designateclient==2.7.0 python-editor==1.0.3 diff --git a/neutron/tests/unit/common/test_utils.py b/neutron/tests/unit/common/test_utils.py index c21ad669d3b..c69f2aa9e69 100644 --- a/neutron/tests/unit/common/test_utils.py +++ b/neutron/tests/unit/common/test_utils.py @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. +import logging import os.path import random import re @@ -22,7 +23,7 @@ import eventlet import mock import netaddr from neutron_lib import constants -from oslo_log import log as logging +from oslo_log import log as oslo_logging import six import testscenarios import testtools @@ -302,7 +303,11 @@ class TestDelayedStringRenderer(base.BaseTestCase): self.assertEqual("Type: Brie cheese!", string) def test_not_called_with_low_log_level(self): - LOG = logging.getLogger(__name__) + LOG = oslo_logging.getLogger(__name__) + root_logger = logging.getLogger(__name__) + if not root_logger.handlers: + root_logger.addHandler(logging.StreamHandler()) + # make sure we return logging to previous level current_log_level = LOG.logger.getEffectiveLevel() self.addCleanup(LOG.logger.setLevel, current_log_level) @@ -311,12 +316,12 @@ class TestDelayedStringRenderer(base.BaseTestCase): delayed = utils.DelayedStringRenderer(my_func) # set to warning so we shouldn't be logging debug messages - LOG.logger.setLevel(logging.logging.WARNING) + LOG.logger.setLevel(oslo_logging.WARNING) LOG.debug("Hello %s", delayed) self.assertFalse(my_func.called) # but it should be called with the debug level - LOG.logger.setLevel(logging.logging.DEBUG) + LOG.logger.setLevel(oslo_logging.DEBUG) LOG.debug("Hello %s", delayed) self.assertTrue(my_func.called) diff --git a/requirements.txt b/requirements.txt index 010434e655b..2593cda5588 100644 --- a/requirements.txt +++ b/requirements.txt @@ -47,7 +47,7 @@ os-ken >= 0.3.0 # Apache-2.0 ovs>=2.8.0 # Apache-2.0 ovsdbapp>=0.9.1 # Apache-2.0 psutil>=3.2.2 # BSD -pyroute2>=0.5.3;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2) +pyroute2>=0.5.5;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2) weakrefmethod>=1.0.2;python_version=='2.7' # PSF python-novaclient>=9.1.0 # Apache-2.0