Issue 4602: 2to3 drops executable bit with --write (original) (raw)

Created on 2008-12-08 21:42 by dato, last changed 2022-04-11 14:56 by admin. 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
2022-04-11 14:56:42 admin set github: 48852
2008-12-23 19:12:33 benjamin.peterson set messages: +
2008-12-23 18:14:39 dato set messages: +
2008-12-11 13:06:33 benjamin.peterson set messages: +
2008-12-11 13:03:25 dato set messages: +
2008-12-11 13:00:27 benjamin.peterson set messages: +
2008-12-11 10:52:41 dato set messages: +
2008-12-09 01:58:35 benjamin.peterson set status: open -> closedresolution: fixedmessages: + nosy: + benjamin.peterson
2008-12-08 22:06:52 dato set type: behavior
2008-12-08 21:42:10 dato create