Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86277
| References | <CANR9iG-Jy7p3h9027kMT-zE4zjH_FKh8WX_Lrt=vxJU40g1OHg@mail.gmail.com> |
|---|---|
| Date | 2015-02-24 11:12 +1100 |
| Subject | Re: How to apply python patch for issue9729 |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19107.1424736730.18130.python-list@python.org> (permalink) |
On Tue, Feb 24, 2015 at 8:09 AM, Sada Shirol <get2sada@gmail.com> wrote: > Upon some research found that I need to apply below patch: > > http://bugs.python.org/issue9729 > > How do I apply a patch to python 2.6.6 on Linux? Hmm. You have a bit of a problem there: The patch wasn't designed to apply to 2.6. So you may find that it doesn't apply at all, or needs some tweaking. But the basic plan would be: Grab the source code for either 2.6.9 or the exact 2.6.6 that was built for your system, build it and run the test suite (just to make sure), then apply the patch, compile again, and rerun the test suite. However, that's going to be a lot of hassle, and may well break stuff on your system. What I'd recommend is this: Don't try to patch your existing 2.6.6, but instead, grab yourself a Python 2.7 as a secondary. See if you can simply install a package named python2.7 (apt-get install python2.7, or yum install python2.7), or if that fails, grab the source code (either the 2.7.8 release or the latest from the 2.7 branch in Mercurial) and compile it. Either way, it'd be an *alternate* Python; when you simply run "python", you'll continue to run the unpatched 2.6.6, but if you explicitly run "python2.7", you'll get the newer version. That way, you can't break anything that, wittingly or unwittingly, depends on the behaviour of 2.6; but if you want the patch, you can easily call it up. And then, of course, test. Test test test. But you knew that part already. :) ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: How to apply python patch for issue9729 Chris Angelico <rosuav@gmail.com> - 2015-02-24 11:12 +1100 Re: How to apply python patch for issue9729 Grant Edwards <invalid@invalid.invalid> - 2015-02-24 17:49 +0000
csiph-web