diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-04-24 00:32:50 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-04-24 00:32:50 (GMT) |
commit | e50d8465ab36b05e5ea39613ba9ea659d85ef1a1 (patch) | |
tree | 4eacc7f79e4885100e14507b18bc5a2008434535 | |
parent | 8d9594df66977e423e5fbd60690d08d694e76224 (diff) | |
parent | 8d8221f0d674ea032337a82d1ad1d0d146510390 (diff) | |
download | cpython-e50d8465ab36b05e5ea39613ba9ea659d85ef1a1.zip cpython-e50d8465ab36b05e5ea39613ba9ea659d85ef1a1.tar.gz cpython-e50d8465ab36b05e5ea39613ba9ea659d85ef1a1.tar.bz2 |
Issue #26041: Remove "will be removed in Python 3.7" from description messages
We will keep platform.dist() and platform.linux_distribution() to make porting
from Python 2 easier.
Patch by Kumaripaba Miyurusara Athukorala.
-rw-r--r-- | Doc/whatsnew/3.5.rst | 5 | ||||
-rwxr-xr-x | Lib/platform.py | 6 | ||||
-rw-r--r-- | Lib/test/test_platform.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index ffe6ae4..01ec64e 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -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 diff --git a/Lib/platform.py b/Lib/platform.py index 042d39a..ff036e3 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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) 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() @@ -256,6 +256,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. |