changeset 459:a4afec9ff526

"patch for collections module added, for the python versions < 2.7 "
author Akash Sinha <akash2607@gmail.com>
date Sat, 04 Jun 2011 03:14:15 +0530
parents f04fafdd629f
children 72dbe801338e
files MoinMoin/util/monkeypatch.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/monkeypatch.py	Wed Jun 01 15:18:02 2011 +0530
+++ b/MoinMoin/util/monkeypatch.py	Sat Jun 04 03:14:15 2011 +0530
@@ -30,3 +30,8 @@
 import sys
 posixemulation.sys = sys
 
+# collections patching for the class OrderedDict for the python versions < 2.7 
+import collections
+if "OrderedDict" not in dir(collections):
+    from sqlalchemy.util import OrderedDict
+    collections.OrderedDict = OrderedDict