summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-04-24 03:32:50 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-04-24 03:32:50 +0300
commita324a8f02171fa494119a77f24b7d40aabcd90d3 (patch)
tree51b7390e67de5a9cc0c51d91affb62151227366c /Lib
parent43e551cdfddd0194667f33b9556c697d1e377b61 (diff)
parent85b32b34b1766984bff07d677922ca20c52cc675 (diff)
downloadcpython-a324a8f02171fa494119a77f24b7d40aabcd90d3.tar.gz
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.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/platform.py6
-rw-r--r--Lib/test/test_platform.py6
2 files changed, 4 insertions, 8 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 042d39a50f..ff036e38cf 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 3ea71f1fd9..3e53212fa1 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()