From bafd0afe371e041ec207c5cde5dc6df941b60aa2 Mon Sep 17 00:00:00 2001 From: Jim DeLaHunt Date: Mon, 13 Feb 2017 05:57:13 -0800 Subject: [PATCH 1/3] bpo-29521 Fix two minor documentation build warnings (#41) Much of bpo-29521 was fixed in parallel with commit e7ffb99 . This cleans up the rest. Apply parallel change to Doc/make.bat to read "set SPHINXOPTS=-D latex_elements.papersize=" I don't have a Windows system on which to observe the warning, but it should be necessary. The warning: .../workspace/cpython_github/Doc/faq/windows.rst:303: WARNING: unknown option: -t In the Windows FAQ, `How do I keep editors from inserting tabs into my Python source?`, contained a reference to a Python -t option. In Python 2.x, this caused Python to issue warnings about lines with mixed spaces and tabs, but as of Python 3.6 it does nothing. Per discussion at http://bugs.python.org/issue29387, take their wording. Python [3] raises an IndentationError or TabError. Tabnanny is now a module. (cherry picked from commit 3d707be950b387552585451071928e7b39cdfa53) --- Doc/faq/windows.rst | 7 ++++--- Doc/make.bat | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst index 25c73b8b2d3873..a3d1db49058563 100644 --- a/Doc/faq/windows.rst +++ b/Doc/faq/windows.rst @@ -294,9 +294,10 @@ this respect, and is easily configured to use spaces: Take :menuselection:`Tools --> Options --> Tabs`, and for file type "Default" set "Tab size" and "Indent size" to 4, and select the "Insert spaces" radio button. -If you suspect mixed tabs and spaces are causing problems in leading whitespace, -run Python with the :option:`-t` switch or run ``Tools/Scripts/tabnanny.py`` to -check a directory tree in batch mode. +Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs +and spaces are causing problems in leading whitespace. +You may also run the :mod:`tabnanny` module to check a directory tree +in batch mode. How do I check for a keypress without blocking? diff --git a/Doc/make.bat b/Doc/make.bat index 251f822abffc24..ef0e412c6c7233 100644 --- a/Doc/make.bat +++ b/Doc/make.bat @@ -71,7 +71,7 @@ goto end :build if NOT "%PAPER%" == "" ( - set SPHINXOPTS=-D latex_paper_size=%PAPER% %SPHINXOPTS% + set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS% ) cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%* From cf1a9cd78488fd209d63af8087cb13c40797edd7 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 16 Mar 2017 20:22:40 -0700 Subject: [PATCH 2/3] remove trailing whitespace in faq/windows.rst --- Doc/faq/windows.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst index a3d1db49058563..8b79eba5e1741c 100644 --- a/Doc/faq/windows.rst +++ b/Doc/faq/windows.rst @@ -294,9 +294,9 @@ this respect, and is easily configured to use spaces: Take :menuselection:`Tools --> Options --> Tabs`, and for file type "Default" set "Tab size" and "Indent size" to 4, and select the "Insert spaces" radio button. -Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs +Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and spaces are causing problems in leading whitespace. -You may also run the :mod:`tabnanny` module to check a directory tree +You may also run the :mod:`tabnanny` module to check a directory tree in batch mode. From f328b81d4477a3fe59dc885ccaa6f597ac465014 Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Wed, 29 Mar 2017 22:51:47 -0700 Subject: [PATCH 3/3] bpo-29521: adjust wordings --- Doc/faq/windows.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst index 8b79eba5e1741c..f8e23cf69cfed3 100644 --- a/Doc/faq/windows.rst +++ b/Doc/faq/windows.rst @@ -294,10 +294,9 @@ this respect, and is easily configured to use spaces: Take :menuselection:`Tools --> Options --> Tabs`, and for file type "Default" set "Tab size" and "Indent size" to 4, and select the "Insert spaces" radio button. -Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs -and spaces are causing problems in leading whitespace. -You may also run the :mod:`tabnanny` module to check a directory tree -in batch mode. +If you suspect mixed tabs and spaces are causing problems in leading whitespace, +run Python with the :option:`-t` switch or run the :mod:`tabnanny` module to +check a directory tree in batch mode. How do I check for a keypress without blocking?