Bump Pyroute2 version to 0.5.5
Pyroute2 is modifying the default logger, adding NullHandler to it. If the logger is not properly configured, like in any service or agent spawn in Neutron, the only handler will be NullHandler. This prevents from rendering the message passed, as when StreamHandler is used. This issue is present only in version 0.5.4 and 0.5.5. Current Pyroute2 master version implements a new logger which removes this problem. [1]https://github.com/svinota/pyroute2/blob/0.5.5/pyroute2/__init__.py#L78-L79 Change-Id: Ic89d8503e9d1a7f622f0c3a148bf78766b92ed08 Related-Bug: #1811515
This commit is contained in:
parent
bd3d85807c
commit
d2d57371dc
|
@ -106,7 +106,7 @@ pylint==2.2.0
|
||||||
PyMySQL==0.7.6
|
PyMySQL==0.7.6
|
||||||
pyparsing==2.1.0
|
pyparsing==2.1.0
|
||||||
pyperclip==1.5.27
|
pyperclip==1.5.27
|
||||||
pyroute2==0.5.3
|
pyroute2==0.5.5
|
||||||
python-dateutil==2.5.3
|
python-dateutil==2.5.3
|
||||||
python-designateclient==2.7.0
|
python-designateclient==2.7.0
|
||||||
python-editor==1.0.3
|
python-editor==1.0.3
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
@ -22,7 +23,7 @@ import eventlet
|
||||||
import mock
|
import mock
|
||||||
import netaddr
|
import netaddr
|
||||||
from neutron_lib import constants
|
from neutron_lib import constants
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as oslo_logging
|
||||||
import six
|
import six
|
||||||
import testscenarios
|
import testscenarios
|
||||||
import testtools
|
import testtools
|
||||||
|
@ -302,7 +303,11 @@ class TestDelayedStringRenderer(base.BaseTestCase):
|
||||||
self.assertEqual("Type: Brie cheese!", string)
|
self.assertEqual("Type: Brie cheese!", string)
|
||||||
|
|
||||||
def test_not_called_with_low_log_level(self):
|
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
|
# make sure we return logging to previous level
|
||||||
current_log_level = LOG.logger.getEffectiveLevel()
|
current_log_level = LOG.logger.getEffectiveLevel()
|
||||||
self.addCleanup(LOG.logger.setLevel, current_log_level)
|
self.addCleanup(LOG.logger.setLevel, current_log_level)
|
||||||
|
@ -311,12 +316,12 @@ class TestDelayedStringRenderer(base.BaseTestCase):
|
||||||
delayed = utils.DelayedStringRenderer(my_func)
|
delayed = utils.DelayedStringRenderer(my_func)
|
||||||
|
|
||||||
# set to warning so we shouldn't be logging debug messages
|
# 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)
|
LOG.debug("Hello %s", delayed)
|
||||||
self.assertFalse(my_func.called)
|
self.assertFalse(my_func.called)
|
||||||
|
|
||||||
# but it should be called with the debug level
|
# 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)
|
LOG.debug("Hello %s", delayed)
|
||||||
self.assertTrue(my_func.called)
|
self.assertTrue(my_func.called)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ os-ken >= 0.3.0 # Apache-2.0
|
||||||
ovs>=2.8.0 # Apache-2.0
|
ovs>=2.8.0 # Apache-2.0
|
||||||
ovsdbapp>=0.9.1 # Apache-2.0
|
ovsdbapp>=0.9.1 # Apache-2.0
|
||||||
psutil>=3.2.2 # BSD
|
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
|
weakrefmethod>=1.0.2;python_version=='2.7' # PSF
|
||||||
|
|
||||||
python-novaclient>=9.1.0 # Apache-2.0
|
python-novaclient>=9.1.0 # Apache-2.0
|
||||||
|
|
Loading…
Reference in New Issue