Commits

Gary Oberbrunner committed 38e9e6d

Added note in Announce.txt re: deprecating python versions older than 2.7.
Fixed deprecation warning message. (Includes some whitespace cleanup)

  • Participants
  • Parent commits 1b6277f
  • Branches rel_2.3.0
  • Tags 2.3.0

Comments (0)

Files changed (2)

File src/Announce.txt

 
   Please note the following important changes since release 2.2.0:
 
+    -- SUPPORT FOR PYTHON VERSIONS BEFORE 2.7 IS NOW DEPRECATED
+
+       ***IMPORTANT***: This release is the last version of SCons to support
+       Python versions older than 2.7.  This release will warn if you are
+       running on Python 2.6 or older; future releases will probably not
+       work at all, as we are moving toward supporting Python 3.
+       Use --warn=no-python-version to suppress the warning if needed.
+
     -- A lot of python pre-2.4 compatibility code was removed
        in this release.  2.4 is the official floor for SCons,
        but this release will likely enforce it more rigidly.

File src/engine/SCons/Script/Main.py

             SCons.Taskmaster.OutOfDateTask.fail_stop(self)
             exit_status = status
             this_build_status = status
-            
+
     def executed(self):
         t = self.targets[0]
         if self.top and not t.has_builder() and not t.side_effect:
             except ValueError:
                 t, e = exc_info
                 tb = None
-                
+
         # Deprecated string exceptions will have their string stored
         # in the first entry of the tuple.
         if e is None:
         errfmt = "scons: *** [%s] %s\n"
         sys.stderr.write(errfmt % (nodename, buildError))
 
-        if (buildError.exc_info[2] and buildError.exc_info[1] and 
+        if (buildError.exc_info[2] and buildError.exc_info[1] and
            not isinstance(
-               buildError.exc_info[1], 
+               buildError.exc_info[1],
                (EnvironmentError, SCons.Errors.StopError,
                             SCons.Errors.UserError))):
             type, value, trace = buildError.exc_info
     Input is a "pre-processed" stack trace in the form
     returned by traceback.extract_tb() or traceback.extract_stack()
     """
-    
+
     tb.reverse()
 
     # find the deepest traceback frame that is not part
 
 def _scons_user_error(e):
     """Handle user errors. Print out a message and a description of the
-    error, along with the line number and routine where it occured. 
+    error, along with the line number and routine where it occured.
     The file and line number will be the deepest stack frame that is
     not part of SCons itself.
     """
     else:
         site_dir_name = "site_scons"
         err_if_not_found = False
-        
+
     site_dir = os.path.join(topdir, site_dir_name)
     if not os.path.exists(site_dir):
         if err_if_not_found:
         _load_site_scons_dir(d.path, options.site_dir)
     elif not options.no_site_dir:
         _load_all_site_scons_dirs(d.path)
-        
+
     if options.include_dir:
         sys.path = options.include_dir + sys.path
 
     # warning about deprecated Python versions--delayed until here
     # in case they disabled the warning in the SConscript files.
     if python_version_deprecated():
-        msg = "Support for pre-2.4 Python (%s) is deprecated.\n" + \
+        msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \
               "    If this will cause hardship, contact dev@scons.tigris.org."
+        deprecated_version_string = ".".join(map(str, deprecated_python_version))
         SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
-                            msg % python_version_string())
+                            msg % (deprecated_version_string, python_version_string()))
 
     if not options.help:
         SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
                         # x doesn't have a cwd, so it's either not a target,
                         # or not a file, so go ahead and keep it as a default
                         # target and let the engine sort it out:
-                        return 1                
+                        return 1
                 d = list(filter(check_dir, SCons.Script.DEFAULT_TARGETS))
                 SCons.Script.DEFAULT_TARGETS[:] = d
                 target_top = None
     except (ImportError, AttributeError):
         # On Windows there is no scons.py, so there is no
         # __main__.__version__, hence there is no script version.
-        pass 
+        pass
     parts.append(version_string("engine", SCons))
     parts.append(path_string("engine", SCons))
     parts.append("__COPYRIGHT__")
     values = SConsOptions.SConsValues(parser.get_default_values())
 
     OptionsParser = parser
-    
+
     try:
         _exec_main(parser, values)
     except SystemExit, s: