Merge tag 'v3.8.2rc1' into 3.8

Python 3.8.2rc1
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index c7ba74c..7300c80 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -971,9 +971,6 @@
    This is a base class for other standard exceptions.
 
 (2)
-   This is the same as :exc:`weakref.ReferenceError`.
-
-(3)
    Only defined on Windows; protect code that uses this by testing that the
    preprocessor macro ``MS_WINDOWS`` is defined.
 
diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst
index 937330b..ec2c128 100644
--- a/Doc/library/gettext.rst
+++ b/Doc/library/gettext.rst
@@ -724,8 +724,8 @@
 .. [#] The default locale directory is system dependent; for example, on RedHat Linux
    it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/locale`.
    The :mod:`gettext` module does not try to support these system dependent
-   defaults; instead its default is :file:`{sys.prefix}/share/locale` (see
-   :data:`sys.prefix`). For this reason, it is always best to call
+   defaults; instead its default is :file:`{sys.base_prefix}/share/locale` (see
+   :data:`sys.base_prefix`). For this reason, it is always best to call
    :func:`bindtextdomain` with an explicit absolute path at the start of your
    application.
 
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 3a828c5..0d8df34 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -3898,10 +3898,8 @@
 
    See the Unix manual page
    :manpage:`times(2)` and :manpage:`times(3)` manual page on Unix or `the GetProcessTimes MSDN
-   <https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocesstimes>`
-   _ on Windows.
-   On Windows, only :attr:`user` and :attr:`system` are known; the other
-   attributes are zero.
+   <https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocesstimes>`_
+   on Windows. On Windows, only :attr:`user` and :attr:`system` are known; the other attributes are zero.
 
    .. availability:: Unix, Windows.
 
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index ea12cd1..cce7da1 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -355,14 +355,20 @@
    arguments for additional differences from the default behavior.  Unless
    otherwise stated, it is recommended to pass *args* as a sequence.
 
+   An example of passing some arguments to an external program
+   as a sequence is::
+
+     Popen(["/usr/bin/git", "commit", "-m", "Fixes a bug."])
+
    On POSIX, if *args* is a string, the string is interpreted as the name or
    path of the program to execute.  However, this can only be done if not
    passing arguments to the program.
 
    .. note::
 
-      :meth:`shlex.split` can be useful when determining the correct
-      tokenization for *args*, especially in complex cases::
+      It may not be obvious how to break a shell command into a sequence of arguments,
+      especially in complex cases. :meth:`shlex.split` can illustrate how to
+      determine the correct tokenization for *args*::
 
          >>> import shlex, subprocess
          >>> command_line = input()
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index b3c8e35..2dbe5e3 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -327,12 +327,6 @@
    types.
 
 
-.. exception:: ReferenceError
-
-   Exception raised when a proxy object is used but the underlying object has been
-   collected.  This is the same as the standard :exc:`ReferenceError` exception.
-
-
 .. seealso::
 
    :pep:`205` - Weak References
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index c6f6d03..1c98aab 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -855,7 +855,7 @@
 This spec will always have "loader" set (with one exception).
 
 To indicate to the import machinery that the spec represents a namespace
-:term:`portion`. the path entry finder sets "loader" on the spec to
+:term:`portion`, the path entry finder sets "loader" on the spec to
 ``None`` and "submodule_search_locations" to a list containing the
 portion.
 
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 1fc9e0f..9cf5634 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,6 +3,8 @@
 ======================================
 
 
+bpo-39600: Remove duplicate font names from configuration list.
+
 bpo-38792: Close a shell calltip if a :exc:`KeyboardInterrupt`
 or shell restart occurs.  Patch by Zackery Spytz.
 
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index 2235973..9d5c2cd 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -606,9 +606,8 @@
         font_size = configured_font[1]
         font_bold  = configured_font[2]=='bold'
 
-        # Set editor font selection list and font_name.
-        fonts = list(tkFont.families(self))
-        fonts.sort()
+        # Set sorted no-duplicate editor font selection list and font_name.
+        fonts = sorted(set(tkFont.families(self)))
         for font in fonts:
             self.fontlist.insert(END, font)
         self.font_name.set(font_name)
diff --git a/Misc/NEWS.d/next/IDLE/2020-02-10-17-09-48.bpo-39600.X6NsyM.rst b/Misc/NEWS.d/next/IDLE/2020-02-10-17-09-48.bpo-39600.X6NsyM.rst
new file mode 100644
index 0000000..102aa75
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2020-02-10-17-09-48.bpo-39600.X6NsyM.rst
@@ -0,0 +1 @@
+In the font configuration window, remove duplicated font names.