]> granicus.if.org Git - python/commitdiff
Issue #26041: Remove "will be removed in Python 3.7" from description messages
authorBerker Peksag <berker.peksag@gmail.com>
Sun, 24 Apr 2016 00:32:24 +0000 (03:32 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sun, 24 Apr 2016 00:32:24 +0000 (03:32 +0300)
We will keep platform.dist() and platform.linux_distribution() to make porting
from Python 2 easier.

Patch by Kumaripaba Miyurusara Athukorala.

Doc/whatsnew/3.5.rst
Lib/platform.py
Lib/test/test_platform.py
Misc/NEWS

index ffe6ae44c0d8db9d6f69c2d3dd0eb75a6e65d2f2..01ec64e39a857f51f65bc406f585b49d588c1adb 100644 (file)
@@ -2271,9 +2271,8 @@ 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
-too many different ways of describing themselves, so the functionality is
-left to a package.
+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`.)
 
 The previously undocumented ``from_function`` and ``from_builtin`` methods of
index 042d39a50f64a7b28f4bbed0e08c4fe3b9f47b1a..ff036e38cf57602d81efadb5803bb35f0345a26c 100755 (executable)
@@ -303,8 +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",
-                  PendingDeprecationWarning, stacklevel=2)
+                  "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
     return _linux_distribution(distname, version, id, supported_dists,
                                full_distribution_name)
 
@@ -378,8 +377,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",
-                  PendingDeprecationWarning, stacklevel=2)
+                  "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
     return _linux_distribution(distname, version, id,
                                supported_dists=supported_dists,
                                full_distribution_name=0)
index 3ea71f1fd96d66b9be4ef27fc41d7ff0a818355b..3e53212fa1e3c3380d9ae694619da44c3b13bb89 100644 (file)
@@ -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()
index 6b86995270e4df1088b68724e44fe1561e27b55f..ff4af4d8a92731e0f03874830bfc283b2818bfbe 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -107,6 +107,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #26041: Remove "will be removed in Python 3.7" from deprecation
+  messages of platform.dist() and platform.linux_distribution().
+  Patch by Kumaripaba Miyurusara Athukorala.
+
 - Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
   silently ignore keyword arguments.