bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669) (GH-6862)

Also bump PendingDeprecationWarning to DeprecationWarning.
(cherry picked from commit 9eb40bc38de83e6ad3fad1931bba1cd36ae88c24)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
diff --git a/Lib/platform.py b/Lib/platform.py
index dc981ec..20f9817 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -302,7 +302,7 @@
                        full_distribution_name=1):
     import warnings
     warnings.warn("dist() and linux_distribution() functions are deprecated "
-                  "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
+                  "in Python 3.5", DeprecationWarning, stacklevel=2)
     return _linux_distribution(distname, version, id, supported_dists,
                                full_distribution_name)
 
@@ -376,7 +376,7 @@
     """
     import warnings
     warnings.warn("dist() and linux_distribution() functions are deprecated "
-                  "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
+                  "in Python 3.5", DeprecationWarning, stacklevel=2)
     return _linux_distribution(distname, version, id,
                                supported_dists=supported_dists,
                                full_distribution_name=0)
@@ -1345,7 +1345,7 @@
                 'ignore',
                 r'dist\(\) and linux_distribution\(\) '
                 'functions are deprecated .*',
-                PendingDeprecationWarning,
+                DeprecationWarning,
             )
             distname, distversion, distid = dist('')
         if distname and not terse:
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 2cf4d3f..5f1e28a 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -353,14 +353,14 @@
 class DeprecationTest(unittest.TestCase):
 
     def test_dist_deprecation(self):
-        with self.assertWarns(PendingDeprecationWarning) as cm:
+        with self.assertWarns(DeprecationWarning) as cm:
             platform.dist()
         self.assertEqual(str(cm.warning),
                          'dist() and linux_distribution() functions are '
                          'deprecated in Python 3.5')
 
     def test_linux_distribution_deprecation(self):
-        with self.assertWarns(PendingDeprecationWarning) as cm:
+        with self.assertWarns(DeprecationWarning) as cm:
             platform.linux_distribution()
         self.assertEqual(str(cm.warning),
                          'dist() and linux_distribution() functions are '