Remove py26 artefacts from oslo.messaging code
If we are not support py26 anymore, we can remove py26 tox environment and some specific code. Change-Id: I9b935c0bcbb4ddfd5388ad5ad76c6e7662c9f2fa
This commit is contained in:
parent
7c2aa0ced0
commit
2734fc8f50
@ -307,7 +307,6 @@ class TestRabbitTransportURL(test_utils.BaseTestCase):
|
||||
)),
|
||||
('rabbit_ipv6',
|
||||
dict(url='rabbit://u:p@[fd00:beef:dead:55::133]:10/vhost',
|
||||
skip_py26='python 2.6 has broken urlparse for ipv6',
|
||||
expected=['amqp://u:p@[fd00:beef:dead:55::133]:10/vhost'])),
|
||||
('rabbit_ipv4',
|
||||
dict(url='rabbit://user:password@10.20.30.40:10/vhost',
|
||||
@ -323,9 +322,6 @@ class TestRabbitTransportURL(test_utils.BaseTestCase):
|
||||
@mock.patch('oslo_messaging._drivers.impl_rabbit.Connection.ensure')
|
||||
@mock.patch('oslo_messaging._drivers.impl_rabbit.Connection.reset')
|
||||
def test_transport_url(self, fake_reset, fake_ensure):
|
||||
if hasattr(self, 'skip_py26') and sys.version_info < (2, 7):
|
||||
self.skipTest(self.skip_py26)
|
||||
|
||||
transport = oslo_messaging.get_transport(self.conf, self.url)
|
||||
self.addCleanup(transport.cleanup)
|
||||
driver = transport._driver
|
||||
|
@ -20,7 +20,6 @@ import sys
|
||||
|
||||
from oslo_utils import timeutils
|
||||
import testscenarios
|
||||
import testtools
|
||||
|
||||
import oslo_messaging
|
||||
from oslo_messaging.tests.notify import test_notifier
|
||||
@ -100,8 +99,6 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||
'extra': None},
|
||||
n['payload'])
|
||||
|
||||
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
||||
"Need logging.config.dictConfig (Python >= 2.7)")
|
||||
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||
def test_logging_conf(self, mock_utcnow):
|
||||
with mock.patch('oslo_messaging.transport.get_transport',
|
||||
|
@ -143,7 +143,6 @@ class TestRabbitTransportURL(test_utils.BaseTestCase):
|
||||
expected=['amqp://user:password@host:10/virtual_host'])),
|
||||
('rabbit_ipv6',
|
||||
dict(url='kombu+rabbit://u:p@[fd00:beef:dead:55::133]:10/vhost',
|
||||
skip_py26='python 2.6 has broken urlparse for ipv6',
|
||||
expected=['amqp://u:p@[fd00:beef:dead:55::133]:10/vhost'])),
|
||||
('rabbit_ipv4',
|
||||
dict(url='kombu+rabbit://user:password@10.20.30.40:10/vhost',
|
||||
@ -159,9 +158,6 @@ class TestRabbitTransportURL(test_utils.BaseTestCase):
|
||||
@mock.patch('oslo_messaging._drivers.impl_rabbit.Connection.ensure')
|
||||
@mock.patch('oslo_messaging._drivers.impl_rabbit.Connection.reset')
|
||||
def test_transport_url(self, fake_ensure_connection, fake_reset):
|
||||
if hasattr(self, 'skip_py26') and sys.version_info < (2, 7):
|
||||
self.skipTest(self.skip_py26)
|
||||
|
||||
transport = messaging.get_transport(self.conf, self.url)
|
||||
self.addCleanup(transport.cleanup)
|
||||
driver = transport._driver
|
||||
|
@ -20,7 +20,6 @@ import sys
|
||||
|
||||
from oslo_utils import timeutils
|
||||
import testscenarios
|
||||
import testtools
|
||||
|
||||
from oslo import messaging
|
||||
import oslo_messaging
|
||||
@ -101,8 +100,6 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||
'extra': None},
|
||||
n['payload'])
|
||||
|
||||
@testtools.skipUnless(hasattr(logging.config, 'dictConfig'),
|
||||
"Need logging.config.dictConfig (Python >= 2.7)")
|
||||
@mock.patch('oslo_utils.timeutils.utcnow')
|
||||
def test_logging_conf(self, mock_utcnow):
|
||||
with mock.patch('oslo_messaging.transport.get_transport',
|
||||
|
Loading…
Reference in New Issue
Block a user