diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index 53cd602..e36b9f9 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -2271,7 +2271,7 @@ class has been deprecated. (Contributed by Serhiy Storchaka in :issue:`23671`.) The :func:`platform.dist` and :func:`platform.linux_distribution` functions -are now deprecated and will be removed in Python 3.7. Linux distributions use +are now deprecated. Linux distributions use too many different ways of describing themselves, so the functionality is left to a package. (Contributed by Vajrasky Kok and Berker Peksag in :issue:`1322`.) diff --git a/Lib/platform.py b/Lib/platform.py index f3d2c42..6aba938 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -303,7 +303,7 @@ def linux_distribution(distname='', version='', id='', full_distribution_name=1): import warnings warnings.warn("dist() and linux_distribution() functions are deprecated " - "in Python 3.5 and will be removed in Python 3.7", + "in Python 3.5", PendingDeprecationWarning, stacklevel=2) return _linux_distribution(distname, version, id, supported_dists, full_distribution_name) @@ -378,7 +378,7 @@ def dist(distname='', version='', id='', """ import warnings warnings.warn("dist() and linux_distribution() functions are deprecated " - "in Python 3.5 and will be removed in Python 3.7", + "in Python 3.5", PendingDeprecationWarning, stacklevel=2) return _linux_distribution(distname, version, id, supported_dists=supported_dists, diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 3ea71f1..3e53212 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -333,16 +333,14 @@ class DeprecationTest(unittest.TestCase): platform.dist() self.assertEqual(str(cm.warning), 'dist() and linux_distribution() functions are ' - 'deprecated in Python 3.5 and will be removed in ' - 'Python 3.7') + 'deprecated in Python 3.5') def test_linux_distribution_deprecation(self): with self.assertWarns(PendingDeprecationWarning) as cm: platform.linux_distribution() self.assertEqual(str(cm.warning), 'dist() and linux_distribution() functions are ' - 'deprecated in Python 3.5 and will be removed in ' - 'Python 3.7') + 'deprecated in Python 3.5') if __name__ == '__main__': unittest.main()