[Checkins] SVN: Products.DCWorkflow/trunk/Products/DCWorkflow/ Merge default encoding change into trunk
Patrick Gerken
do3ccqrv at gmail.com
Mon Nov 21 14:27:17 UTC 2011
Log message for revision 123459:
Merge default encoding change into trunk
Changed:
U Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt
U Products.DCWorkflow/trunk/Products/DCWorkflow/exportimport.py
-=-
Modified: Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt
===================================================================
--- Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt 2011-11-21 14:19:35 UTC (rev 123458)
+++ Products.DCWorkflow/trunk/Products/DCWorkflow/CHANGES.txt 2011-11-21 14:27:17 UTC (rev 123459)
@@ -28,7 +28,9 @@
- Deal with deprecation warnings for Zope 2.13.
+- Change default encoding of exports from None to utf-8.
+
2.2.0-beta (2009-12-06)
-----------------------
Modified: Products.DCWorkflow/trunk/Products/DCWorkflow/exportimport.py
===================================================================
--- Products.DCWorkflow/trunk/Products/DCWorkflow/exportimport.py 2011-11-21 14:19:35 UTC (rev 123458)
+++ Products.DCWorkflow/trunk/Products/DCWorkflow/exportimport.py 2011-11-21 14:27:17 UTC (rev 123459)
@@ -148,7 +148,7 @@
return self._extractScripts(self._obj)
security.declareProtected( ManagePortal, 'parseWorkflowXML' )
- def parseWorkflowXML( self, xml, encoding=None ):
+ def parseWorkflowXML( self, xml, encoding='utf-8' ):
""" Pseudo API.
"""
dom = parseString( xml )
@@ -648,7 +648,7 @@
return 'workflows/%s/scripts/%s.%s' % ( wf_dir, script_id, suffix )
-def _extractCreationGuard(root, encoding=None) :
+def _extractCreationGuard(root, encoding='utf-8') :
icc = root.getElementsByTagName('instance-creation-conditions')
assert len(icc) <= 1
if icc :
@@ -657,7 +657,7 @@
else :
return None
-def _extractStateNodes( root, encoding=None ):
+def _extractStateNodes( root, encoding='utf-8' ):
result = []
@@ -718,7 +718,7 @@
return result
-def _extractTransitionNodes( root, encoding=None ):
+def _extractTransitionNodes( root, encoding='utf-8' ):
result = []
@@ -751,7 +751,7 @@
return result
-def _extractVariableNodes( root, encoding=None ):
+def _extractVariableNodes( root, encoding='utf-8' ):
result = []
@@ -780,7 +780,7 @@
return result
-def _extractWorklistNodes( root, encoding=None ):
+def _extractWorklistNodes( root, encoding='utf-8' ):
result = []
@@ -799,7 +799,7 @@
return result
-def _extractScriptNodes( root, encoding=None ):
+def _extractScriptNodes( root, encoding='utf-8' ):
result = []
@@ -830,7 +830,7 @@
return result
-def _extractPermissionNodes( root, encoding=None ):
+def _extractPermissionNodes( root, encoding='utf-8' ):
result = []
@@ -840,7 +840,7 @@
return result
-def _extractActionNode( parent, encoding=None ):
+def _extractActionNode( parent, encoding='utf-8' ):
nodes = parent.getElementsByTagName( 'action' )
assert len( nodes ) <= 1, nodes
@@ -856,7 +856,7 @@
, 'icon' : _queryNodeAttribute( node, 'icon', '', encoding )
}
-def _extractGuardNode( parent, encoding=None ):
+def _extractGuardNode( parent, encoding='utf-8' ):
nodes = parent.getElementsByTagName( 'guard' )
assert len( nodes ) <= 1, nodes
@@ -883,7 +883,7 @@
, 'expression' : expr_text
}
-def _extractDefaultNode( parent, encoding=None ):
+def _extractDefaultNode( parent, encoding='utf-8' ):
nodes = parent.getElementsByTagName( 'default' )
assert len( nodes ) <= 1, nodes
@@ -918,7 +918,7 @@
_SEMICOLON_LIST_SPLITTER = re.compile( r';[ ]*' )
-def _extractMatchNode( parent, encoding=None ):
+def _extractMatchNode( parent, encoding='utf-8' ):
nodes = parent.getElementsByTagName( 'match' )
@@ -1242,7 +1242,7 @@
#
_marker = object()
-def _queryNodeAttribute( node, attr_name, default, encoding=None ):
+def _queryNodeAttribute( node, attr_name, default, encoding='utf-8' ):
""" Extract a string-valued attribute from node.
@@ -1260,7 +1260,7 @@
return value
-def _getNodeAttribute( node, attr_name, encoding=None ):
+def _getNodeAttribute( node, attr_name, encoding='utf-8' ):
""" Extract a string-valued attribute from node.
"""
@@ -1294,7 +1294,7 @@
return value in ( 'true', 'yes', '1' )
-def _coalesceTextNodeChildren( node, encoding=None ):
+def _coalesceTextNodeChildren( node, encoding='utf-8' ):
""" Concatenate all childe text nodes into a single string.
"""
@@ -1317,7 +1317,7 @@
return ''.join( [ line.lstrip() for line in joined.splitlines(True) ] ).rstrip()
-def _extractDescriptionNode(parent, encoding=None):
+def _extractDescriptionNode(parent, encoding='utf-8'):
d_nodes = parent.getElementsByTagName('description')
if d_nodes:
More information about the checkins
mailing list