From 4512a160d045695ee0349fd91af7aaaa6fb71410 Mon Sep 17 00:00:00 2001
From: "Miss Islington (bot)"
 <31488909+miss-islington@users.noreply.github.com>
Date: Fri, 5 Aug 2022 00:42:21 -0700
Subject: [PATCH] gh-65802: IDLE - explain SaveAs and extensions (GH-95690)
 (GH-95692)

File name extensions may or may not be shown for the current name
and are added in an OS-dependent manner if not given for the new
name.
(cherry picked from commit 9890f86ae2001d19e7a18fee5b13aa0dd6069aef)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
---
 Doc/library/idle.rst                                       | 7 +++++--
 Lib/idlelib/NEWS.txt                                       | 2 ++
 .../IDLE/2022-08-04-20-07-51.gh-issue-65802.xnThWe.rst     | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 Misc/NEWS.d/next/IDLE/2022-08-04-20-07-51.gh-issue-65802.xnThWe.rst

diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index e91ec40c9ad..2d52e535574 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -87,11 +87,14 @@ Save
 
 Save As...
    Save the current window with a Save As dialog.  The file saved becomes the
-   new associated file for the window.
+   new associated file for the window. (If your file namager is set to hide
+   extensions, the current extension will be omitted in the file name box.
+   If the new filename has no '.', '.py' and .'txt' will be added for Python
+   and text files, except that on macOS Aqua,'.py' is added for all files.)
 
 Save Copy As...
    Save the current window to different file without changing the associated
-   file.
+   file.  (See Save As note above about filename extensions.)
 
 Print Window
    Print the current window to the default printer.
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index ce95e2f9948..7fa7facf8cf 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -4,6 +4,8 @@ Released on 2022-10-03
 =========================
 
 
+gh-65802: Document handling of extensions in Save As dialogs.
+
 gh-95191: Include prompts when saving Shell (interactive input/output).
 
 gh-95511: Fix the Shell context menu copy-with-prompts bug of copying
diff --git a/Misc/NEWS.d/next/IDLE/2022-08-04-20-07-51.gh-issue-65802.xnThWe.rst b/Misc/NEWS.d/next/IDLE/2022-08-04-20-07-51.gh-issue-65802.xnThWe.rst
new file mode 100644
index 00000000000..a62a784b6e6
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2022-08-04-20-07-51.gh-issue-65802.xnThWe.rst
@@ -0,0 +1 @@
+Document handling of extensions in Save As dialogs.
-- 
GitLab