From 9b0d5796c1e48a3bf294971dc129499876936a36 Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Fri, 14 May 2021 21:40:16 -0500 Subject: [PATCH] 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. --- send2trash/plat_osx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/send2trash/plat_osx.py b/send2trash/plat_osx.py index ae3ffc3..9ef4d6c 100644 --- a/send2trash/plat_osx.py +++ b/send2trash/plat_osx.py @@ -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: