Close #24508: Backport the 3.5 MSBuild project files.
The old project files move to PC/VS9.0 and remain supported.
VS2008 is still required to build 2.7; VS2010 (or later, plus Windows SDK 7.1)
is *also* required to use the new project files.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index c590331..2458a3d 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -203,6 +203,15 @@
newsoft = min(hard, max(soft, 1024*2048))
resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
+# Windows, Tkinter, and resetting the environment after each test don't
+# mix well. To alleviate test failures due to Tcl/Tk not being able to
+# find its library, get the necessary environment massage done once early.
+if sys.platform == 'win32':
+ try:
+ import FixTk
+ except Exception:
+ pass
+
# Test result constants.
PASSED = 1
FAILED = 0
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 9c9afde..4c2e8d5 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -8,9 +8,7 @@
# Skip this test if the _tkinter module wasn't built.
_tkinter = test_support.import_module('_tkinter')
-# Make sure tkinter._fix runs to set up the environment
-tkinter = test_support.import_fresh_module('Tkinter')
-
+import Tkinter as tkinter
from Tkinter import Tcl
from _tkinter import TclError