]> granicus.if.org Git - python/commitdiff
Remove meaning of -ttt, but still accept -t option on cmdline for compatibility.
authorGeorg Brandl <georg@python.org>
Wed, 4 Jun 2008 13:06:58 +0000 (13:06 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 4 Jun 2008 13:06:58 +0000 (13:06 +0000)
22 files changed:
Doc/library/sys.rst
Doc/using/cmdline.rst
Include/pydebug.h
Lib/test/test_exceptions.py
Mac/BuildScript/scripts/postflight.framework
Mac/Makefile.in
Makefile.pre.in
Misc/NEWS
Misc/build.sh
Misc/cheatsheet
Misc/python.man
Misc/valgrind-python.supp
Modules/main.c
PC/VC6/rt.bat
PC/VS7.1/rt.bat
PC/VS8.0/rt.bat
PC/os2emx/Makefile
PC/os2emx/python26.def
PC/os2vacpp/python.def
PCbuild/rt.bat
Parser/parsetok.c
Python/sysmodule.c

index 0929f0e30e3e22dc0406cf146a9bf8b8879f7a25..b35460372fe3500490a95effdffab6c24b303817 100644 (file)
@@ -231,8 +231,6 @@ always available.
    +------------------------------+------------------------------------------+
    | :const:`ignore_environment`  | -E                                       |
    +------------------------------+------------------------------------------+
-   | :const:`tabcheck`            | -t or -tt                                |
-   +------------------------------+------------------------------------------+
    | :const:`verbose`             | -v                                       |
    +------------------------------+------------------------------------------+
    | :const:`unicode`             | -U                                       |
index a6a6ecf909054427ba25b6a0a4d39cbb450f52e2..5100c21f1801a0fef28a136744dccd6e12b6bf0f 100644 (file)
@@ -222,13 +222,6 @@ Miscellaneous options
    manipulations of :data:`sys.path` that it entails.
 
 
-.. cmdoption:: -t
-
-   Issue a warning when a source file mixes tabs and spaces for indentation in a
-   way that makes it depend on the worth of a tab expressed in spaces.  Issue an
-   error when the option is given twice (:option:`-tt`).
-
-
 .. cmdoption:: -u
    
    Force stdin, stdout and stderr to be totally unbuffered.  On systems where it
index 9d18ab4c3cc9ae905b577356dc55aafb30c4af7e..cd56196229d266bc41ab1d1b36ec6e7a1f5c26f4 100644 (file)
@@ -14,7 +14,6 @@ PyAPI_DATA(int) Py_NoSiteFlag;
 PyAPI_DATA(int) Py_BytesWarningFlag;
 PyAPI_DATA(int) Py_UseClassExceptionsFlag;
 PyAPI_DATA(int) Py_FrozenFlag;
-PyAPI_DATA(int) Py_TabcheckFlag;
 PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
 PyAPI_DATA(int) Py_DivisionWarningFlag;
 PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
index 619b7e3234a8346c3d83335daa882e083dc0e3fc..41b9413f419fef97fdf1063de1a86b598d6ac104 100644 (file)
@@ -80,10 +80,10 @@ class ExceptionTests(unittest.TestCase):
         self.raise_catch(IndentationError, "IndentationError")
 
         self.raise_catch(TabError, "TabError")
-        # can only be tested under -tt, and is the only test for -tt
-        #try: compile("try:\n\t1/0\n    \t1/0\nfinally:\n pass\n", '<string>', 'exec')
-        #except TabError: pass
-        #else: self.fail("TabError not raised")
+        try: compile("try:\n\t1/0\n    \t1/0\nfinally:\n pass\n",
+                     '<string>', 'exec')
+        except TabError: pass
+        else: self.fail("TabError not raised")
 
         self.raise_catch(SystemError, "SystemError")
 
index b796a102be32dc1f586468f4b3f5a55154093283..0e64616e852114a7cbf257b3eeaf0c0d2c6ad2b6 100755 (executable)
@@ -6,22 +6,22 @@
 PYVER="@PYVER@"
 FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
 
-"${FWK}/bin/python" -Wi -tt \
+"${FWK}/bin/python" -Wi \
     "${FWK}/lib/python${PYVER}/compileall.py" \
     -x badsyntax -x site-packages \
     "${FWK}/lib/python${PYVER}"
 
-"${FWK}/bin/python" -Wi -tt -O \
+"${FWK}/bin/python" -Wi -O \
     "${FWK}/lib/python${PYVER}/compileall.py" \
     -x badsyntax -x site-packages \
     "${FWK}/lib/python${PYVER}"
 
-"${FWK}/bin/python" -Wi -tt \
+"${FWK}/bin/python" -Wi \
     "${FWK}/lib/python${PYVER}/compileall.py" \
     -x badsyntax -x site-packages \
     "${FWK}/Mac/Tools"
 
-"${FWK}/bin/python" -Wi -tt -O \
+"${FWK}/bin/python" -Wi -O \
     "${FWK}/lib/python${PYVER}/compileall.py" \
     -x badsyntax -x site-packages \
     "${FWK}/Mac/Tools"
index 34734d041305610ebb96d0f7a7ff79b8056f41ee..862934d68def91fffd93b1dd54574489bd19a6cf 100644 (file)
@@ -226,8 +226,8 @@ installmacsubtree:
 
 
        $(RUNSHARED) $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
-       $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-       $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+       $(RUNSHARED) $(BUILDPYTHON) -Wi $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+       $(RUNSHARED) $(BUILDPYTHON) -O -Wi $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
 
 $(INSTALLED_PYTHONAPP): install_Python
 
index c1d8d06d66b30c9fce30c98ab4b7c8061324848e..0d89d12a2d7d582e5c81a5007895b6e145f43a2b 100644 (file)
@@ -664,7 +664,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
 
 TESTOPTS=      -l $(EXTRATESTOPTS)
 TESTPROG=      $(srcdir)/Lib/test/regrtest.py
-TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -tt -bb
+TESTPYTHON=    $(RUNSHARED) ./$(BUILDPYTHON) -E -bb
 test:          all platform
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
                -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
@@ -687,7 +687,7 @@ testuniversal:      all platform
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
                -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
                $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
-               $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
+               $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E $(TESTPROG) $(TESTOPTS) -uall
 
 
 # Like testall, but with a single pass only
@@ -872,23 +872,23 @@ libinstall:       build_all $(srcdir)/Lib/$(PLATDIR)
        done
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
        -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
-               ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+               ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
                -d $(LIBDEST) -f \
                -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-               ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+               ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
                -d $(LIBDEST) -f \
                -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
        -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
-               ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+               ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
                -d $(LIBDEST)/site-packages -f \
                -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-               ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+               ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
                -d $(LIBDEST)/site-packages -f \
                -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-               ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram"
+               ./$(BUILDPYTHON) -Wi -c "import lib2to3.pygram"
 
 # Create the PLATDIR source directory, if one wasn't distributed..
 $(srcdir)/Lib/$(PLATDIR):
index 84ef7770c6903af0fbfbd64d5989c01e858fc6f2..437bcbe09f3cfe84f5e7977dff78b977d0f4080b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's new in Python 3.0b1?
 Core and Builtins
 -----------------
 
+- Removed the already-defunct ``-t`` option.
+
 - Issue #2957: Corrected a ValueError "recursion limit exceeded", when
   unmarshalling many code objects, which happens when importing a
   large .pyc file (~1000 functions).
index 0c8d4d5c23e028f6785b6eb5f69a54f844a7858d..efbad56949ba5c1c05b8235cd046dbbe901b70c7 100755 (executable)
@@ -59,7 +59,7 @@ RSYNC_OPTS="-aC -e ssh"
 PYTHON=$INSTALL_DIR/bin/python
 
 # Python options and regression test program that should always be run.
-REGRTEST_ARGS="-E -tt $INSTALL_DIR/lib/python3.0/test/regrtest.py"
+REGRTEST_ARGS="-E $INSTALL_DIR/lib/python3.0/test/regrtest.py"
 
 REFLOG="build/reflog.txt.out"
 # These tests are not stable and falsely report leaks sometimes.
index 21b3d981c966116e7c86dc40304154282c4f37f5..50ffc2285f72575585734a03c145ce5e4ec0a956 100644 (file)
@@ -46,7 +46,6 @@ Option                                  Effect
 -OO     remove doc-strings in addition to the -O optimizations
 -Q arg  division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew
 -S      Don't perform 'import site' on initialization
--t      Issue warnings about inconsistent tab usage (-tt: issue errors)
 -u      Unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x).
 -v      Verbose (trace import statements) (also PYTHONVERBOSE=x)
 -W arg : warning control (arg is action:message:category:module:lineno)
index 42f012343acf4eab6614c134aa5363c689a62846..3399a95ff892d41668a633cbf741d3f8ab225bb3 100644 (file)
@@ -35,9 +35,6 @@ python \- an interpreted, interactive, object-oriented programming language
 .B \-S
 ]
 [
-.B \-t
-]
-[
 .B \-u
 ]
 .br
@@ -144,11 +141,6 @@ and the site-dependent manipulations of
 .I sys.path
 that it entails.
 .TP
-.B \-t
-Issue a warning when a source file mixes tabs and spaces for
-indentation in a way that makes it depend on the worth of a tab
-expressed in spaces.  Issue an error when the option is given twice.
-.TP
 .B \-u
 Force stdin, stdout and stderr to be totally unbuffered.  On systems
 where it matters, also put stdin, stdout and stderr in binary mode.
index a08eaac97b0509170533803077f17a1a1ad0eeac..7fb8dc7d59cf8afc02a8d72a8955a9a09d5256a1 100644 (file)
@@ -5,7 +5,7 @@
 #
 #      cd python/dist/src
 #      valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \
-#              ./python -E -tt ./Lib/test/regrtest.py -u bsddb,network
+#              ./python -E ./Lib/test/regrtest.py -u bsddb,network
 #
 # You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
 # to use the preferred suppressions with Py_ADDRESS_IN_RANGE.
index b762b0f2963c7e2db3be7ade2ddf18d8c9b29fcc..e2bfdb4458368643234abd87f321d2a76264ca94 100644 (file)
@@ -72,7 +72,6 @@ static char *usage_2 = "\
 -OO    : remove doc-strings in addition to the -O optimizations\n\
 -s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
 -S     : don't imply 'import site' on initialization\n\
--t     : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
 ";
 static char *usage_3 = "\
 -u     : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x\n\
@@ -370,7 +369,7 @@ Py_Main(int argc, wchar_t **argv)
                        break;
 
                case 't':
-                       Py_TabcheckFlag++;
+                       /* ignored for backwards compatibility */
                        break;
 
                case 'u':
index dfdea67a2812308801b4a4c41ea2cee53103f03b..a9eadd7c6aac102501c9acea8b866892eb6e091c 100755 (executable)
 @if "%_qmode%"=="yes" goto Qmode
 @echo Deleting .pyc/.pyo files ...
 @%_exe% rmpyc.py
-%_exe% %_dashO% -E -tt ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+%_exe% %_dashO% -E ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
 @echo About to run again without deleting .pyc/.pyo first:
 @pause
 :Qmode
-%_exe% %_dashO% -E -tt ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+%_exe% %_dashO% -E ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
 @set _exe=
 @set _qmode=
 @set _dashO=
index 29801d29269a85d3043d1e20c824bd3c944515a2..ba1d09051716975fb0b284fca2d88a7641e645fe 100755 (executable)
@@ -34,7 +34,7 @@ if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts
 if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts
 if "%1"=="-d" (set exe=python_d) & shift & goto CheckOpts
 
-set cmd=%exe% %dashO% -E -tt ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+set cmd=%exe% %dashO% -E ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
 if defined qmode goto Qmode
 
 echo Deleting .pyc/.pyo files ...
index 90fd794421d638e0bdecf1c6fa7ebf44b86d8ceb..d691cbd85a97a675c856724fc635c5da631bd8d3 100644 (file)
@@ -34,7 +34,7 @@ if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts
 if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts\r
 if "%1"=="-d" (set exe=python_d) & shift & goto CheckOpts\r
 \r
-set cmd=%exe% %dashO% -E -tt ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+set cmd=%exe% %dashO% -E ../../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
 if defined qmode goto Qmode\r
 \r
 echo Deleting .pyc/.pyo files ...\r
index a2947a7db3f6cdb25a7261b80922967634fd7272..10cadf950ebf14196dcf0757269144354a7536e1 100644 (file)
@@ -666,7 +666,7 @@ _ssl$(MODULE.EXT): $(OUT)_ssl$O $(OUT)_ssl_m.def $(PYTHON.IMPLIB)
 # the test target
 test:
        -find ../../Lib -name "*.py[co]" -exec rm {} ";"
-       -./python -E -tt ../../lib/test/regrtest.py -l -u "network"
-       ./python -E -tt ../../lib/test/regrtest.py -l -u "network"
+       -./python -E ../../lib/test/regrtest.py -l -u "network"
+       ./python -E ../../lib/test/regrtest.py -l -u "network"
 
 -include $(OUTBASE)python.dep
index 8bc91c87332d93252e67b5dabb01a5b8914ab9db..3cdb44a1b7da8f74acfab70b2beebb51b9d1799a 100644 (file)
@@ -49,7 +49,6 @@ EXPORTS
   "PyParser_Delete"
 
 ; From python26_s.lib(parsetok)
-  "Py_TabcheckFlag"
   "PyParser_ParseString"
   "PyParser_ParseStringFlagsFilename"
   "PyParser_ParseFile"
index 55a17d7c8fa263c2da4101bd9b5d68c5f50bc513..2b2d6e13dd61b89269b096fa76140938245b402c 100644 (file)
@@ -61,7 +61,6 @@ EXPORTS
                Py_InteractiveFlag
                Py_NoSiteFlag
                Py_OptimizeFlag
-               Py_TabcheckFlag
                Py_UseClassExceptionsFlag
                Py_VerboseFlag
                _PyImport_Filetab
index 583d4f3339f9ce3d289e682890b7905a067b1d6f..1ce0107f0a53d66b9157e67bb6b136bacd04672a 100644 (file)
@@ -40,7 +40,7 @@ if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpt
 
 PATH %PATH%;..\..\%tcltk%\bin
 set exe=%prefix%\python%suffix%
-set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
+set cmd=%exe% %dashO% -E ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
 if defined qmode goto Qmode
 
 echo Deleting .pyc/.pyo files ...
index c6be8f9f2c1e5cb7c440391facf158c9b3e6dfcc..d8ff6ee4209a03d7bc7f02ec1b69a78a89a6d3d8 100644 (file)
@@ -10,8 +10,6 @@
 #include "errcode.h"
 #include "graminit.h"
 
-int Py_TabcheckFlag;
-
 
 /* Forward */
 static node *parsetok(struct tok_state *, grammar *, int, perrdetail *, int *);
@@ -57,9 +55,6 @@ PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename,
        }
 
         tok->filename = filename ? filename : "<string>";
-       if (Py_TabcheckFlag >= 3)
-               tok->alterror = 0;
-
        return parsetok(tok, g, start, err_ret, flags);
 }
 
@@ -97,9 +92,6 @@ PyParser_ParseFileFlagsEx(FILE *fp, const char *filename,
                return NULL;
        }
        tok->filename = filename;
-       if (Py_TabcheckFlag >= 3)
-               tok->alterror = 0;
-
        return parsetok(tok, g, start, err_ret, flags);
 }
 
index c33457fcbeeb081e9a1363e5cc56c3eb9b22c024..dee49651ab81fe25c3c25239366756661c2edcfe 100644 (file)
@@ -1100,7 +1100,6 @@ static PyStructSequence_Field flags_fields[] = {
        {"no_user_site",        "-s"},
        {"no_site",             "-S"},
        {"ignore_environment",  "-E"},
-       {"tabcheck",            "-t or -tt"},
        {"verbose",             "-v"},
 #ifdef RISCOS
        {"riscos_wimp",         "???"},
@@ -1116,9 +1115,9 @@ static PyStructSequence_Desc flags_desc = {
        flags__doc__,   /* doc */
        flags_fields,   /* fields */
 #ifdef RISCOS
-       12
-#else
        11
+#else
+       10
 #endif
 };
 
@@ -1144,7 +1143,6 @@ make_flags(void)
        SetFlag(Py_NoUserSiteDirectory);
        SetFlag(Py_NoSiteFlag);
        SetFlag(Py_IgnoreEnvironmentFlag);
-       SetFlag(Py_TabcheckFlag);
        SetFlag(Py_VerboseFlag);
 #ifdef RISCOS
        SetFlag(Py_RISCOSWimpFlag);