Changeset 105931 in webkit


Ignore:
Timestamp:
Jan 25, 2012 3:11:46 PM (12 years ago)
Author:
eric@webkit.org
Message:

Remove Python 2.5 support from WebKit
https://bugs.webkit.org/show_bug.cgi?id=71593

Reviewed by Adam Barth.

Just removing support from this one core file.
I'll commit the rest of the (large) change once we've
gone 24 hours and seen that no bots have exploded.
We can roll out this one change if we break bots
and then roll in the rest once those bots are fixed.

  • Scripts/webkitpy/common/system/executive.py:

(Executive.cpu_count):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r105922 r105931  
     12012-01-25  Eric Seidel  <eric@webkit.org>
     2
     3        Remove Python 2.5 support from WebKit
     4        https://bugs.webkit.org/show_bug.cgi?id=71593
     5
     6        Reviewed by Adam Barth.
     7
     8        Just removing support from this one core file.
     9        I'll commit the rest of the (large) change once we've
     10        gone 24 hours and seen that no bots have exploded.
     11        We can roll out this one change if we break bots
     12        and then roll in the rest once those bots are fixed.
     13
     14        * Scripts/webkitpy/common/system/executive.py:
     15        (Executive.cpu_count):
     16
    1172012-01-25  Hajime Morita  <morrita@google.com>
    218
  • trunk/Tools/Scripts/webkitpy/common/system/executive.py

    r104482 r105931  
    2828# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2929
    30 try:
    31     # This API exists only in Python 2.6 and higher.  :(
    32     import multiprocessing
    33 except ImportError:
    34     multiprocessing = None
    35 
     30import multiprocessing
    3631import ctypes
    3732import errno
     
    161156
    162157    def cpu_count(self):
    163         if multiprocessing:
    164             return multiprocessing.cpu_count()
    165         # Darn.  We don't have the multiprocessing package.
    166         system_name = platform.system()
    167         if system_name == "Darwin":
    168             return int(self.run_command(["sysctl", "-n", "hw.ncpu"]))
    169         elif system_name == "Windows":
    170             return int(os.environ.get('NUMBER_OF_PROCESSORS', 1))
    171         elif system_name == "Linux":
    172             num_cores = os.sysconf("SC_NPROCESSORS_ONLN")
    173             if isinstance(num_cores, int) and num_cores > 0:
    174                 return num_cores
    175         # This quantity is a lie but probably a reasonable guess for modern
    176         # machines.
    177         return 2
     158        return multiprocessing.cpu_count()
    178159
    179160    @staticmethod
Note: See TracChangeset for help on using the changeset viewer.