diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2021-03-31 05:19:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 05:19:38 (GMT) |
commit | 1b4a9c7956d5dc64f8002f62bf0faae2d1892f90 (patch) | |
tree | 499a11b7c9533665429cf9542afe1be2302f302a | |
parent | b775106d940e3d77c8af7967545bb9a5b7b162df (diff) | |
download | cpython-1b4a9c7956d5dc64f8002f62bf0faae2d1892f90.zip cpython-1b4a9c7956d5dc64f8002f62bf0faae2d1892f90.tar.gz cpython-1b4a9c7956d5dc64f8002f62bf0faae2d1892f90.tar.bz2 |
bpo-42225: IDLE - document two unix-related problems. (#25078)
1. Bad IP masquerade rules can prevent startup.
2. X cannot handle some complex colored chars.
-rw-r--r-- | Doc/library/idle.rst | 19 | ||||
-rw-r--r-- | Lib/idlelib/help.html | 27 | ||||
-rw-r--r-- | Misc/NEWS.d/next/IDLE/2021-03-29-16-22-27.bpo-42225.iIeiLg.rst | 2 |
3 files changed, 39 insertions, 9 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 2b9bd4b..6ef1565 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -670,8 +670,16 @@ IDLE uses a socket to communicate between the IDLE GUI process and the user code execution process. A connection must be established whenever the Shell starts or restarts. (The latter is indicated by a divider line that says 'RESTART'). If the user process fails to connect to the GUI process, it -displays a ``Tk`` error box with a 'cannot connect' message that directs the -user here. It then exits. +usually displays a ``Tk`` error box with a 'cannot connect' message +that directs the user here. It then exits. + +One specific connection failure on Unix systems results from +misconfigured masquerading rules somewhere in a system's network setup. +When IDLE is started from a terminal, one will see a message starting +with ``** Invalid host:``. +The valid value is ``127.0.0.1 (idlelib.rpc.LOCALHOST)``. +One can diagnose with ``tcpconnect -irv 127.0.0.1 6543`` in one +terminal window and ``tcplisten <same args>`` in another. A common cause of failure is a user-written file with the same name as a standard library module, such as *random.py* and *tkinter.py*. When such a @@ -709,6 +717,13 @@ If IDLE quits with no message, and it was not started from a console, try starting it from a console or terminal (``python -m idlelib``) and see if this results in an error message. +On Unix-based systems with tcl/tk older than ``8.6.11`` (see +``About IDLE``) certain characters of certain fonts can cause +a tk failure with a message to the terminal. This can happen either +if one starts IDLE to edit a file with such a character or later +when entering such a character. If one cannot upgrade tcl/tk, +then re-configure IDLE to use a font that works better. + Running user code ^^^^^^^^^^^^^^^^^ diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 924042d..e80384b 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -5,7 +5,7 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>IDLE — Python 3.10.0a5 documentation</title> + <title>IDLE — Python 3.10.0a6 documentation</title> <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> @@ -18,7 +18,7 @@ <script src="../_static/sidebar.js"></script> <link rel="search" type="application/opensearchdescription+xml" - title="Search within Python 3.10.0a5 documentation" + title="Search within Python 3.10.0a6 documentation" href="../_static/opensearch.xml"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> @@ -71,7 +71,7 @@ <li id="cpython-language-and-version"> - <a href="../index.html">3.10.0a5 Documentation</a> » + <a href="../index.html">3.10.0a6 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> @@ -632,8 +632,15 @@ set in the Options dialog.</p></li> code execution process. A connection must be established whenever the Shell starts or restarts. (The latter is indicated by a divider line that says ‘RESTART’). If the user process fails to connect to the GUI process, it -displays a <code class="docutils literal notranslate"><span class="pre">Tk</span></code> error box with a ‘cannot connect’ message that directs the -user here. It then exits.</p> +usually displays a <code class="docutils literal notranslate"><span class="pre">Tk</span></code> error box with a ‘cannot connect’ message +that directs the user here. It then exits.</p> +<p>One specific connection failure on Unix systems results from +misconfigured masquerading rules somewhere in a system’s network setup. +When IDLE is started from a terminal, one will see a message starting +with <code class="docutils literal notranslate"><span class="pre">**</span> <span class="pre">Invalid</span> <span class="pre">host:</span></code>. +The valid value is <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span> <span class="pre">(idlelib.rpc.LOCALHOST)</span></code>. +One can diagnose with <code class="docutils literal notranslate"><span class="pre">tcpconnect</span> <span class="pre">-irv</span> <span class="pre">127.0.0.1</span> <span class="pre">6543</span></code> in one +terminal window and <code class="docutils literal notranslate"><span class="pre">tcplisten</span> <span class="pre"><same</span> <span class="pre">args></span></code> in another.</p> <p>A common cause of failure is a user-written file with the same name as a standard library module, such as <em>random.py</em> and <em>tkinter.py</em>. When such a file is located in the same directory as a file that is about to be run, @@ -664,6 +671,12 @@ with the settings dialog.</p> <p>If IDLE quits with no message, and it was not started from a console, try starting it from a console or terminal (<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">idlelib</span></code>) and see if this results in an error message.</p> +<p>On Unix-based systems with tcl/tk older than <code class="docutils literal notranslate"><span class="pre">8.6.11</span></code> (see +<code class="docutils literal notranslate"><span class="pre">About</span> <span class="pre">IDLE</span></code>) certain characters of certain fonts can cause +a tk failure with a message to the terminal. This can happen either +if one starts IDLE to edit a file with such a character or later +when entering such a character. If one cannot upgrade tcl/tk, +then re-configure IDLE to use a font that works better.</p> </div> <div class="section" id="running-user-code"> <h3>Running user code<a class="headerlink" href="#running-user-code" title="Permalink to this headline">¶</a></h3> @@ -958,7 +971,7 @@ also used for testing.</p> <li id="cpython-language-and-version"> - <a href="../index.html">3.10.0a5 Documentation</a> » + <a href="../index.html">3.10.0a6 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> @@ -990,7 +1003,7 @@ also used for testing.</p> <br /> <br /> - Last updated on Feb 23, 2021. + Last updated on Mar 29, 2021. <a href="https://docs.python.org/3/bugs.html">Found a bug</a>? <br /> diff --git a/Misc/NEWS.d/next/IDLE/2021-03-29-16-22-27.bpo-42225.iIeiLg.rst b/Misc/NEWS.d/next/IDLE/2021-03-29-16-22-27.bpo-42225.iIeiLg.rst new file mode 100644 index 0000000..59fb08b --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-03-29-16-22-27.bpo-42225.iIeiLg.rst @@ -0,0 +1,2 @@ +Document that IDLE can fail on Unix either from misconfigured IP masquerage +rules or failure displaying complex colored (non-ascii) characters. |