Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python library should be installed writable #78426

Closed
jdemeyer opened this issue Jul 27, 2018 · 7 comments
Closed

Python library should be installed writable #78426

jdemeyer opened this issue Jul 27, 2018 · 7 comments
Labels
3.8 only security fixes build The build process and cross-build

Comments

@jdemeyer
Copy link
Contributor

BPO 34245
Nosy @ned-deily, @methane, @jdemeyer
PRs
  • bpo-34245: install Python libraries with more standard 0755 mode #8492
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-12-09.07:50:24.650>
    created_at = <Date 2018-07-27.07:48:30.376>
    labels = ['build', '3.8']
    title = 'Python library should be installed writable'
    updated_at = <Date 2018-12-09.07:50:24.648>
    user = 'https://github.com/jdemeyer'

    bugs.python.org fields:

    activity = <Date 2018-12-09.07:50:24.648>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-12-09.07:50:24.650>
    closer = 'ned.deily'
    components = ['Build']
    creation = <Date 2018-07-27.07:48:30.376>
    creator = 'jdemeyer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34245
    keywords = ['patch']
    message_count = 7.0
    messages = ['322469', '322475', '322476', '322478', '322486', '331412', '331413']
    nosy_count = 3.0
    nosy_names = ['ned.deily', 'methane', 'jdemeyer']
    pr_nums = ['8492']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34245'
    versions = ['Python 3.8']

    @jdemeyer
    Copy link
    Contributor Author

    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.

    @jdemeyer jdemeyer added 3.7 (EOL) end of life 3.8 only security fixes build The build process and cross-build labels Jul 27, 2018
    @methane
    Copy link
    Member

    methane commented Jul 27, 2018

    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?

    @jdemeyer
    Copy link
    Contributor Author

    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.

    @jdemeyer
    Copy link
    Contributor Author

    Also, some tools may want to edit the library after installation. Rebasing on Cygwin is an example of that.

    @methane
    Copy link
    Member

    methane commented Jul 27, 2018

    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.

    @ned-deily
    Copy link
    Member

    New changeset 25648d0 by Ned Deily (jdemeyer) in branch 'master':
    bpo-34245: install Python shared library with more standard 0755 mode (GH-8492)
    25648d0

    @ned-deily
    Copy link
    Member

    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.

    @ned-deily ned-deily removed the 3.7 (EOL) end of life label Dec 9, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants