diff --git a/oslo/version/version.py b/oslo/version/version.py index 9327af4..70077a6 100644 --- a/oslo/version/version.py +++ b/oslo/version/version.py @@ -257,20 +257,3 @@ class VersionInfo(object): def suffix_string(self): self._load_vendor_strings() return self.suffix - - # Compatibility functions - canonical_version_string = version_string - version_string_with_vcs = release_string - package_string = suffix_string - - def cached_version_string(self, prefix=""): - """Generate an object which will expand in a string context to - the results of version_string(). We do this so that don't - call into pkg_resources every time we start up a program when - passing version information into the CONF constructor, but - rather only do the calculation when and if a version is requested - """ - if not self._cached_version: - self._cached_version = "%s%s" % (prefix, - self.version_string()) - return self._cached_version diff --git a/tests/test_version.py b/tests/test_version.py index 031302e..9ab9e89 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -23,18 +23,6 @@ from oslo.version import version import tests -class DeferredVersionTestCase(tests.BaseTestCase): - - def test_cached_version(self): - class MyVersionInfo(version.VersionInfo): - def _get_version_from_pkg_resources(self): - return "5.5.5.5" - - deferred_string = MyVersionInfo("openstack").\ - cached_version_string() - self.assertEqual("5.5.5.5", deferred_string) - - class FindConfigFilesTestCase(tests.BaseTestCase): def _monkey_patch(self, config_files):