Merge 3.3 (#4931)
authorÉric Araujo <merwok@netwok.org>
Wed, 12 Mar 2014 08:10:51 +0000 (04:10 -0400)
committerÉric Araujo <merwok@netwok.org>
Wed, 12 Mar 2014 08:10:51 +0000 (04:10 -0400)
1  2 
Doc/distutils/apiref.rst
Lib/distutils/core.py
Lib/distutils/dir_util.py
Lib/distutils/tests/test_util.py
Lib/distutils/util.py
Misc/NEWS

Simple merge
index c811d5bd9c46892661f47b19ef9b56e5632e824d,25d91baa0f2a1b2791438c81f1abf47c60fcbe8d..2bfe66aa2f49d5c699f62ab7cbe3a88cd78d318a
@@@ -149,14 -147,12 +148,12 @@@ def setup (**attrs)
              dist.run_commands()
          except KeyboardInterrupt:
              raise SystemExit("interrupted")
 -        except (IOError, os.error) as exc:
 +        except OSError as exc:
-             error = grok_environment_error(exc)
              if DEBUG:
-                 sys.stderr.write(error + "\n")
+                 sys.stderr.write("error: %s\n" % (exc,))
                  raise
              else:
-                 raise SystemExit(error)
+                 raise SystemExit("error: %s" % (exc,))
  
          except (DistutilsError,
                  CCompilerError) as msg:
index 2b35aa318e05b66d2bf5455d2c659f65a27eef69,6a72bdd4cdc6cee9df36f800e87daf35fe01f1a5..9879b0dc07c80d9086309af62bc8319315e7269e
@@@ -198,9 -197,8 +197,8 @@@ def remove_tree(directory, verbose=1, d
              abspath = os.path.abspath(cmd[1])
              if abspath in _path_created:
                  del _path_created[abspath]
 -        except (IOError, OSError) as exc:
 +        except OSError as exc:
-             log.warn(grok_environment_error(
-                     exc, "error removing %s: " % directory))
+             log.warn("error removing %s: %s", directory, exc)
  
  def ensure_relative(path):
      """Take the full path 'path', and make it a relative path.
Simple merge
Simple merge
diff --cc Misc/NEWS
index d1d0401652391c21c6dcd683ec135eb698887ace,1dce0eae5c22bdc6be748167dae59ef8c9f02e67..e69874fd42eb9d00e2a7e9653947d89bf856758d
+++ b/Misc/NEWS
@@@ -20,16 -13,12 +20,19 @@@ Core and Builtin
  Library
  -------
  
 -- Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
 -  Patch by Claudiu Popa.
 +- Issue #19157: Include the broadcast address in the usuable hosts for IPv6
 +  in ipaddress.
  
+ - Issue #4931: distutils should not produce unhelpful "error: None" messages
+   anymore.  distutils.util.grok_environment_error is kept but doc-deprecated.
 +- Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
 +  Patch by Claudiu Popa.
 +
 +- Issue #11558: ``email.message.Message.attach`` now returns a more
 +  useful error message if ``attach`` is called on a message for which
 +  ``is_multipart`` is False.
 +
  - Issue #20283: RE pattern methods now accept the string keyword parameters
    as documented.  The pattern and source keyword parameters are left as
    deprecated aliases.