Index: /trunk/setup.cfg
===================================================================
--- /trunk/setup.cfg	(revision 36)
+++ /trunk/setup.cfg	(revision 49)
@@ -5,7 +5,7 @@
 
 # List of directories to search for 'syck.h' (separated by ':').
-#include_dirs=/usr/local/include:../../include
+include_dirs=/usr/local/include
 
 # List of directories to search for 'libsyck.a' (separated by ':').
-#library_dirs=/usr/local/lib:../../lib
+library_dirs=/usr/local/lib
 
Index: /trunk/ext/_syckmodule.c
===================================================================
--- /trunk/ext/_syckmodule.c	(revision 34)
+++ /trunk/ext/_syckmodule.c	(revision 49)
@@ -2136,4 +2136,6 @@
     PyObject *m;
 
+    PyEval_InitThreads();   /* Fix segfault for Python 2.3 */
+
     if (PyType_Ready(&PySyckNode_Type) < 0)
         return;
Index: /trunk/tests/test_loader.py
===================================================================
--- /trunk/tests/test_loader.py	(revision 23)
+++ /trunk/tests/test_loader.py	(revision 49)
@@ -16,13 +16,15 @@
 
 try:
-    import sets
-except ImportError:
-    class _sets:
-        def Set(self, items):
+    Set = set
+except:
+    try:
+        from sets import Set
+    except ImportError:
+        def Set(items):
             set = {}
             for items in items:
                 set[items] = None
             return set
-    sets = _sets()
+
 
 INF = 1e300000
@@ -128,5 +130,5 @@
 """, {
 #    'baseball players': sets.Set(['Mark McGwire', 'Sammy Sosa', 'Ken Griffey']),
-    'baseball teams': sets.Set(['Boston Red Sox', 'Detroit Tigers', 'New York Yankees']),
+    'baseball teams': Set(['Boston Red Sox', 'Detroit Tigers', 'New York Yankees']),
 }
 
Index: /trunk/tests/test_pickle.py
===================================================================
--- /trunk/tests/test_pickle.py	(revision 36)
+++ /trunk/tests/test_pickle.py	(revision 49)
@@ -12,7 +12,9 @@
 - !python/long 12345678901234567890
 - !python/float 123.456
-- !python/float 123.4560000001
+- !python/float 123456e-3
+- !python/complex 1.0
+- !python/complex 0.0+1.0j
 - !python/str foo bar
-- !python/unicode FOO Ð€Ð£ bar Ð±Ð°Ñ
+- !python/unicode FOO Ð€Ð£ bar Ð±Ð°
 - !python/list [1, 2, 3]
 - !python/tuple [foo, bar]
@@ -25,7 +27,9 @@
     12345678901234567890L,
     123.456,
-    123.4560000001,
+    123.456,
+    1+0j,
+    1j,
     'foo bar',
-    unicode('FOO Ð€Ð£ bar Ð±Ð°Ñ', 'utf-8'),
+    unicode('FOO Ð€Ð£ bar Ð±Ð°', 'utf-8'),
     [1, 2, 3],
     ('foo', 'bar'),
@@ -75,4 +79,13 @@
     object,
 ]
+
+import sys, unittest, encodings.cp1251, os.path
+
+MODULES = """
+- !python/module:sys
+- !python/module:unittest
+- !python/module:encodings.cp1251
+- !python/module:os.path
+""", [sys, unittest, encodings.cp1251, os.path]
 
 class AnObject(object):
@@ -246,4 +259,7 @@
         self._testPickle(NAMES)
 
+    def testModules(self):
+        self._testPickle(MODULES)
+
     def testObjects(self):
         self._testPickle(OBJECTS)
Index: /trunk/tests/test_dumper.py
===================================================================
--- /trunk/tests/test_dumper.py	(revision 23)
+++ /trunk/tests/test_dumper.py	(revision 49)
@@ -16,14 +16,14 @@
 
 try:
-    import sets
+    Set = set
 except:
-    class _sets:
-        def Set(self, items):
+    try:
+        from sets import Set
+    except ImportError:
+        def Set(items):
             set = {}
             for items in items:
                 set[items] = None
             return set
-    sets = _sets()
-
 
 EXAMPLE = {
@@ -73,5 +73,5 @@
 
 COLLECTIONS = [
-    sets.Set(range(10)),
+    Set(range(10)),
 ]
 
Index: /trunk/lib/syck/loaders.py
===================================================================
--- /trunk/lib/syck/loaders.py	(revision 36)
+++ /trunk/lib/syck/loaders.py	(revision 49)
@@ -13,13 +13,14 @@
 
 try:
-    import sets
-except ImportError:
-    class _sets:
-        def Set(self, items):
+    Set = set
+except:
+    try:
+        from sets import Set
+    except ImportError:
+        def Set(items):
             set = {}
             for items in items:
                 set[items] = None
             return set
-    sets = _sets()
 
 import _syck
@@ -288,5 +289,5 @@
 
     def construct_set(self, node):
-        return sets.Set(node.value)
+        return Set(node.value)
 
     def construct_python_none(self, node):
@@ -304,4 +305,7 @@
     def construct_python_float(self, node):
         return float(node.value)
+
+    def construct_python_complex(self, node):
+        return complex(node.value)
 
     def construct_python_str(self, node):
@@ -359,4 +363,9 @@
         return self.find_python_object(node)
 
+    def construct_python_module(self, node):
+        module_name = node.tag.split(':')[3]
+        __import__(module_name)
+        return sys.modules[module_name]
+
     def construct_python_object(self, node):
         cls = self.find_python_object(node)
Index: /trunk/lib/syck/dumpers.py
===================================================================
--- /trunk/lib/syck/dumpers.py	(revision 36)
+++ /trunk/lib/syck/dumpers.py	(revision 49)
@@ -144,4 +144,11 @@
         return _syck.Scalar(value, tag="tag:yaml.org,2002:float")
 
+    def represent_complex(self, object):
+        if object.real != 0.0:
+            value = '%s+%sj' % (repr(object.real), repr(object.imag))
+        else:
+            value = '%sj' % repr(object.imag)
+        return _syck.Scalar(value, tag="tag:python.yaml.org,2002:complex")
+
     def represent_sets_Set(self, object):
         return _syck.Seq(list(object), tag="tag:yaml.org,2002:set")
@@ -165,4 +172,7 @@
     represent_function = represent_type
     represent_builtin_function_or_method = represent_type
+
+    def represent_module(self, object):
+        return _syck.Scalar('', tag="tag:python.yaml.org,2002:module:"+object.__name__)
 
     def represent_instance(self, object):
