Remove meaning of -ttt, but still accept -t option on cmdline for compatibility.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 0929f0e..b354603 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -231,8 +231,6 @@
    +------------------------------+------------------------------------------+
    | :const:`ignore_environment`  | -E                                       |
    +------------------------------+------------------------------------------+
-   | :const:`tabcheck`            | -t or -tt                                |
-   +------------------------------+------------------------------------------+
    | :const:`verbose`             | -v                                       |
    +------------------------------+------------------------------------------+
    | :const:`unicode`             | -U                                       |
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a6a6ecf..5100c21 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -222,13 +222,6 @@
    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
diff --git a/Include/pydebug.h b/Include/pydebug.h
index 9d18ab4..cd56196 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -14,7 +14,6 @@
 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;
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 619b7e3..41b9413 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -80,10 +80,10 @@
         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")
 
diff --git a/Mac/BuildScript/scripts/postflight.framework b/Mac/BuildScript/scripts/postflight.framework
index b796a10..0e64616 100755
--- a/Mac/BuildScript/scripts/postflight.framework
+++ b/Mac/BuildScript/scripts/postflight.framework
@@ -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"
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
index 34734d0..862934d 100644
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -226,8 +226,8 @@
 
 
 	$(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
 
diff --git a/Makefile.pre.in b/Makefile.pre.in
index c1d8d06..0d89d12 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -664,7 +664,7 @@
 
 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 @@
 		-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 @@
 	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):
diff --git a/Misc/NEWS b/Misc/NEWS
index 84ef777..437bcbe 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@
 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).
diff --git a/Misc/build.sh b/Misc/build.sh
index 0c8d4d5..efbad56 100755
--- a/Misc/build.sh
+++ b/Misc/build.sh
@@ -59,7 +59,7 @@
 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.
diff --git a/Misc/cheatsheet b/Misc/cheatsheet
index 21b3d98..50ffc22 100644
--- a/Misc/cheatsheet
+++ b/Misc/cheatsheet
@@ -46,7 +46,6 @@
 -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)
diff --git a/Misc/python.man b/Misc/python.man
index 42f0123..3399a95 100644
--- a/Misc/python.man
+++ b/Misc/python.man
@@ -35,9 +35,6 @@
 .B \-S
 ]
 [
-.B \-t
-]
-[
 .B \-u
 ]
 .br
@@ -144,11 +141,6 @@
 .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.
diff --git a/Misc/valgrind-python.supp b/Misc/valgrind-python.supp
index a08eaac..7fb8dc7 100644
--- a/Misc/valgrind-python.supp
+++ b/Misc/valgrind-python.supp
@@ -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.
diff --git a/Modules/main.c b/Modules/main.c
index b762b0f..e2bfdb4 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -72,7 +72,6 @@
 -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 @@
 			break;
 
 		case 't':
-			Py_TabcheckFlag++;
+			/* ignored for backwards compatibility */
 			break;
 
 		case 'u':
diff --git a/PC/VC6/rt.bat b/PC/VC6/rt.bat
index dfdea67..a9eadd7 100755
--- a/PC/VC6/rt.bat
+++ b/PC/VC6/rt.bat
@@ -31,11 +31,11 @@
 @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=
diff --git a/PC/VS7.1/rt.bat b/PC/VS7.1/rt.bat
index 29801d2..ba1d090 100755
--- a/PC/VS7.1/rt.bat
+++ b/PC/VS7.1/rt.bat
@@ -34,7 +34,7 @@
 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 ...
diff --git a/PC/VS8.0/rt.bat b/PC/VS8.0/rt.bat
index 90fd794..d691cbd 100644
--- a/PC/VS8.0/rt.bat
+++ b/PC/VS8.0/rt.bat
@@ -34,7 +34,7 @@
 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 ...

diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile
index a2947a7..10cadf9 100644
--- a/PC/os2emx/Makefile
+++ b/PC/os2emx/Makefile
@@ -666,7 +666,7 @@
 # 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
diff --git a/PC/os2emx/python26.def b/PC/os2emx/python26.def
index 8bc91c8..3cdb44a 100644
--- a/PC/os2emx/python26.def
+++ b/PC/os2emx/python26.def
@@ -49,7 +49,6 @@
   "PyParser_Delete"
 
 ; From python26_s.lib(parsetok)
-  "Py_TabcheckFlag"
   "PyParser_ParseString"
   "PyParser_ParseStringFlagsFilename"
   "PyParser_ParseFile"
diff --git a/PC/os2vacpp/python.def b/PC/os2vacpp/python.def
index 55a17d7..2b2d6e1 100644
--- a/PC/os2vacpp/python.def
+++ b/PC/os2vacpp/python.def
@@ -61,7 +61,6 @@
                Py_InteractiveFlag
                Py_NoSiteFlag
                Py_OptimizeFlag
-               Py_TabcheckFlag
                Py_UseClassExceptionsFlag
                Py_VerboseFlag
                _PyImport_Filetab
diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat
index 583d4f3..1ce0107 100644
--- a/PCbuild/rt.bat
+++ b/PCbuild/rt.bat
@@ -40,7 +40,7 @@
 
 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 ...
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index c6be8f9..d8ff6ee 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -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 @@
 	}
 
         tok->filename = filename ? filename : "<string>";
-	if (Py_TabcheckFlag >= 3)
-		tok->alterror = 0;
-
 	return parsetok(tok, g, start, err_ret, flags);
 }
 
@@ -97,9 +92,6 @@
 		return NULL;
 	}
 	tok->filename = filename;
-	if (Py_TabcheckFlag >= 3)
-		tok->alterror = 0;
-
 	return parsetok(tok, g, start, err_ret, flags);
 }
 
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index c33457f..dee4965 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1100,7 +1100,6 @@
 	{"no_user_site",	"-s"},
 	{"no_site",		"-S"},
 	{"ignore_environment",	"-E"},
-	{"tabcheck",		"-t or -tt"},
 	{"verbose",		"-v"},
 #ifdef RISCOS
 	{"riscos_wimp",		"???"},
@@ -1116,9 +1115,9 @@
 	flags__doc__,	/* doc */
 	flags_fields,	/* fields */
 #ifdef RISCOS
-	12
-#else
 	11
+#else
+	10
 #endif
 };
 
@@ -1144,7 +1143,6 @@
 	SetFlag(Py_NoUserSiteDirectory);
 	SetFlag(Py_NoSiteFlag);
 	SetFlag(Py_IgnoreEnvironmentFlag);
-	SetFlag(Py_TabcheckFlag);
 	SetFlag(Py_VerboseFlag);
 #ifdef RISCOS
 	SetFlag(Py_RISCOSWimpFlag);