Navigation Menu

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

SystemError via chmod(symlink, ..., follow_symlinks=False) #76458

Closed
asottile mannequin opened this issue Dec 11, 2017 · 6 comments
Closed

SystemError via chmod(symlink, ..., follow_symlinks=False) #76458

asottile mannequin opened this issue Dec 11, 2017 · 6 comments
Labels
3.7 (EOL) end of life extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented Dec 11, 2017

BPO 32277
Nosy @serhiy-storchaka, @asottile
PRs
  • bpo-32277: fix exception raised from chmod(..., follow_symlinks=False) #4797
  • [3.6] bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797) #4869
  • 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 2017-12-14.17:31:17.099>
    created_at = <Date 2017-12-11.17:45:53.458>
    labels = ['extension-modules', 'type-bug', '3.7']
    title = 'SystemError via chmod(symlink, ..., follow_symlinks=False)'
    updated_at = <Date 2017-12-14.17:31:17.099>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2017-12-14.17:31:17.099>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-12-14.17:31:17.099>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2017-12-11.17:45:53.458>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32277
    keywords = ['patch']
    message_count = 6.0
    messages = ['308062', '308070', '308072', '308319', '308320', '308324']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'Anthony Sottile']
    pr_nums = ['4797', '4869']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32277'
    versions = ['Python 3.6', 'Python 3.7']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Dec 11, 2017

    While investigating https://bugs.python.org/issue31940 I noticed the following is raised as SystemError instead of the expected NotImplementedError

    (note: you need a platform with fchmodat but does not support nofollow)

    touch foo
    ln -s foo bar
    python3.6 -c 'import os; os.chmod("bar", 0o666, follow_symlinks=False)
    

    Expected: raised NotImplementedError
    Actual: raised SystemError

    @asottile asottile mannequin added 3.8 only security fixes 3.7 (EOL) end of life labels Dec 11, 2017
    @serhiy-storchaka
    Copy link
    Member

    Does any existing test failed on such platform?

    @serhiy-storchaka serhiy-storchaka added extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error and removed 3.8 only security fixes labels Dec 11, 2017
    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Dec 11, 2017

    I noticed it when I changed the test preconditions in #4783

    I tried changing a test to trigger this (in this branch) but I found I was just implementing exactly the test in the skip condition which to me didn't feel like a very valuable test.

    From what I can tell, the current testsuite passes on my machine before and after this change -- only with the small reproduction.

    @serhiy-storchaka
    Copy link
    Member

    New changeset 233ef24 by Serhiy Storchaka (Anthony Sottile) in branch 'master':
    bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (bpo-4797)
    233ef24

    @serhiy-storchaka
    Copy link
    Member

    I was going to request a test, but the fix is obvious and writing a test for this case can be not easy. Thank you Anthony for your report and patch.

    @serhiy-storchaka
    Copy link
    Member

    New changeset d1cb106 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
    bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) (GH-4797) (bpo-4869)
    d1cb106

    @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.7 (EOL) end of life extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant