@@ -59,41 +59,24 @@ def get_implementation() -> Type[DesktopNotifierBase]:
5959 :raises RuntimeError: when passing ``macos_legacy = True`` on macOS 12.0 and later.
6060 """
6161 if platform .system () == "Darwin" :
62- from .macos_support import is_bundle , is_signed_bundle , macos_version
62+ from .macos_support import is_signed_bundle , macos_version
6363
6464 has_unusernotificationcenter = macos_version >= Version ("10.14" )
65- has_nsusernotificationcenter = macos_version < Version ("12.0" )
6665 is_signed = is_signed_bundle ()
6766
6867 if has_unusernotificationcenter and is_signed :
6968 # Use modern UNUserNotificationCenter.
7069 from .macos import CocoaNotificationCenter
7170
7271 return CocoaNotificationCenter
73-
74- elif has_nsusernotificationcenter and is_bundle ():
75- if has_unusernotificationcenter and not is_signed :
72+ else :
73+ if has_unusernotificationcenter :
7674 logger .warning (
77- "Running outside of a signed Framework or bundle: "
78- "falling back to NSUserNotificationCenter "
75+ "Notification Center can only be used "
76+ "from a signed Framework or app bundle "
7977 )
8078 else :
81- logger .warning (
82- "Running on macOS 10.13 or earlier: "
83- "falling back to NSUserNotificationCenter"
84- )
85-
86- # Use deprecated NSUserNotificationCenter.
87- from .macos_legacy import CocoaNotificationCenterLegacy
88-
89- return CocoaNotificationCenterLegacy
90-
91- else :
92- # Use dummy backend.
93- logger .warning (
94- "Notification Center can only be used "
95- "from a signed Framework or app bundle"
96- )
79+ logger .warning ("Only macOS 10.14 and later are supported" )
9780
9881 from .dummy import DummyNotificationCenter
9982
0 commit comments