bpo-17535: IDLE editor line numbers (GH-14030)

(cherry picked from commit 7123ea009b0b004062d91f69859bddf422c34ab4)

Co-authored-by: Tal Einat <taleinat@gmail.com>
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index de58f26..5975e3b 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -290,22 +290,31 @@
 Configure IDLE
    Open a configuration dialog and change preferences for the following:
    fonts, indentation, keybindings, text color themes, startup windows and
-   size, additional help sources, and extensions.  On macOS,  open the
+   size, additional help sources, and extensions.  On macOS, open the
    configuration dialog by selecting Preferences in the application
-   menu. For more, see
+   menu. For more details, see
    :ref:`Setting preferences <preferences>` under Help and preferences.
 
+   Most configuration options apply to all windows or all future windows.
+   The option items below only apply to the active window.
+
 Show/Hide Code Context (Editor Window only)
    Open a pane at the top of the edit window which shows the block context
    of the code which has scrolled above the top of the window.  See
-   :ref:`Code Context <code-context>` in the Editing and Navigation section below.
+   :ref:`Code Context <code-context>` in the Editing and Navigation section
+   below.
+
+Show/Hide Line Numbers (Editor Window only)
+   Open a column to the left of the edit window which shows the number
+   of each line of text.  The default is off, which may be changed in the
+   preferences (see :ref:`Setting preferences <preferences>`).
 
 Zoom/Restore Height
    Toggles the window between normal size and maximum height. The initial size
    defaults to 40 lines by 80 chars unless changed on the General tab of the
    Configure IDLE dialog.  The maximum height for a screen is determined by
    momentarily maximizing a window the first time one is zoomed on the screen.
-   Changing screen settings may invalidate the saved height.  This toogle has
+   Changing screen settings may invalidate the saved height.  This toggle has
    no effect when a window is maximized.
 
 Window menu (Shell and Editor)
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index fc867ac..46834ec 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -1017,6 +1017,13 @@
 
 The changes above have been backported to 3.6 maintenance releases.
 
+New in 3.7.5:
+
+Add optional line numbers for IDLE editor windows. Windows
+open without line numbers unless set otherwise in the General
+tab of the configuration dialog.
+(Contributed by Tal Einat and Saimadhav Heblikar in :issue:`17535`.)
+
 
 importlib
 ---------
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 38413a3..f8cc330 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -512,6 +512,11 @@
 idlelib and IDLE
 ----------------
 
+Add optional line numbers for IDLE editor windows. Windows
+open without line numbers unless set otherwise in the General
+tab of the configuration dialog.
+(Contributed by Tal Einat and Saimadhav Heblikar in :issue:`17535`.)
+
 Output over N lines (50 by default) is squeezed down to a button.
 N can be changed in the PyShell section of the General page of the
 Settings dialog.  Fewer, but possibly extra long, lines can be squeezed by