8000 bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478) · python/cpython@579c417 · GitHub
[go: up one dir, main page]

Skip to content

Commit 579c417

Browse files
bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)
(cherry picked from commit b65413b) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent b5ea5e5 commit 579c417

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

Doc/library/idle.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ IDLE has the following features:
2020

2121
* coded in 100% pure Python, using the :mod:`tkinter` GUI toolkit
2222

23-
* cross-platform: works mostly the same on Windows, Unix, and Mac OS X
23+
* cross-platform: works mostly the same on Windows, Unix, and macOS
2424

2525
* Python shell window (interactive interpreter) with colorizing
2626
of code input, output, and error messages
@@ -48,7 +48,7 @@ Output windows, such as used for Edit => Find in Files, are a subtype of editor
4848
window. They currently have the same top menu but a different
4949
default title and context menu.
5050

51-
On MacOS, there is one application menu. It dynamically changes according
51+
On macOS, there is one application menu. It dynamically changes according
5252
to the window currently selected. It has an IDLE menu, and some entries
5353
described below are moved around to conform to Apple guidlines.
5454

@@ -267,7 +267,7 @@ Options menu (Shell and Editor)
267267
Configure IDLE
268268
Open a configuration dialog and change preferences for the following:
269269
fonts, indentation, keybindings, text color themes, startup windows and
270-
size, additional help sources, and extensions (see below). On OS X,
270+
size, additional help sources, and extensions (see below). On macOS,
271271
open the configuration dialog by selecting Preferences in the application
272272
menu. To use a new built-in color theme (IDLE Dark) with older IDLEs,
273273
save it as a new custom theme.
@@ -324,7 +324,7 @@ on Help menu choices.
324324
Context Menus
325325
^^^^^^^^^^^^^^^^^^^^^^^^^^
326326

327-
Open a context menu by right-clicking in a window (Control-click on OS X).
327+
Open a context menu by right-clicking in a window (Control-click on macOS).
328328
Context menus have the standard clipboard functions also on the Edit menu.
329329

330330
Cut
@@ -381,7 +381,7 @@ Key bindings
381381
^^^^^^^^^^^^
382382

383383
In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix and
384-
the :kbd:`Command` 8000 key on Mac OSX.
384+
the :kbd:`Command` key on macOS.
385385

386386
* :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
387387

@@ -526,9 +526,9 @@ code interactively. IDLE's Shell window also responds to the following keys.
526526
Command history
527527

528528
* :kbd:`Alt-p` retrieves previous command matching what you have typed. On
529-
OS X use :kbd:`C-p`.
529+
macOS use :kbd:`C-p`.
530530

531-
* :kbd:`Alt-n` retrieves next. On OS X use :kbd:`C-n`.
531+
* :kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`.
532532

533533
* :kbd:`Return` while on any previous command retrieves that command
534534

@@ -796,7 +796,7 @@ changed via Configure IDLE on the Option menu. Keys can be user defined;
796796
IDLE ships with four built-in key sets. In addition, a user can create a
797797
custom key set in the Configure IDLE dialog under the keys tab.
798798

799-
IDLE on MacOS
799+
IDLE on macOS
800800
^^^^^^^^^^^^^
801801

802802
Under System Preferences: Dock, one can set "Prefer tabs when opening

Lib/idlelib/config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,12 +562,11 @@ def GetCurrentKeySet(self):
562562
result = self.GetKeySet(self.CurrentKeys())
563563

564564
if sys.platform == "darwin":
565-
# OS X Tk variants do not support the "Alt" keyboard modifier.
566-
# So replace all keybingings that use "Alt" with ones that
567-
# use the "Option" keyboard modifier.
568-
# TODO (Ned?): the "Option" modifier does not work properly for
569-
# Cocoa Tk and XQuartz Tk so we should not use it
570-
# in default OS X KeySets.
565+
# macOS (OS X) Tk variants do not support the "Alt"
566+
# keyboard modifier. Replace it with "Option".
567+
# TODO (Ned?): the "Option" modifier does not work properly
568+
# for Cocoa Tk and XQuartz Tk so we should not use it
569+
# in the default 'OSX' keyset.
571570
for k, v in result.items():
572571
v2 = [ x.replace('<Alt-', '<Option-') for x in v ]
573572
if v != v2:

Lib/idlelib/help.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h3>Navigation</h3>
108108
<p>IDLE has the following features:</p>
109109
<ul class="simple">
110110
<li>coded in 100% pure Python, using the <a class="reference internal" href="tkinter.html#module-tkinter" title="tkinter: Interface to Tcl/Tk for graphical user interfaces"><code class="xref py py-mod docutils literal notranslate"><span class="pre">tkinter</span></code></a> GUI toolkit</li>
111-
<li>cross-platform: works mostly the same on Windows, Unix, and Mac OS X</li>
111+
<li>cross-platform: works mostly the same on Windows, Unix, and macOS</li>
112112
<li>Python shell window (interactive interpreter) with colorizing
113113
of code input, output, and error messages</li>
114114
<li>multi-window text editor with multiple undo, Python colorizing,
@@ -128,7 +128,7 @@ <h2>Menus<a class="headerlink" href="#menus" title="Permalink to this headline">
128128
<p>Output windows, such as used for Edit =&gt; Find in Files, are a subtype of editor
129129
window. They currently have the same top menu but a different
130130
default title and context menu.</p>
131-
<p>On MacOS, there is one application menu. It dynamically changes according
131+
<p>On macOS, there is one application menu. It dynamically changes according
132132
to the window currently selected. It has an IDLE menu, and some entries
133133
described below are moved around to conform to Apple guidlines.</p>
134134
<div class="section" id="file-menu-shell-and-editor">
@@ -304,7 +304,7 @@ <h3>Options menu (Shell and Editor)<a class="headerlink" href="#options-menu-she
304304
<dt>Configure IDLE</dt>
305305
<dd><p class="first">Open a configuration dialog and change preferences for the following:
306306
fonts, indentation, keybindings, text color themes, startup windows and
307-
size, additional help sources, and extensions (see below). On OS X,
307+
size, additional help sources, and extensions (see below). On macOS,
308308
open the configuration dialog by selecting Preferences in the application
309309
menu. To use a new built-in color theme (IDLE Dark) with older IDLEs,
310310
save it as a new custom theme.</p>
@@ -349,7 +349,7 @@ <h3>Help menu (Shell and Editor)<a class="headerlink" href="#help-menu-shell-and
349349
</div>
350350
<div class="section" id="context-menus">
351351
<span id="index-4"></span><h3>Context Menus<a class="headerlink" href="#context-menus" title="Permalink to this headline"></a></h3>
352-
<p>Open a context menu by right-clicking in a window (Control-click on OS X).
352+
<p>Open a context menu by right-clicking in a window (Control-click on macOS).
353353
Context menus have the standard clipboard functions also on the Edit menu.</p>
354354
<dl class="docutils">
355355
<dt>Cut</dt>
@@ -399,7 +399,7 @@ <h3>Editor windows<a class="headerlink" href="#editor-windows" title="Permalink
399399
<div class="section" id="key-bindings">
400400
<h3>Key bindings<a class="headerlink" href="#key-bindings" title="Permalink to this headline"></a></h3>
401401
<p>In this section, ‘C’ refers to the <kbd class="kbd docutils literal notranslate">Control</kbd> key on Windows and Unix and
402-
the <kbd class="kbd docutils literal notranslate">Command</kbd> key on Mac OSX.</p>
402+
the <kbd class="kbd docutils literal notranslate">Command</kbd> key on macOS.</p>
403403
<ul>
404404
<li><p class="first"><kbd class="kbd docutils literal notranslate">Backspace</kbd> deletes to the left; <kbd class="kbd docutils literal notranslate">Del</kbd> deletes to the right</p>
405405
</li>
@@ -521,8 +521,8 @@ <h3>Python Shell window<a class="headerlink" href="#python-shell-window" title="
521521
<p>Command history</p>
522522
<ul class="simple">
523523
<li><kbd class="kbd docutils literal notranslate">Alt-p</kbd> retrieves previous command matching what you have typed. On
524-
OS X use <kbd class="kbd docutils literal notranslate">C-p</kbd>.</li>
525-
<li><kbd class="kbd docutils literal notranslate">Alt-n</kbd> retrieves next. On OS X use <kbd class="kbd docutils literal notranslate">C-n</kbd>.</li>
524+
macOS use <kbd class="kbd docutils literal notranslate">C-p</kbd>.</li>
525+
<li><kbd class="kbd docutils literal notranslate">Alt-n</kbd> retrieves next. On macOS use <kbd class="kbd docutils literal notranslate">C-n</kbd>.</li>
526526
<li><kbd class="kbd docutils literal notranslate">Return</kbd> while on any previous command retrieves that command</li>
527527
</ul>
528528
</li>
@@ -757,7 +757,7 @@ <h3>Setting preferences<a class="headerlink" href="#setting-preferences" title="
757757
custom key set in the Configure IDLE dialog under the keys tab.</p>
758758
</div>
759759
<div class="section" id="idle-on-macos">
760-
<h3>IDLE on MacOS<a class="headerlink" href="#idle-on-macos" title="Permalink to this headline"></a></h3>
760+
<h3>IDLE on macOS<a class="headerlink" href="#idle-on-macos" title="Permalink to this headline"></a></h3>
761761
<p>Under System Preferences: Dock, one can set “Prefer tabs when opening
762762
documents” to “Always”. This setting is not compatible with the tk/tkinter
763763
GUI framework used by IDLE, and it breaks a few IDLE features.</p>
@@ -817,7 +817,7 @@ <h3><a href="../contents.html">Table of Contents</a></h3>
817817
<li><a class="reference internal" href="#help-and-preferences">Help and preferences</a><ul>
818818
<li><a class="reference internal" href="#help-sources">Help sources</a></li>
819819
<li><a class="reference internal" href="#setting-preferences">Setting preferences</a></li>
820-
<li><a class="reference internal" href="#idle-on-macos">IDLE on MacOS</a></li>
820+
<li><a class="reference internal" href="#idle-on-macos">IDLE on macOS</a></li>
821821
<li><a class="reference internal" href="#extensions">Extensions</a></li>
822822
</ul>
823823
</li>
@@ -899,7 +899,7 @@ <h3>Navigation</h3>
899899
<br />
900900
<br />
901901

902-
Last updated on Nov 10, 2018.
902+
Last updated on Nov 12, 2018.
903903
<a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
904904
<br />
905905

Lib/idlelib/iomenu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# these problems, falling back to ASCII
4242
locale_encoding = locale.nl_langinfo(locale.CODESET)
4343
if locale_encoding is None or locale_encoding == '':
44-
# situation occurs on Mac OS X
44+
# situation occurs on macOS
4545
locale_encoding = 'ascii'
4646
codecs.lookup(locale_encoding)
4747
except (NameError, AttributeError, LookupError):
@@ -51,7 +51,7 @@
5151
try:
5252
locale_encoding = locale.getdefaultlocale()[1]
5353
if locale_encoding is None or locale_encoding == '':
54-
# situation occurs on Mac OS X
54+
# situation occurs on macOS
5555
locale_encoding = 'ascii'
5656
codecs.lookup(locale_encoding)
5757
except (ValueError, LookupError):

Lib/idlelib/macosx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
A number of functions that enhance IDLE on Mac OSX.
2+
A number of functions that enhance IDLE on macOS.
33
"""
44
from sys import platform # Used in _init_tk_type, changed by test.
55

@@ -192,7 +192,7 @@ def help_dialog(event=None):
192192
root.bind('<<close-all-windows>>', flist.close_all_callback)
193193

194194
# The binding above doesn't reliably work on all versions of Tk
195-
# on MacOSX. Adding command definition below does seem to do the
195+
# on macOS. Adding command definition below does seem to do the
196196
# right thing for now.
197197
root.createcommand('exit', flist.close_all_callback)
198198

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Where appropriate, use 'macOS' in idlelib.

0 commit comments

Comments
 (0)
0