8 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/73dabef59a23/ changeset: 73dabef59a23 user: dan date: 2012-10-17 21:56:11 summary: Add util.isinf function. affected #: 1 file diff -r 53c2605a8ca2fa8086c5c6da3bbbfacd37737510 -r 73dabef59a235e318973fab5a80e844ebc917cc3 lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -16,6 +16,14 @@ except ImportError: from md5 import new as md5 +try: + from math import isinf +except ImportError: + INF = float( 'inf' ) + NEG_INF = -INF + ISINF_LIST = [ INF, NEG_INF ] + isinf = lambda x: x in ISINF_LIST + from galaxy import eggs import pkg_resources https://bitbucket.org/galaxy/galaxy-central/changeset/33c475973e46/ changeset: 33c475973e46 user: dan date: 2012-10-17 21:56:11 summary: Have exit range isinf test use util.isinf for python2.5 compatibility. affected #: 1 file diff -r 73dabef59a235e318973fab5a80e844ebc917cc3 -r 33c475973e46d91ff7daef18f537357cbdaf6c06 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1276,8 +1276,8 @@ # isn't bogus. If we have two infinite values, then # the start must be -inf and the end must be +inf. # So at least warn about this situation: - if ( math.isinf( exit_code.range_start ) and - math.isinf( exit_code.range_end ) ): + if ( util.isinf( exit_code.range_start ) and + util.isinf( exit_code.range_end ) ): log.warning( "Tool exit_code range %s will match on " + "all exit codes" % code_range ) self.stdio_exit_codes.append( exit_code ) https://bitbucket.org/galaxy/galaxy-central/changeset/1de87a3f82a2/ changeset: 1de87a3f82a2 user: dan date: 2012-10-17 21:56:12 summary: Fix file read sentinel. Use simplejson for python2.5 compatibility in genome index. affected #: 1 file diff -r 33c475973e46d91ff7daef18f537357cbdaf6c06 -r 1de87a3f82a27b89461c0964b77f647ac8619a69 lib/galaxy/tools/genome_index/__init__.py --- a/lib/galaxy/tools/genome_index/__init__.py +++ b/lib/galaxy/tools/genome_index/__init__.py @@ -1,6 +1,6 @@ from __future__ import with_statement -import os, shutil, logging, tempfile, json, tarfile +import os, shutil, logging, tempfile, tarfile from galaxy import model, util from galaxy.web.framework.helpers import to_unicode @@ -9,6 +9,10 @@ from galaxy.web.base.controller import UsesHistoryMixin from galaxy.tools.data import ToolDataTableManager +import pkg_resources +pkg_resources.require("simplejson") +import simplejson + log = logging.getLogger(__name__) def load_genome_index_tools( toolbox ): @@ -70,7 +74,7 @@ fp = open( gitd.dataset.get_file_name(), 'r' ) deferred = sa_session.query( model.DeferredJob ).filter_by( id=gitd.deferred_job_id ).first() try: - logloc = json.load( fp ) + logloc = simplejson.load( fp ) except ValueError: deferred.state = app.model.DeferredJob.states.ERROR sa_session.add( deferred ) @@ -211,7 +215,7 @@ import hashlib md5 = hashlib.md5() with open( filename, 'rb' ) as f: - for chunk in iter( lambda: f.read( 8192 ), b'' ): + for chunk in iter( lambda: f.read( 8192 ), '' ): md5.update( chunk ) return md5.digest() https://bitbucket.org/galaxy/galaxy-central/changeset/3fd0416c1062/ changeset: 3fd0416c1062 user: dan date: 2012-10-17 21:56:12 summary: Use simplejson in lib/galaxy/visualization/data_providers/phyloviz/baseparser.py for python2.5 compatibility. affected #: 1 file diff -r 1de87a3f82a27b89461c0964b77f647ac8619a69 -r 3fd0416c1062e269e813004263532d85f1ac7f9b lib/galaxy/visualization/data_providers/phyloviz/baseparser.py --- a/lib/galaxy/visualization/data_providers/phyloviz/baseparser.py +++ b/lib/galaxy/visualization/data_providers/phyloviz/baseparser.py @@ -1,4 +1,6 @@ -import json +import pkg_resources +pkg_resources.require("simplejson") +import simplejson class Node(object): """Node class of PhyloTree, which represents a CLAUDE in a phylogenetic tree""" @@ -116,7 +118,7 @@ def toJson(self, jsonDict): """Convenience method to get a json string from a python json dict""" - return json.dumps(jsonDict) + return simplejson.dumps(jsonDict) def _writeJsonToFile(self, filepath, json): """Writes the file out to the system""" https://bitbucket.org/galaxy/galaxy-central/changeset/cc3550b576f8/ changeset: cc3550b576f8 user: dan date: 2012-10-17 21:56:12 summary: Use simplejson in lib/galaxy/visualization/data_providers/phyloviz/newickparser.py for python2.5 compatibility. affected #: 1 file diff -r 3fd0416c1062e269e813004263532d85f1ac7f9b -r cc3550b576f8a1d64b81c4b209aa209d25bf73d9 lib/galaxy/visualization/data_providers/phyloviz/newickparser.py --- a/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py +++ b/lib/galaxy/visualization/data_providers/phyloviz/newickparser.py @@ -1,3 +1,4 @@ +from __future__ import with_statement from baseparser import Base_Parser, PhyloTree import re https://bitbucket.org/galaxy/galaxy-central/changeset/7389ec156e62/ changeset: 7389ec156e62 user: dan date: 2012-10-17 21:56:12 summary: Use simplejson in lib/galaxy/visualization/data_providers/phyloviz/nexusparser.py for python2.5 compatibility. affected #: 1 file diff -r cc3550b576f8a1d64b81c4b209aa209d25bf73d9 -r 7389ec156e62c3ca3af24b7458396a58ed54ca68 lib/galaxy/visualization/data_providers/phyloviz/nexusparser.py --- a/lib/galaxy/visualization/data_providers/phyloviz/nexusparser.py +++ b/lib/galaxy/visualization/data_providers/phyloviz/nexusparser.py @@ -1,3 +1,4 @@ +from __future__ import with_statement from newickparser import Newick_Parser import re https://bitbucket.org/galaxy/galaxy-central/changeset/e6ab6f0524ea/ changeset: e6ab6f0524ea user: dan date: 2012-10-17 21:56:12 summary: Use simplejson in data_admin for python2.5 compatibility. affected #: 1 file diff -r 7389ec156e62c3ca3af24b7458396a58ed54ca68 -r e6ab6f0524eae90757c4aa17d24c43a2d65fabca lib/galaxy/webapps/galaxy/controllers/data_admin.py --- a/lib/galaxy/webapps/galaxy/controllers/data_admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/data_admin.py @@ -1,4 +1,4 @@ -import sys, ftplib, json +import sys, ftplib from galaxy import model, util from galaxy.jobs import transfer_manager from galaxy.web.base.controller import * @@ -6,6 +6,10 @@ from galaxy.model.orm import * from library_common import get_comptypes, lucene_search, whoosh_search +import pkg_resources +pkg_resources.require("simplejson") +import simplejson + # Older py compatibility try: set() @@ -157,7 +161,7 @@ gname = deferred.params[ 'intname' ] indexers = ', '.join( deferred.params[ 'indexes' ] ) jobs = self._get_jobs( deferred, trans ) - jsonjobs = json.dumps( jobs ) + jsonjobs = simplejson.dumps( jobs ) return trans.fill_template( '/admin/data_admin/download_status.mako', name=gname, indexers=indexers, mainjob=jobid, jobs=jobs, jsonjobs=jsonjobs ) @web.expose @@ -169,7 +173,7 @@ jobid = params.get( 'jobid', '' ) job = sa_session.query( model.DeferredJob ).filter_by( id=jobid ).first() jobs = self._get_jobs( job, trans ) - return trans.fill_template( '/admin/data_admin/ajax_status.mako', json=json.dumps( jobs ) ) + return trans.fill_template( '/admin/data_admin/ajax_status.mako', json=simplejson.dumps( jobs ) ) def _get_job( self, jobid, jobtype, trans ): sa = trans.app.model.context.current https://bitbucket.org/galaxy/galaxy-central/changeset/be7a8d480867/ changeset: be7a8d480867 user: dan date: 2012-10-17 21:56:29 summary: Fix for trying to set httponly cookie attribute for python2.5 compatibility. affected #: 1 file diff -r e6ab6f0524eae90757c4aa17d24c43a2d65fabca -r be7a8d4808676c7519919483f115811a1b77ec9f lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -6,6 +6,7 @@ import os, sys, time, socket, random, string import inspect +from Cookie import CookieError pkg_resources.require( "Cheetah" ) from Cheetah.Template import Template @@ -414,7 +415,10 @@ tstamp = time.localtime ( time.time() + 3600 * 24 * age ) self.response.cookies[name]['expires'] = time.strftime( '%a, %d-%b-%Y %H:%M:%S GMT', tstamp ) self.response.cookies[name]['version'] = version - self.response.cookies[name]['httponly'] = True + try: + self.response.cookies[name]['httponly'] = True + except CookieError, e: + log.warning( "Error setting httponly attribute in cookie '%s': %s" % ( name, e ) ) def _ensure_valid_session( self, session_cookie, create=True): """ Ensure that a valid Galaxy session exists and is available as Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.