classification
Title: Python library should be installed writable
Type: Stage: resolved
Components: Build Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: inada.naoki, jdemeyer, ned.deily
Priority: normal Keywords: patch

Created on 2018-07-27 07:48 by jdemeyer, last changed 2018-12-09 07:50 by ned.deily. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8492 merged jdemeyer, 2018-07-27 07:54
Messages (7)
msg322469 - (view) Author: Jeroen Demeyer (jdemeyer) * Date: 2018-07-27 07:48
In Makefile.pre.in, there is this:

# Shared libraries must be installed with executable mode on some systems;
# rather than figuring out exactly which, we always give them executable mode.
# Also, making them read-only seems to be a good idea...
INSTALL_SHARED= ${INSTALL} -m 555

Installing libraries read-only is very non-standard (I'm not aware of any other build system which does that). Python should just use the more standard 755 install mode.
msg322475 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2018-07-27 09:18
Isn't it useful to avoid accidental change while open files with editor for just reading?

Is there any real world problem about read-only library?
msg322476 - (view) Author: Jeroen Demeyer (jdemeyer) * Date: 2018-07-27 09:25
> Isn't it useful to avoid accidental change while open files with editor for just reading?

Why would that argument apply to a binary file (and only to binary files)?

> Is there any real world problem about read-only library?

It makes it slightly harder to remove a Python installation. Depending on the OS, you'll get a failure or require some additional confirmation.

Furthermore, it's very non-standard. Even if that's not a problem by itself, Python should just install things in the standard way.
msg322478 - (view) Author: Jeroen Demeyer (jdemeyer) * Date: 2018-07-27 09:28
Also, some tools may want to edit the library after installation. Rebasing on Cygwin is an example of that.
msg322486 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2018-07-27 10:47
On Fri, Jul 27, 2018 at 6:25 PM Jeroen Demeyer <report@bugs.python.org> wrote:
> > Isn't it useful to avoid accidental change while open files with editor for just reading?
>
> Why would that argument apply to a binary file (and only to binary files)?

I didn't notice it's used only for binary libraries.

> > Is there any real world problem about read-only library?
>
> It makes it slightly harder to remove a Python installation. Depending on the OS, you'll get a failure or require some additional confirmation.

Make sense.

> Furthermore, it's very non-standard. Even if that's not a problem by itself, Python should just install things in the standard way.

It's not true if there are some merits and there are no real problem.
msg331412 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-12-09 07:46
New changeset 25648d05ac3d74c436f951579bbb716372fb8cc7 by Ned Deily (jdemeyer) in branch 'master':
bpo-34245: install Python shared library with more standard 0755 mode (GH-8492)
https://github.com/python/cpython/commit/25648d05ac3d74c436f951579bbb716372fb8cc7
msg331413 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-12-09 07:50
Thanks for the PR. I've merged it for release in 3.8.0.  As I commented on the PR, I don't think we should backport this; the current behavior has been around for many years and was working as designed so it's not really a bug.
History
Date User Action Args
2018-12-09 07:50:24ned.deilysetstatus: open -> closed
versions: - Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7
messages: + msg331413

resolution: fixed
stage: patch review -> resolved
2018-12-09 07:46:53ned.deilysetnosy: + ned.deily
messages: + msg331412
2018-07-27 10:47:35inada.naokisetmessages: + msg322486
2018-07-27 09:28:36jdemeyersetmessages: + msg322478
2018-07-27 09:25:46jdemeyersetmessages: + msg322476
2018-07-27 09:18:14inada.naokisetnosy: + inada.naoki
messages: + msg322475
2018-07-27 07:54:31jdemeyersetkeywords: + patch
stage: patch review
pull_requests: + pull_request8012
2018-07-27 07:48:30jdemeyercreate