[hg] galaxy 1574: WebHelpers imports simplejson. Import simplej...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[hg] galaxy 1574: WebHelpers imports simplejson. Import simplej...

Nate Coraor (nate@bx.psu.edu)
details:   http://www.bx.psu.edu/hg/galaxy/rev/36a7ff82faf0
changeset: 1574:36a7ff82faf0
user:      Nate Coraor <[hidden email]>
date:      Fri Oct 24 12:32:32 2008 -0400
description:
WebHelpers imports simplejson.  Import simplejson before importing
WebHelpers so we can ensure we get our version.

4 file(s) affected in this change:

lib/galaxy/eggs/__init__.py
lib/galaxy/model/custom_types.py
lib/galaxy/web/controllers/workflow.py
lib/galaxy/web/framework/__init__.py

diffs (67 lines):

diff -r c278ca8f9b73 -r 36a7ff82faf0 lib/galaxy/eggs/__init__.py
--- a/lib/galaxy/eggs/__init__.py Fri Oct 24 11:41:23 2008 -0400
+++ b/lib/galaxy/eggs/__init__.py Fri Oct 24 12:32:32 2008 -0400
@@ -528,8 +528,6 @@
         else:
             pkg_resources.working_set.require( "%s==%s" % ( name, egg.get_vertag() ) )
         return
-    except UserWarning, e:
-        sys.exit( 1 )
     except pkg_resources.VersionConflict, e:
         # there's a conflicting egg on the pythonpath, remove it
         dist = pkg_resources.get_distribution( name )
diff -r c278ca8f9b73 -r 36a7ff82faf0 lib/galaxy/model/custom_types.py
--- a/lib/galaxy/model/custom_types.py Fri Oct 24 11:41:23 2008 -0400
+++ b/lib/galaxy/model/custom_types.py Fri Oct 24 12:32:32 2008 -0400
@@ -1,4 +1,6 @@
 from sqlalchemy.types import *
+import pkg_resources
+pkg_resources.require("simplejson")
 import simplejson
 import pickle
 from galaxy.util.bunch import Bunch
diff -r c278ca8f9b73 -r 36a7ff82faf0 lib/galaxy/web/controllers/workflow.py
--- a/lib/galaxy/web/controllers/workflow.py Fri Oct 24 11:41:23 2008 -0400
+++ b/lib/galaxy/web/controllers/workflow.py Fri Oct 24 12:32:32 2008 -0400
@@ -1,5 +1,7 @@
 from galaxy.web.base.controller import *
 
+import pkg_resources
+pkg_resources.require( "simplejson" )
 import simplejson
 
 from galaxy.tools.parameters import *
@@ -736,4 +738,4 @@
                 prefix = "%s|" % ( key )
                 cleanup( prefix, input.cases[current_case].inputs, group_values )
     cleanup( "", inputs, values )
-    return associations
\ No newline at end of file
+    return associations
diff -r c278ca8f9b73 -r 36a7ff82faf0 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py Fri Oct 24 11:41:23 2008 -0400
+++ b/lib/galaxy/web/framework/__init__.py Fri Oct 24 12:32:32 2008 -0400
@@ -11,18 +11,18 @@
 import pickle
 from galaxy import util
 
+pkg_resources.require( "simplejson" )
+import simplejson
+
 pkg_resources.require( "WebHelpers" )
+import webhelpers
+
 pkg_resources.require( "PasteDeploy" )
-
-import webhelpers
 from paste.deploy.converters import asbool
 
 pkg_resources.require( "Mako" )
 import mako.template
 import mako.lookup
-
-pkg_resources.require( "simplejson" )
-import simplejson
 
 pkg_resources.require( "sqlalchemy>=0.3" )
 from sqlalchemy import desc