From 4d67703e97492d5886b8dbf5aaa0cfd52b0a5702 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 9 Jan 2025 17:41:54 -0500 Subject: [PATCH] Deprecate is_bsd and remove its use in test suite We do not support running neutron on bsd (e.g. macos) systems, so the function has no reason to exist. The only user is neutron test suite and it's proposed to remove its usage there too: If5e06dcf3a323692137d2c7cbb8ca725d9d7d821 Note: This patch reintroduces debtcollector dependency to handle the deprecation process. Change-Id: I7db4698a247df18cf5fa1ce7f8ede5c5f27ecfa0 --- neutron_lib/tests/tools.py | 2 ++ neutron_lib/tests/unit/api/test_converters.py | 3 +-- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/neutron_lib/tests/tools.py b/neutron_lib/tests/tools.py index e114a7af4..983bc24f5 100644 --- a/neutron_lib/tests/tools.py +++ b/neutron_lib/tests/tools.py @@ -18,6 +18,7 @@ import platform import random import time +from debtcollector import removals import netaddr from neutron_lib.utils import helpers @@ -37,6 +38,7 @@ class UnorderedList(list): return not self == other +@removals.remove def is_bsd(): """Return True on BSD-based systems.""" diff --git a/neutron_lib/tests/unit/api/test_converters.py b/neutron_lib/tests/unit/api/test_converters.py index acdaf2bac..f09668278 100644 --- a/neutron_lib/tests/unit/api/test_converters.py +++ b/neutron_lib/tests/unit/api/test_converters.py @@ -180,8 +180,7 @@ class TestConvertIPv6AddrCanonicalFormat(base.BaseTestCase): '2001:0db8:0:0:0:0:0:0001') self.assertEqual('2001:db8::1', result) - @testtools.skipIf(tools.is_bsd(), 'bug/1484837') - def test_convert_ipv6_compressed_address_OSX_skip(self): + def test_convert_ipv6_compressed_address(self): result = converters.convert_ip_to_canonical_format( '2001:db8:0:1:1:1:1:1') self.assertEqual('2001:db8:0:1:1:1:1:1', result) diff --git a/requirements.txt b/requirements.txt index 8acba4f45..57fb5c088 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,4 +26,4 @@ osprofiler>=1.4.0 # Apache-2.0 setproctitle>=1.1.10 # BSD WebOb>=1.7.1 # MIT os-traits>=0.9.0 # Apache-2.0 - +debtcollector>=3.0.0 # Apache-2.0