subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1742820 - /subversion/trunk/build/run_tests.py
Date Sun, 08 May 2016 13:42:48 GMT
Author: stefan2
Date: Sun May  8 13:42:47 2016
New Revision: 1742820

URL: http://svn.apache.org/viewvc?rev=1742820&view=rev
Log:
In our build and test scripts, don't import built-in modules when in Python 3.

* build/run_tests.py
  (): The exceptions module only needs to be imported pre-Python 3.

Modified:
    subversion/trunk/build/run_tests.py

Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1742820&r1=1742819&r2=1742820&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Sun May  8 13:42:47 2016
@@ -48,7 +48,7 @@ separated list of test numbers; the defa
 import os, sys, shutil
 import re
 import logging
-import optparse, subprocess, imp, threading, traceback, exceptions
+import optparse, subprocess, imp, threading, traceback
 from datetime import datetime
 
 try:
@@ -58,6 +58,10 @@ except ImportError:
   # Python <3.0
   import Queue as queue
 
+if sys.version_info < (3, 0):
+  # Python >= 3.0 already has this build in
+  import exceptions
+
 # Ensure the compiled C tests use a known locale (Python tests set the locale
 # explicitly).
 os.environ['LC_ALL'] = 'C'



Mime
View raw message