Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86277 > unrolled thread

Re: How to apply python patch for issue9729

Started byChris Angelico <rosuav@gmail.com>
First post2015-02-24 11:12 +1100
Last post2015-02-24 17:49 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#86277 — Re: How to apply python patch for issue9729

FromChris Angelico <rosuav@gmail.com>
Date2015-02-24 11:12 +1100
SubjectRe: How to apply python patch for issue9729
Message-ID<mailman.19107.1424736730.18130.python-list@python.org>
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

[toc] | [next] | [standalone]


#86338

FromGrant Edwards <invalid@invalid.invalid>
Date2015-02-24 17:49 +0000
Message-ID<mcidjl$6au$1@reader1.panix.com>
In reply to#86277
On 2015-02-24, Chris Angelico <rosuav@gmail.com> wrote:
> 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.

Or worse yet, it applies just fine but doesn't work quite right in
particular cases that you won't run across until later when it's much
more embarassing.

-- 
Grant Edwards               grant.b.edwards        Yow! ... I want to perform
                                  at               cranial activities with
                              gmail.com            Tuesday Weld!!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web