<commit_before>Index: icat/icatcheck.py
===================================================================
--- icat/icatcheck.py	(revision 254)
+++ icat/icatcheck.py	(working copy)
@@ -261,7 +261,7 @@
     def _genealogy(self, rules):
         """Set up the genealogy of entity types."""
 
-        tree = { t:{'level':0, 'base':None} for t in self.schema.keys() }
+        tree = dict([ (t,{'level':0, 'base':None}) for t in self.schema.keys() ])
         for t in tree:
             log.debug("checking ancestors of %s ...", t)
             for r in rules:
@@ -328,7 +328,7 @@
         except GenealogyError as e:
             log.error("%s Dropping class genealogy in Python output.", 
                       e.args[0])
-            tree = { t:{'level':0, 'base':None} for t in self.schema.keys() }
+            tree = dict([ (t,{'level':0, 'base':None}) for t in self.schema.keys() ])
         else:
             base = [t for t in tree if tree[t]['base'] is None][0]
             self.schema[base].classname = baseclassname
Index: doc/examples/icatdump.py
===================================================================
--- doc/examples/icatdump.py	(revision 263)
+++ doc/examples/icatdump.py	(working copy)
@@ -204,7 +204,7 @@
     # entities, reindex is set to the list of attributes that shall
     # dertermine the sort order.
     if reindex:
-        idindex = { i:k for k,i in keyindex.iteritems() }
+        idindex = dict([ (i,k) for k,i in keyindex.iteritems() ])
         ds = {}
         keys = d.keys()
         keys.sort(key = lambda k: [ d[k][a] if d[k][a] is not None else '\x00' 
Index: doc/examples/ldapsync.py
===================================================================
--- doc/examples/ldapsync.py	(revision 263)
+++ doc/examples/ldapsync.py	(working copy)
@@ -31,7 +31,7 @@
 client = icat.Client(conf.url, **conf.client_kwargs)
 client.login(conf.auth, conf.credentials)
 
-icatuser = { u.name:u for u in client.search("User") }
+icatuser = dict([ (u.name,u) for u in client.search("User") ])
 
 
 ldapclient = ldap.initialize(conf.ldap_uri)
<commit_msg>Update python2_6.patch.<commit_after>Index: icat/icatcheck.py
===================================================================
--- icat/icatcheck.py	(revision 254)
+++ icat/icatcheck.py	(working copy)
@@ -261,7 +261,7 @@
     def _genealogy(self, rules):
         """Set up the genealogy of entity types."""
 
-        tree = { t:{'level':0, 'base':None} for t in self.schema.keys() }
+        tree = dict([ (t,{'level':0, 'base':None}) for t in self.schema.keys() ])
         for t in tree:
             log.debug("checking ancestors of %s ...", t)
             for r in rules:
@@ -328,7 +328,7 @@
         except GenealogyError as e:
             log.error("%s Dropping class genealogy in Python output.", 
                       e.args[0])
-            tree = { t:{'level':0, 'base':None} for t in self.schema.keys() }
+            tree = dict([ (t,{'level':0, 'base':None}) for t in self.schema.keys() ])
         else:
             base = [t for t in tree if tree[t]['base'] is None][0]
             self.schema[base].classname = baseclassname
Index: icat/chunkedhttp.py
===================================================================
--- icat/chunkedhttp.py	(revision 315)
+++ icat/chunkedhttp.py	(working copy)
@@ -58,7 +58,7 @@
 
         if message_body is not None:
             chunksize = getattr(self, 'chunksize', self.default_chunk_size)
-            if isinstance(message_body, type(b'')):
+            if isinstance(message_body, type('')):
                 bodyiter = stringiterator(message_body, chunksize)
             elif isinstance(message_body, type(u'')):
                 bodyiter = stringiterator(message_body.encode('ascii'), 
Index: doc/examples/icatdump.py
===================================================================
--- doc/examples/icatdump.py	(revision 263)
+++ doc/examples/icatdump.py	(working copy)
@@ -204,7 +204,7 @@
     # entities, reindex is set to the list of attributes that shall
     # dertermine the sort order.
     if reindex:
-        idindex = { i:k for k,i in keyindex.iteritems() }
+        idindex = dict([ (i,k) for k,i in keyindex.iteritems() ])
         ds = {}
         keys = d.keys()
         keys.sort(key = lambda k: [ d[k][a] if d[k][a] is not None else '\x00' 
Index: doc/examples/ldapsync.py
===================================================================
--- doc/examples/ldapsync.py	(revision 263)
+++ doc/examples/ldapsync.py	(working copy)
@@ -31,7 +31,7 @@
 client = icat.Client(conf.url, **conf.client_kwargs)
 client.login(conf.auth, conf.credentials)
 
-icatuser = { u.name:u for u in client.search("User") }
+icatuser = dict([ (u.name,u) for u in client.search("User") ])
 
 
 ldapclient = ldap.initialize(conf.ldap_uri)

{'fraction_non_alphanumeric': 0.24615064502704953, 'fraction_numerical': 0.02184769038701623, 'mean_word_length': 2.8954619124797407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5346883', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1510, 'n_words': 382}