Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Py3 #151

Closed
wants to merge 23 commits into from
Closed

Py3 #151

wants to merge 23 commits into from

Conversation

aquavitae
Copy link

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.

@eneepo
Copy link
Collaborator

eneepo commented Aug 14, 2014

It's really awesome and missing feature. Other than merge conflicts is there any other reason it isn't merged?

@gulbinas
Copy link
Collaborator

@aquavitae As a new contributor I'm interested in having mongokit compatible with Python3. Would you consider merging your fork into this project so one project could be for Python2 and Python3? In that way we would keep our user base strong and concentrate mongokit development in one place.

@aquavitae
Copy link
Author

My fork is a little out of date, but more importantly is Py3 only so simply merging it might not work that well. It would probably be better to fix up this pull request and use it (assuming you're happy with six-based python3 support). My approach was to aim for a Py3 version backwardly compatible to Py2, but the biggest challenge was that mongokit still supports Py2.5. If you're considering dropping versions before 2.7 it will be much easier. I won't be able to do anything on this pull request for a couple of weeks, but if nothing has happened by the time I get some free time I'll see if I can update it.

I have no particular interest in long term maintenance of my fork and I'm really only keeping it going to the extent that I need it, so I will gladly close it once mongokit is Py3 compatible,.

@gulbinas
Copy link
Collaborator

Ok, I see.
Since I new here, I'll try to find out, do we really need python2.6 support.
Once that is clear, we'll start working on this branch

@gulbinas gulbinas mentioned this pull request Sep 10, 2014
@eneepo
Copy link
Collaborator

eneepo commented Oct 18, 2014

Is anybody working on this to resolve the conflicts?

@gulbinas
Copy link
Collaborator

As far as I know, nobody

@eneepo
Copy link
Collaborator

eneepo commented Oct 22, 2014

Ok, I've resolved the merge conflicts and I created a new branch for further work. Python 2 tests pass but there are 2 errors and 1 failure on python 3.3 and python 3.4. I think everything is ok and I hope haven't miss anything. Please take a look and help with resvoling the remaining issues(tests, travis, documentation, ...). Thanks

@eneepo eneepo mentioned this pull request Dec 14, 2014
@eneepo
Copy link
Collaborator

eneepo commented Dec 20, 2014

Py3 is working fine and ready.

@eneepo eneepo closed this Dec 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants