This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author samueljohn
Recipients ezio.melotti, mrabarnett, samueljohn
Date 2013-05-24.17:40:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As also discussed at and, Python 2.7.4 and 2.7.5 seem to have added an `from _sre import MAXREPEAT` to the, and modules.

But python 2.7.3 (and older?) don't have the built in MAXREPEAT in _sre. Some virtualenvs have to be updated (which is easy) but some Software (such as vim, shipped with OS X 10.8.3) is statically linked to an older python 2.7.2 (I guess) but somehow picks up my newly built python 2.7.5 and attempts to load it's (Weechat also reported to being affected)

I think this is more a bug of vim/weechat etc. but we at homebrew have to do some "hacky" fix, because Apple is not going to update vim very soon, and so having a newer python in path breaks system stuff.

So I am fine if you close this here again. But at least we have a reference or perhaps you guys have a better idea how to work-around.

For homebrew, I propose a monkey-patch in to the _sre module if it does not have a MAXREPEAT.

       from _sre import MAXREPEAT
   except ImportError:
       import _sre
       _sre.MAXREPEAT = 65535 # this monkey-patches all other places of "from _sre import MAXREPEAT"
Date User Action Args
2013-05-24 17:40:43samueljohnsetrecipients: + samueljohn, ezio.melotti, mrabarnett
2013-05-24 17:40:43samueljohnsetmessageid: <>
2013-05-24 17:40:43samueljohnlinkissue18050 messages
2013-05-24 17:40:42samueljohncreate