Remove six library from requirements.txt

Six is unused in the code, and generally unused in all of
Openstack, so remove it.

Removed setuptools pin in test-requirements.txt since it
was causing an older pkg_resources to be used, which was
trying to import six.

Fixed some invalid assertion statements in unit tests.

Change-Id: Id8c182a9aec5e25a8078b33127095ab8dce9dc33
This commit is contained in:
Brian Haley 2024-04-29 11:42:27 -04:00
parent a9d893e733
commit 9706bba3cb
5 changed files with 7 additions and 12 deletions

View File

@ -138,7 +138,6 @@ BASE_PACKAGES = [
'nova-compute', 'nova-compute',
'genisoimage', # was missing as a package dependency until raring. 'genisoimage', # was missing as a package dependency until raring.
'librbd1', # bug 1440953 'librbd1', # bug 1440953
'python-six',
'python-psutil', 'python-psutil',
'xfsprogs', 'xfsprogs',
'nfs-common', 'nfs-common',
@ -174,7 +173,6 @@ MULTIPATH_PACKAGES = [
HELD_PACKAGES = [ HELD_PACKAGES = [
'python-memcache', 'python-memcache',
'python-six',
'python-psutil', 'python-psutil',
] ]

View File

@ -22,7 +22,6 @@ cryptography<3.4
netaddr>0.7.16,<0.8.0 netaddr>0.7.16,<0.8.0
Jinja2>=2.6 # BSD License (3 clause) Jinja2>=2.6 # BSD License (3 clause)
six>=1.9.0
dnspython dnspython

View File

@ -8,7 +8,6 @@
# all of its own requirements and if it doesn't, fix it there. # all of its own requirements and if it doesn't, fix it there.
# #
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here. pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
requests>=2.18.4 requests>=2.18.4

View File

@ -50,6 +50,5 @@ class MainTestCase(CharmTestCase):
self.assertEqual(len(dummy_action), 1) self.assertEqual(len(dummy_action), 1)
d = dummy_action[0] d = dummy_action[0]
self.assertIsInstance(d, dict) self.assertIsInstance(d, dict)
self.assert_('hugepagestats' in d) self.assertIn('hugepagestats', d)
self.assert_( self.assertNotEqual(d['hugepagestats'].find('/free_hugepages'), -1)
d['hugepagestats'].find('/free_hugepages') != -1)

View File

@ -573,8 +573,8 @@ class NovaComputeContextTests(CharmTestCase):
self.test_config.set('enable-live-migration', True) self.test_config.set('enable-live-migration', True)
self.test_config.set('migration-auth-type', 'ssh') self.test_config.set('migration-auth-type', 'ssh')
self.os_release.return_value = 'kilo' self.os_release.return_value = 'kilo'
self.assertEquals(context.NovaComputeLibvirtContext()()[ self.assertEqual(context.NovaComputeLibvirtContext()()[
'live_migration_uri'], 'qemu+ssh://%s/system') 'live_migration_uri'], 'qemu+ssh://%s/system')
def test_libvirt_context_with_migration_network(self): def test_libvirt_context_with_migration_network(self):
self.kv.return_value = FakeUnitdata(**{'host_uuid': self.host_uuid}) self.kv.return_value = FakeUnitdata(**{'host_uuid': self.host_uuid})
@ -597,9 +597,9 @@ class NovaComputeContextTests(CharmTestCase):
self.get_relation_ip.assert_called_with('migration', self.get_relation_ip.assert_called_with('migration',
cidr_network=None) cidr_network=None)
self.assertTrue('live_migration_uri' not in libvirt_context.keys()) self.assertTrue('live_migration_uri' not in libvirt_context.keys())
self.assertEquals(libvirt_context['live_migration_scheme'], 'ssh') self.assertEqual(libvirt_context['live_migration_scheme'], 'ssh')
self.assertEquals(libvirt_context['live_migration_inbound_addr'], self.assertEqual(libvirt_context['live_migration_inbound_addr'],
'10.5.0.5') '10.5.0.5')
def test_libvirt_bin_context_migration_tcp_listen_with_auto_converge(self): def test_libvirt_bin_context_migration_tcp_listen_with_auto_converge(self):
self.kv.return_value = FakeUnitdata(**{'host_uuid': self.host_uuid}) self.kv.return_value = FakeUnitdata(**{'host_uuid': self.host_uuid})