namlook/mongokit — pull request #151 by aquavitae (2013-10-26 15:14:47+00:00)
Title: Py3

A couple of days ago I forked mongokit to see if I could make it work with Python 3. My approach was to use six to make it run in either py2.7 or py3.3 without using 2to3, and it seems to be working. Currently all test are passing in both 2.7 and 3.3, and should work in 2.6 but probably not 2.5 or 3.2. However, handling the various string/byte types in the different versions of python resulted in rather messy code, and I had to change the authorized types for py3 to include 'str' and 'bytes' instead of 'basestring' and 'unicode'.

I'm creating a pull request so in case you'd like to incorporate these changes into your own code, but if not I'll take this to a full python 3 port (i.e. no support for 2) and continue maintaining it until you want to pull it.