Joe Amenta's Blog

December 24, 2009

New (testing) fix_imports fixer almost done

Filed under: 3to2 — Tags: — AirBreather @ 5:40 pm

fix_imports_test is almost done – the actual imports are mostly successful, with just a few annoying bugs in how it handles things with commas, like:

import http.client, winreg
and
from http import client, spam, eggs

The next step is getting the actual usage of those imported modules to work.

The next step after that, of course, is the fix_imports2 stuff.  I think that this will still be split out into a separate module – otherwise, special cases would pollute the heck out of the code for the other one, and it would make debugging a nightmare.

December 15, 2009

Finals week

Filed under: 3to2 — Tags: — AirBreather @ 3:40 pm

Finals week has started, and I already only have one more exam (on Friday).
I have done a little bit of work on the new fix_imports replacement, and I think that it will turn out to be much cleaner than the sloppy ones in the trunk right now.
Other updates:
I will be doing a poster session at PyCon 2010 about 3to2, so stay tuned for updates about that.

December 6, 2009

First actual fixed imports with new matcher

Filed under: 3to2 — Tags: — AirBreather @ 3:20 pm

So I’ve gotten the first part of the rewrite for fixing code with imports working… (from) (http) (import) (client) goes to (import) (httplib) (as) (client)
I wrote this particular one for playing around with one of the complicated cases using the new pattern builder… I’ll toy around with it some more for the simple cases.

Powered by WordPress