classification
Title: 2to3 drops executable bit with --write
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, dato
Priority: normal Keywords: patch

Created on 2008-12-08 21:42 by dato, last changed 2008-12-23 19:12 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
2to3_preserve_mode.diff dato, 2008-12-08 21:42
Messages (8)
msg77349 - (view) Author: Adeodato Simó (dato) Date: 2008-12-08 21:42
Hello,

after using 2to3 --write over some scripts, I found it very cumbersome
having to run `chmod +x` on each of them afterwards.

The attached patch is a possible way to fix this issue. It'd be great 
if somebody could apply it, or write a more appropriate fix.
msg77383 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-09 01:58
Thanks for the report! Fixed in r67674.
msg77602 - (view) Author: Adeodato Simó (dato) Date: 2008-12-11 10:52
> Thanks for the report! Fixed in r67674.

I'm afraid I'm unfamiliar with Python development procedures: that
commit was committed to /sandox, is that expected?
msg77608 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-11 13:00
On Thu, Dec 11, 2008 at 4:52 AM, Adeodato Simó <report@bugs.python.org> wrote:
>
> Adeodato Simó <dato@net.com.org.es> added the comment:
>
>> Thanks for the report! Fixed in r67674.
>
> I'm afraid I'm unfamiliar with Python development procedures: that
> commit was committed to /sandox, is that expected?

Yes, it will be merged into the trunk eventually.
msg77609 - (view) Author: Adeodato Simó (dato) Date: 2008-12-11 13:03
> Yes, it will be merged into the trunk eventually.

Great, thank you and sorry for the noise. Also, is this fix elegible for
the 3.0 branch?
msg77610 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-11 13:06
On Thu, Dec 11, 2008 at 7:03 AM, Adeodato Simó <report@bugs.python.org> wrote:
>
> Adeodato Simó <dato@net.com.org.es> added the comment:
>
>> Yes, it will be merged into the trunk eventually.
>
> Great, thank you and sorry for the noise. Also, is this fix elegible for
> the 3.0 branch?

Yes, it will find its way into 2.6.2, 3.0.1, and 3.1.
msg78244 - (view) Author: Adeodato Simó (dato) Date: 2008-12-23 18:14
Hello, I see that something akin to my proposed patch was applied, but I
think the order of the arguments to shutil.copymode was reversed in the
process. This function takes (src, dst) as arguments, and we want
permissions to flow backup -> newfile, and not the the other way around.

Thanks already.
msg78248 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-23 19:12
Thanks for pointing that out! Fixed in r67919.
History
Date User Action Args
2008-12-23 19:12:33benjamin.petersonsetmessages: + msg78248
2008-12-23 18:14:39datosetmessages: + msg78244
2008-12-11 13:06:33benjamin.petersonsetmessages: + msg77610
2008-12-11 13:03:25datosetmessages: + msg77609
2008-12-11 13:00:27benjamin.petersonsetmessages: + msg77608
2008-12-11 10:52:41datosetmessages: + msg77602
2008-12-09 01:58:35benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg77383
nosy: + benjamin.peterson
2008-12-08 22:06:52datosettype: behavior
2008-12-08 21:42:10datocreate