I've gone ahead and implemented this in rewrite with r11737 and r11738. It's opt-in, so if you want to use it you need to install the mwparserfromhell library yourself, and set "use_mwparserfromhell = True" in your user-config.py. Eventually I'd like to add mwpfh as a requirement in the setup.py and make it an opt-out option.
I haven't looked much into how it would be implemented in trunk, however I assume it will require something similar, which I'll do once its fully working in rewrite.
If you notice any weird bugs, please let me know so I can fix them in pywikibot or report them upstream :D
Thanks,
-- Legoktm



On Wed, Apr 24, 2013 at 7:11 AM, legoktm <legoktm.wikipedia@gmail.com> wrote:
Hi all,
I had mentioned this in the rewrite roadmap, and noticed it came up on IRC as well, so I'd like to run this by the mailing list:

User:The Earwig has written a pure-python (with optional C-speedups) MediaWiki text parser named mwparserfromhell[1]. Currently we have the textlib library and some various regexes that implement this in a non-perfect way. From my experience using mwparser (over 400k successful edits with no issues) I believe it is ready to be bundled with the framework. I think it would still be a good idea to keep textlib in as a fallback or for users who are currently using it and don't need to migrate.

As for actually adding it, in the rewrite branch we can just add it as a dependency in setup.py, and then convert various methods over.
In trunk, I'm guessing we would need to add it as an external. (I'm not sure how that's actually done.)