This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: macOS: os.lchmod() incorrectly removed by 2.7.16
Type: behavior Stage: resolved
Components: macOS Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, keithfkelly, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2019-08-29 19:53 by keithfkelly, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg350822 - (view) Author: Keith F. Kelly (keithfkelly) Date: 2019-08-29 19:53
Apparently the fix for https://bugs.python.org/issue34652 was incorrect, or got incorrectly backported to, the 2.7 tree, because as of 2.7.16, the os.lchmod() built-in API is unexpectedly missing on MacOS, which is breaking our existing code.
msg350826 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-08-29 20:06
lchmod is one of a number of os functions that is not available on older versions of macOS.  Chances are you are using a Python binary (possibly one supplied by a python.org installer) that was built to be used on a range of macOS versions and the oldest version did not support lchmod.  Note that there is a general warning about interface availability in the documentation for the os module:

"An “Availability: Unix” note means that this function is commonly found on Unix systems. It does not make any claims about its existence on a specific operating system."

Either use a version of Python built only for the latest versions of macOS or add a test in your code for the availability of lchown.

https://docs.python.org/2/library/os.html
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82164
2019-08-29 20:06:33ned.deilysetstatus: open -> closed
resolution: not a bug
messages: + msg350826

stage: resolved
2019-08-29 19:55:24zach.waresetnosy: + benjamin.peterson
2019-08-29 19:53:40keithfkellycreate