remove get_systemd_os_info (#7526)

Fixes #7500.
This commit is contained in:
Brad Warren
2019-11-08 11:11:03 -08:00
committed by GitHub
parent 4b488614cf
commit 0a48d7bf7e
3 changed files with 3 additions and 24 deletions
+3 -2
View File
@@ -14,8 +14,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
* `certbot.plugins.common.TLSSNI01` has been removed.
* The functions `certbot.client.view_config_changes`,
`certbot.main.config_changes`,
`certbot.plugins.common.Installer.view_config_changes`, and
`certbot.reverter.Reverter.view_config_changes` have been removed
`certbot.plugins.common.Installer.view_config_changes`,
`certbot.reverter.Reverter.view_config_changes`, and
`certbot.util.get_systemd_os_info` have been removed
### Fixed
-8
View File
@@ -510,14 +510,6 @@ class OsInfoTest(unittest.TestCase):
m_distro.linux_distribution.return_value = ("something", "else")
self.assertEqual(cbutil.get_os_info(), ("something", "else"))
@mock.patch("warnings.warn")
@mock.patch("certbot.util.distro")
@unittest.skipUnless(sys.platform.startswith("linux"), "requires Linux")
def test_get_systemd_os_info_deprecation(self, _, mock_warn):
import certbot.util as cbutil
cbutil.get_systemd_os_info()
self.assertTrue(mock_warn.called)
@mock.patch("certbot.util.subprocess.Popen")
def test_non_systemd_os_info(self, popen_mock):
import certbot.util as cbutil
-14
View File
@@ -13,7 +13,6 @@ import re
import socket
import subprocess
import sys
import warnings
import configargparse
import six
@@ -308,19 +307,6 @@ def get_os_info_ua():
return " ".join(get_python_os_info(pretty=True))
return os_info
def get_systemd_os_info():
"""
Parse systemd /etc/os-release for distribution information
:returns: (os_name, os_version)
:rtype: `tuple` of `str`
"""
warnings.warn(
"The get_sytemd_os_like() function is deprecated and will be removed in "
"a future release.", DeprecationWarning, stacklevel=2)
return get_os_info()[:2]
def get_systemd_os_like():
"""
Get a list of strings that indicate the distribution likeness to