Author: bugman Date: Wed Jul 2 09:44:28 2014 New Revision: 24395 URL: http://svn.gna.org/viewcvs/relax?rev=24395&view=rev Log: Merged revisions 24390-24391 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r24390 | bugman | 2014-07-02 09:37:42 +0200 (Wed, 02 Jul 2014) | 17 lines General Python 3 fixes via the 2to3 script. The command used was: 2to3 -j 4 -w \ -f buffer \ -f idioms \ -f set_literal \ -f ws_comma \ -x except \ -x import \ -x imports \ -x long \ -x numliterals \ -x xrange \ . ........ r24391 | bugman | 2014-07-02 09:42:01 +0200 (Wed, 02 Jul 2014) | 7 lines Removed the lib.compat.sorted() function which was providing Python2.3 compatibility. For a while now, relax has been unable to run on Python versions less than 2.5. Therefore there is no use for having this replacement function for Python <= 2.3 which was being placed into the builtins module. ........ Modified: branches/disp_spin_speed/ (props changed) branches/disp_spin_speed/lib/compat.py Propchange: branches/disp_spin_speed/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Jul 2 09:44:28 2014 @@ -1 +1 @@ -/trunk:1-24263,24354-24387 +/trunk:1-24393 Modified: branches/disp_spin_speed/lib/compat.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/compat.py?rev=24395&r1=24394&r2=24395&view=diff ============================================================================== --- branches/disp_spin_speed/lib/compat.py (original) +++ branches/disp_spin_speed/lib/compat.py Wed Jul 2 09:44:28 2014 @@ -113,7 +113,7 @@ # Numpy. import numpy try: - numpy.linalg.norm(numpy.ones((3,3)), axis=1) + numpy.linalg.norm(numpy.ones((3, 3)), axis=1) numpy_norm_axis = True except: numpy_norm_axis = False @@ -247,19 +247,6 @@ # Support for older version (this is much slower). return numpy.apply_along_axis(numpy.linalg.norm, axis, x) - - -def sorted(data): - """Python 2.3 and earlier replacement function for the builtin sorted() function.""" - - # Make a copy of the data. - new_data = deepcopy(data) - - # Sort. - new_data.sort() - - # Return the new data. - return new_data @@ -374,10 +361,6 @@ # This should work as all range() usage for Python 3 in relax must match the old xrange() usage. #builtins.range = builtins.xrange - # The sorted() builtin function for Python 2.3 and earlier. - if sys.version_info[1] <= 3: - setattr(builtins, 'sorted', sorted) - # The os.devnull object for Python 2.3 and earlier. if sys.version_info[1] <= 3: if SYSTEM == 'Linux':