One (almost) down, one to go
As you know, I'm keen on porting Mailman 3 to Python 3. I can't even start this effort until all of our dependencies are compatible with Python 3. We have two big blockers, restish (which provides the framework for the REST administrative API), and Storm (our ORM). Development for both libraries is meager to nonexistent, and neither have been ported to Python 3, with no known active work in progress to do so[*].
There's good news on at least one front! I've found a very nice REST framework that is both under active development and is already Python 3 compatible. It's called 'falcon':
http://falconframework.org/ http://falcon.readthedocs.org/en/latest/
I've had some spare time recently to work on porting MM3 from restish to falcon and I've been very encouraged with the results. I've had to make a few minor modifications to falcon, so its public release won't work, but I'm hopeful this pull request will be successful:
https://github.com/racker/falcon/pull/307
As I describe in the PR, there are plenty of superficial API differences between restish and falcon, but they are close enough that porting was a breeze. The big thing missing is restish-ish @child path segment traversal, but with the above branch, I was able to implement the most important bits of that in a subclass. This means I was able to preserve the essential code of MM3's REST implementation, adjust for the cosmetic differences, and substitute falcon for restish *with no changes to the public MM3 administrative API*. This last bit is crucial - neither mailman.client nor any other client of the MM3 API will have to change. I think I was even able to preserve the body strings of the HTTP error codes, even though I don't consider this part of the official MM3 API.
You can play with the MM3 falcon branch here:
https://code.launchpad.net/~barry/mailman/falcon
Until and unless a version of falcon is released with my changes above, you'll have to git clone my falcon branch and install it into your virtualenv in order to use the MM3 branch. I found it a little tricky to get that working (due to some weird dependencies on specific versions of the 'six' library), but it's certainly doable because the full MM3 test suite passes.
That's it for now. I won't merge the falcon branch into MM3 trunk, at least until my PR has been merged, and I'll urge the falcon maintainer to release a new version on PyPI to make it even easier to use.
Now, about that SQLAlchemy port... :)
Cheers, -Barry
[*] I and others have tried to port restish. I've failed at least twice. ;)
participants (1)
-
Barry Warsaw