鏡像自
https://github.com/arsenetar/send2trash.git
synced 2025-09-11 18:08:16 +00:00
Change conditional for macos pyobjc usage
macOS 11.x will occasionally identify as 10.16, since there was no real reason to prevent on all supported platforms allow.
This commit is contained in:
父節點
c8bcaea1e8
當前提交
9b0d5796c1
@ -7,9 +7,9 @@
|
||||
from platform import mac_ver
|
||||
from sys import version_info
|
||||
|
||||
# If macOS is 11.0 or newer try to use the pyobjc version to get around #51
|
||||
# NOTE: pyobjc only supports python >= 3.6
|
||||
if version_info >= (3, 6) and int(mac_ver()[0].split(".", 1)[0]) >= 11:
|
||||
# NOTE: version of pyobjc only supports python >= 3.6 and 10.9+
|
||||
macos_ver = tuple(int(part) for part in mac_ver()[0].split("."))
|
||||
if version_info >= (3, 6) and macos_ver >= (10, 9):
|
||||
try:
|
||||
from .plat_osx_pyobjc import send2trash
|
||||
except ImportError:
|
||||
|
||||
載入中…
x
新增問題並參考
Block a user