We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73f27cb commit eab42e4Copy full SHA for eab42e4
conftest.py
@@ -1,5 +1,4 @@
1
-import sys
2
-import platform
+import ctypes
3
4
collect_ignore = ["hook-keyring.backend.py"]
5
@@ -12,16 +11,11 @@ def macos_api_ignore():
12
11
Ref #525.
13
"""
14
15
- def make_ver(string):
16
- return tuple(map(int, string.split('.')))
17
-
18
- release, _, _ = platform.mac_ver()
19
20
- return (
21
- platform.system() != 'Darwin'
22
- or make_ver(release) > (11,)
23
- and sys.version_info < (3, 8, 7)
24
- )
+ try:
+ ctypes.CDLL(ctypes.util.find_library('Security')).SecItemAdd
+ return False
+ except Exception:
+ return True
25
26
27
collect_ignore.extend(['keyring/backends/macOS/api.py'] * macos_api_ignore())
0 commit comments