pyobjc-framework-AddressBook 12.2.1__tar.gz → 13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/AddressBook/_metadata.py +22 -10
  2. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/pyobjc_framework_AddressBook.egg-info/PKG-INFO +5 -5
  3. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/pyobjc_framework_AddressBook.egg-info/SOURCES.txt +2 -2
  4. pyobjc_framework_addressbook-13.0/Lib/pyobjc_framework_AddressBook.egg-info/pyobjc-build-info.txt +3 -0
  5. pyobjc_framework_addressbook-13.0/Lib/pyobjc_framework_AddressBook.egg-info/requires.txt +2 -0
  6. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Modules/_AddressBook.m +10 -2
  7. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Modules/_AddressBook_protocols.m +10 -5
  8. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Modules/pyobjc-api.h +18 -4
  9. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Modules/pyobjc-compat.h +0 -18
  10. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PKG-INFO +5 -5
  11. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abactions.py +2 -1
  12. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abaddressbook.py +12 -18
  13. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abaddressbookc.py +3 -3
  14. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abglobals.py +51 -63
  15. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abgroup.py +1 -1
  16. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abimageloading.py +4 -4
  17. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abmultivalue.py +1 -1
  18. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abpeoplepickerc.py +3 -3
  19. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abpeoplepickerview.py +2 -2
  20. pyobjc_framework_addressbook-13.0/PyObjCTest/test_abpersonpickerdelegate.py +7 -0
  21. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abpersonpickler.py +2 -3
  22. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abpersonview.py +3 -5
  23. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abrecord.py +5 -7
  24. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_absearchelement.py +1 -1
  25. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_abtypedefs.py +1 -1
  26. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/test_addressbook.py +3 -3
  27. pyobjc_framework_addressbook-13.0/metadata/AddressBook.fwinfo +500 -0
  28. pyobjc_framework_addressbook-12.2.1/metadata/raw/arm64-26.5.fwinfo → pyobjc_framework_addressbook-13.0/metadata/raw/arm64-27.fwinfo +2 -3
  29. pyobjc_framework_addressbook-12.2.1/metadata/raw/x86_64-26.5.fwinfo → pyobjc_framework_addressbook-13.0/metadata/raw/x86_64-27.fwinfo +2 -3
  30. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/pyobjc_setup.py +7 -7
  31. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/setup.py +1 -1
  32. pyobjc_framework_addressbook-12.2.1/Lib/pyobjc_framework_AddressBook.egg-info/pyobjc-build-info.txt +0 -3
  33. pyobjc_framework_addressbook-12.2.1/Lib/pyobjc_framework_AddressBook.egg-info/requires.txt +0 -2
  34. pyobjc_framework_addressbook-12.2.1/PyObjCTest/test_abpersonpickerdelegate.py +0 -8
  35. pyobjc_framework_addressbook-12.2.1/metadata/AddressBook.fwinfo +0 -1413
  36. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Plugins/Python Address Label/plugin.py +0 -0
  37. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Plugins/Python Address Label/readme.txt +0 -0
  38. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Plugins/Python Address Label/setup.py +0 -0
  39. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Plugins/Python Address Label/summary.txt +0 -0
  40. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Scripts/exportBook.py +0 -0
  41. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Examples/Scripts/meInC.py +0 -0
  42. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/LICENSE.txt +0 -0
  43. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/AddressBook/__init__.py +0 -0
  44. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/pyobjc_framework_AddressBook.egg-info/dependency_links.txt +0 -0
  45. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/pyobjc_framework_AddressBook.egg-info/not-zip-safe +0 -0
  46. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/Lib/pyobjc_framework_AddressBook.egg-info/top_level.txt +0 -0
  47. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/MANIFEST.in +0 -0
  48. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/PyObjCTest/__init__.py +0 -0
  49. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/README.txt +0 -0
  50. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/metadata/metadata.ini +0 -0
  51. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/pyproject.toml +0 -0
  52. {pyobjc_framework_addressbook-12.2.1 → pyobjc_framework_addressbook-13.0}/setup.cfg +0 -0
@@ -1,7 +1,5 @@
1
1
  # This file is generated by objective.metadata
2
2
  #
3
- # Last update: Tue May 26 19:34:51 2026
4
- #
5
3
  # flake8: noqa
6
4
 
7
5
  import objc, sys
@@ -119,7 +117,7 @@ functions = {
119
117
  {"retval": {"already_cfretained": True}},
120
118
  ),
121
119
  "ABMultiValueAdd": (
122
- b"B^{__ABMultiValue=}@^{__CFString=}^^{__CFString}",
120
+ b"B^{__ABMultiValue=}@^{__CFString=}^^{__CFString=}",
123
121
  "",
124
122
  {"arguments": {3: {"type_modifier": "o"}}},
125
123
  ),
@@ -191,7 +189,7 @@ functions = {
191
189
  {"retval": {"already_cfretained": True}},
192
190
  ),
193
191
  "ABRecordSetValue": (b"B@^{__CFString=}@",),
194
- "ABPickerGetDelegate": (b"^{OpaqueHIObjectRef=}^{OpaqueABPicker=}",),
192
+ "ABPickerGetDelegate": (b"^{OpaqueEventTargetRef=}^{OpaqueABPicker=}",),
195
193
  "ABPersonCreate": (b"^{__ABPerson=}", "", {"retval": {"already_cfretained": True}}),
196
194
  "ABCopyArrayOfAllPeople": (
197
195
  b"^{__CFArray=}^{__ABAddressBookRef=}",
@@ -244,7 +242,7 @@ functions = {
244
242
  ),
245
243
  "ABTypeOfProperty": (b"q^{__ABAddressBookRef=}^{__CFString=}^{__CFString=}",),
246
244
  "ABMultiValueInsert": (
247
- b"B^{__ABMultiValue=}@^{__CFString=}q^^{__CFString}",
245
+ b"B^{__ABMultiValue=}@^{__CFString=}q^^{__CFString=}",
248
246
  "",
249
247
  {"arguments": {4: {"type_modifier": "o"}}},
250
248
  ),
@@ -260,6 +258,16 @@ functions = {
260
258
  b"q^{__ABPerson=}^?^v",
261
259
  "",
262
260
  {
261
+ 1: {
262
+ "callable": {
263
+ "retval": {"type": "v"},
264
+ "arguments": {
265
+ 0: {"type": "^{__CFData=}"},
266
+ 1: {"type": "q"},
267
+ 2: {"type": "^v"},
268
+ },
269
+ }
270
+ },
263
271
  "arguments": {
264
272
  1: {
265
273
  "callable": {
@@ -271,7 +279,7 @@ functions = {
271
279
  },
272
280
  }
273
281
  }
274
- }
282
+ },
275
283
  },
276
284
  ),
277
285
  "ABGetSharedAddressBook": (b"^{__ABAddressBookRef=}",),
@@ -351,20 +359,20 @@ try:
351
359
  r(
352
360
  b"ABAddressBook",
353
361
  b"addRecord:error:",
354
- {"retval": {"type": "Z"}, "arguments": {3: {"type_modifier": b"o"}}},
362
+ {"retval": {"type": b"Z"}, "arguments": {3: {"type_modifier": b"o"}}},
355
363
  )
356
364
  r(b"ABAddressBook", b"hasUnsavedChanges", {"retval": {"type": "Z"}})
357
365
  r(b"ABAddressBook", b"removeRecord:", {"retval": {"type": "Z"}})
358
366
  r(
359
367
  b"ABAddressBook",
360
368
  b"removeRecord:error:",
361
- {"retval": {"type": "Z"}, "arguments": {3: {"type_modifier": b"o"}}},
369
+ {"retval": {"type": b"Z"}, "arguments": {3: {"type_modifier": b"o"}}},
362
370
  )
363
371
  r(b"ABAddressBook", b"save", {"retval": {"type": "Z"}})
364
372
  r(
365
373
  b"ABAddressBook",
366
374
  b"saveAndReturnError:",
367
- {"retval": {"type": "Z"}, "arguments": {2: {"type_modifier": b"o"}}},
375
+ {"retval": {"type": b"Z"}, "arguments": {2: {"type_modifier": b"o"}}},
368
376
  )
369
377
  r(b"ABGroup", b"addMember:", {"retval": {"type": "Z"}})
370
378
  r(b"ABGroup", b"addSubgroup:", {"retval": {"type": "Z"}})
@@ -439,7 +447,7 @@ try:
439
447
  r(
440
448
  b"ABRecord",
441
449
  b"setValue:forProperty:error:",
442
- {"retval": {"type": "Z"}, "arguments": {4: {"type_modifier": b"o"}}},
450
+ {"retval": {"type": b"Z"}, "arguments": {4: {"type_modifier": b"o"}}},
443
451
  )
444
452
  r(b"ABSearchElement", b"matchesRecord:", {"retval": {"type": "Z"}})
445
453
  r(b"NSObject", b"actionProperty", {"retval": {"type": b"@"}})
@@ -494,5 +502,9 @@ protocols = {
494
502
  )
495
503
  }
496
504
  expressions = {}
505
+ formal_protocols = {
506
+ "ABImageClient": "ABImageClient",
507
+ "ABPersonPickerDelegate": "ABPersonPickerDelegate",
508
+ }
497
509
 
498
510
  # END OF FILE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobjc-framework-AddressBook
3
- Version: 12.2.1
3
+ Version: 13.0
4
4
  Summary: Wrappers for the framework AddressBook on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,22 +17,22 @@ Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Programming Language :: Python :: 3.14
25
24
  Classifier: Programming Language :: Python :: 3.15
25
+ Classifier: Programming Language :: Python :: 3.16
26
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.10
31
+ Requires-Python: >=3.11
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
33
  License-File: LICENSE.txt
34
- Requires-Dist: pyobjc-core>=12.2.1
35
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.1
34
+ Requires-Dist: pyobjc-core>=13.0
35
+ Requires-Dist: pyobjc-framework-Cocoa>=13.0
36
36
  Dynamic: author
37
37
  Dynamic: author-email
38
38
  Dynamic: classifier
@@ -42,5 +42,5 @@ PyObjCTest/test_abtypedefs.py
42
42
  PyObjCTest/test_addressbook.py
43
43
  metadata/AddressBook.fwinfo
44
44
  metadata/metadata.ini
45
- metadata/raw/arm64-26.5.fwinfo
46
- metadata/raw/x86_64-26.5.fwinfo
45
+ metadata/raw/arm64-27.fwinfo
46
+ metadata/raw/x86_64-27.fwinfo
@@ -0,0 +1,3 @@
1
+ macOS 27.2 (26B123)
2
+ Apple clang version 21.0.0 (clang-2100.4.1.1)
3
+ SDK: macOS 27.2
@@ -0,0 +1,2 @@
1
+ pyobjc-core>=13.0
2
+ pyobjc-framework-Cocoa>=13.0
@@ -2,6 +2,10 @@
2
2
  #include "Python.h"
3
3
  #include "pyobjc-api.h"
4
4
 
5
+ #ifdef USE_STATIC_ANALYZER
6
+ #include "../../pyobjc-core/Modules/objc/python-api-used.h"
7
+ #endif
8
+
5
9
  #import <AddressBook/AddressBook.h>
6
10
  #import <Foundation/Foundation.h>
7
11
 
@@ -10,6 +14,8 @@
10
14
  */
11
15
  #include "_AddressBook_protocols.m"
12
16
 
17
+ NS_ASSUME_NONNULL_BEGIN
18
+
13
19
  static PyMethodDef mod_methods[] = {
14
20
  {0, 0, 0, 0} /* sentinel */
15
21
  };
@@ -55,10 +61,12 @@ static struct PyModuleDef mod_module = {
55
61
  .m_free = NULL,
56
62
  };
57
63
 
58
- PyObject* PyInit__AddressBook(void);
64
+ PyObject* _Nullable PyInit__AddressBook(void);
59
65
 
60
- PyObject* __attribute__((__visibility__("default")))
66
+ PyObject* _Nullable __attribute__((__visibility__("default")))
61
67
  PyInit__AddressBook(void)
62
68
  {
63
69
  return PyModuleDef_Init(&mod_module);
64
70
  }
71
+
72
+ NS_ASSUME_NONNULL_END
@@ -1,10 +1,11 @@
1
- /*
2
- * This file is generated by objective.metadata
3
- *
4
- * Last update: Wed Jan 16 13:10:52 2013
5
- */
1
+ // LCOV_EXCL_START
2
+ // This function is only present to ensure protocols are
3
+ // available at runtime.
4
+
6
5
  #import <AddressBook/ABPersonPickerDelegate.h>
7
6
 
7
+ NS_ASSUME_NONNULL_BEGIN
8
+
8
9
  static void __attribute__((__used__))
9
10
  use_protocols(void)
10
11
  {
@@ -14,3 +15,7 @@ use_protocols(void)
14
15
  p = PyObjC_IdToPython(@protocol(ABPersonPickerDelegate));
15
16
  Py_XDECREF(p);
16
17
  }
18
+
19
+ NS_ASSUME_NONNULL_END
20
+
21
+ // LCOV_EXCL_STOP
@@ -60,6 +60,11 @@ typedef int(RegisterMethodMappingFunctionType)(
60
60
  PyObject* _Nonnull const* _Nonnull, size_t),
61
61
  IMP _Nullable (*_Nonnull)(PyObject* _Nonnull, PyObject* _Nonnull));
62
62
 
63
+ #ifndef PyObjC_FUNCTION_CALL_H
64
+ typedef PyObject* _Nullable (*PyObjC_FunctionCallFunc)(
65
+ PyObject* meth, PyObject* _Nonnull const* _Nonnull args, size_t nargs);
66
+ #endif
67
+
63
68
  struct pyobjc_api {
64
69
  int api_version; /* API version */
65
70
  size_t struct_len; /* Length of this struct */
@@ -117,6 +122,9 @@ struct pyobjc_api {
117
122
 
118
123
  PyObject* _Nullable (*_Nonnull createopaquepointertype)(const char*, const char*,
119
124
  const char*);
125
+ int (*_Nonnull register_functioncaller)(void*, PyObjC_FunctionCallFunc);
126
+ PyObject* _Nullable (*_Nonnull create_registered_struct)(
127
+ const char*, Py_ssize_t, const char* _Nonnull* _Nullable, Py_ssize_t*);
120
128
  };
121
129
 
122
130
  #ifndef PYOBJC_BUILD
@@ -159,6 +167,8 @@ static struct pyobjc_api* PyObjC_API;
159
167
  #define PyObjC_CheckArgCount (PyObjC_API->checkargcount)
160
168
  #define PyObjC_CheckNoKwnames (PyObjC_API->checknokwnames)
161
169
  #define PyObjCCreateOpaquePointerType (PyObjC_API->createopaquepointertype)
170
+ #define PyObjCRegister_FunctionCaller (PyObjC_API->register_functioncaller)
171
+ #define PyObjC_CreateRegisteredStruct (PyObjC_API->create_registered_struct)
162
172
 
163
173
  typedef void (*PyObjC_Function_Pointer)(void);
164
174
  typedef struct PyObjC_function_map {
@@ -178,21 +188,25 @@ static inline int
178
188
  PyObjC_ImportAPI(PyObject* calling_module)
179
189
  {
180
190
  PyObjC_API = (struct pyobjc_api*)PyCapsule_Import("objc." PYOBJC_API_NAME, 0);
181
- if (PyObjC_API == NULL) {
182
- return -1;
191
+ if (PyObjC_API == NULL) { // LCOV_BR_EXCL_LINE
192
+ return -1; // LCOV_EXCL_LINE
183
193
  }
184
- if (PyObjC_API->api_version != PYOBJC_API_VERSION) {
194
+ if (PyObjC_API->api_version != PYOBJC_API_VERSION) { // LCOV_BR_EXCL_LINE
195
+ // LCOV_EXCL_START
185
196
  PyErr_Format(PyExc_RuntimeError,
186
197
  "Wrong version of PyObjC C API (got %d, expected %d)",
187
198
  (int)PyObjC_API->api_version, (int)PYOBJC_API_VERSION);
188
199
  return -1;
200
+ // LCOV_EXCL_STOP
189
201
  }
190
202
 
191
- if (PyObjC_API->struct_len < PyObjC_EXPECTED_STRUCT_SIZE) {
203
+ if (PyObjC_API->struct_len < PyObjC_EXPECTED_STRUCT_SIZE) { // LCOV_EXCL_LINE
204
+ // LCOV_EXCL_START
192
205
  PyErr_Format(PyExc_RuntimeError,
193
206
  "Wrong struct-size of PyObjC C API (got %d, expected %d)",
194
207
  (int)PyObjC_API->struct_len, (int)sizeof(struct pyobjc_api));
195
208
  return -1;
209
+ // LCOV_EXCL_STOP
196
210
  }
197
211
 
198
212
  /* Current pyobjc implementation doesn't allow deregistering
@@ -167,24 +167,6 @@ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
167
167
  PyGILState_Release(_GILState); \
168
168
  } while (0)
169
169
 
170
- #if PY_VERSION_HEX < 0x030a0000
171
-
172
- static inline PyObject*
173
- Py_NewRef(PyObject* o)
174
- {
175
- Py_INCREF(o);
176
- return o;
177
- }
178
-
179
- static inline PyObject*
180
- Py_XNewRef(PyObject* o)
181
- {
182
- Py_XINCREF(o);
183
- return o;
184
- }
185
-
186
- #endif /* PY_VERSION_HEX < 0x030a0000 */
187
-
188
170
  #if PY_VERSION_HEX < 0x030d0000
189
171
  #define Py_BEGIN_CRITICAL_SECTION(value) \
190
172
  { \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobjc-framework-AddressBook
3
- Version: 12.2.1
3
+ Version: 13.0
4
4
  Summary: Wrappers for the framework AddressBook on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,22 +17,22 @@ Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Programming Language :: Python :: 3.14
25
24
  Classifier: Programming Language :: Python :: 3.15
25
+ Classifier: Programming Language :: Python :: 3.16
26
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.10
31
+ Requires-Python: >=3.11
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
33
  License-File: LICENSE.txt
34
- Requires-Dist: pyobjc-core>=12.2.1
35
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.1
34
+ Requires-Dist: pyobjc-core>=13.0
35
+ Requires-Dist: pyobjc-framework-Cocoa>=13.0
36
36
  Dynamic: author
37
37
  Dynamic: author-email
38
38
  Dynamic: classifier
@@ -8,7 +8,8 @@ class TestABActionHelper(AddressBook.NSObject):
8
8
 
9
9
 
10
10
  class TestABActions(TestCase):
11
- def testMethods(self):
11
+ def test_protocol_methods(self):
12
+ # Informal protocol
12
13
  self.assertResultIsBOOL(
13
14
  TestABActionHelper.shouldEnableActionForPerson_identifier_
14
15
  )
@@ -1,34 +1,28 @@
1
1
  import AddressBook
2
- from PyObjCTools.TestSupport import TestCase, min_os_level
2
+ from PyObjCTools.TestSupport import TestCase
3
3
 
4
4
 
5
5
  class TestABAddressBook(TestCase):
6
- def testMethods(self):
6
+ def test_constants(self):
7
+ self.assertEqual(AddressBook.ABAddRecordsError, 1001)
8
+ self.assertEqual(AddressBook.ABRemoveRecordsError, 1002)
9
+ self.assertEqual(AddressBook.ABPropertyValueValidationError, 1012)
10
+ self.assertEqual(AddressBook.ABPropertyUnsupportedBySourceError, 1013)
11
+ self.assertEqual(AddressBook.ABPropertyReadOnlyError, 1014)
12
+
13
+ self.assertIsInstance(AddressBook.ABAddressBookErrorDomain, str)
14
+ self.assertIsInstance(AddressBook.ABMultiValueIdentifiersErrorKey, str)
15
+
16
+ def test_methods(self):
7
17
  self.assertResultIsBOOL(AddressBook.ABAddressBook.save)
8
18
  self.assertResultIsBOOL(AddressBook.ABAddressBook.hasUnsavedChanges)
9
19
  self.assertResultIsBOOL(AddressBook.ABAddressBook.addRecord_)
10
20
  self.assertResultIsBOOL(AddressBook.ABAddressBook.removeRecord_)
11
21
 
12
- @min_os_level("10.5")
13
- def testMethods10_5(self):
14
22
  self.assertResultIsBOOL(AddressBook.ABAddressBook.saveAndReturnError_)
15
23
  self.assertArgIsOut(AddressBook.ABAddressBook.saveAndReturnError_, 0)
16
24
 
17
- @min_os_level("10.7")
18
- def testMethods10_7(self):
19
25
  self.assertResultIsBOOL(AddressBook.ABAddressBook.addRecord_error_)
20
26
  self.assertArgIsOut(AddressBook.ABAddressBook.addRecord_error_, 1)
21
27
  self.assertResultIsBOOL(AddressBook.ABAddressBook.removeRecord_error_)
22
28
  self.assertArgIsOut(AddressBook.ABAddressBook.removeRecord_error_, 1)
23
-
24
- def testConstants(self):
25
- self.assertEqual(AddressBook.ABAddRecordsError, 1001)
26
- self.assertEqual(AddressBook.ABRemoveRecordsError, 1002)
27
- self.assertEqual(AddressBook.ABPropertyValueValidationError, 1012)
28
- self.assertEqual(AddressBook.ABPropertyUnsupportedBySourceError, 1013)
29
- self.assertEqual(AddressBook.ABPropertyReadOnlyError, 1014)
30
-
31
- @min_os_level("10.7")
32
- def testConstants10_7(self):
33
- self.assertIsInstance(AddressBook.ABAddressBookErrorDomain, str)
34
- self.assertIsInstance(AddressBook.ABMultiValueIdentifiersErrorKey, str)
@@ -8,20 +8,20 @@ _C_ABPersonRef = b"^{__ABPerson=}"
8
8
  _C_ABGroupRef = b"^{__ABGroup=}"
9
9
  _C_ABSearchElementRef = b"^{__ABSearchElementRef=}"
10
10
  _C_CFStringRef = b"^{__CFString=}"
11
- _C_CFStringRefPtr = b"^^{__CFString}"
11
+ _C_CFStringRefPtr = b"^^{__CFString=}"
12
12
  _C_CFDictionaryRef = b"^{__CFDictionary=}"
13
13
  _C_CFArrayRef = b"^{__CFArray=}"
14
14
  _C_CFDataRef = b"^{__CFData=}"
15
15
 
16
16
 
17
17
  class TestABAddressBookC(TestCase):
18
- def testTypes(self):
18
+ def test_types(self):
19
19
  self.assertTrue(AddressBook.ABAddressBookRef is AddressBook.ABAddressBook)
20
20
  self.assertTrue(AddressBook.ABPersonRef is AddressBook.ABPerson)
21
21
  self.assertTrue(AddressBook.ABSearchElementRef is AddressBook.ABSearchElement)
22
22
  self.assertTrue(AddressBook.ABGroupRef is AddressBook.ABGroup)
23
23
 
24
- def testFunctions(self):
24
+ def test_functions(self):
25
25
  ref = AddressBook.ABGetSharedAddressBook()
26
26
  self.assertIsInstance(ref, AddressBook.ABAddressBookRef)
27
27
 
@@ -4,68 +4,7 @@ from PyObjCTools.TestSupport import os_level_key, os_release
4
4
 
5
5
 
6
6
  class TestABGlobals(TestCase):
7
- @min_os_level("10.12")
8
- def testConstants10_12(self):
9
- self.assertIsInstance(AddressBook.kABOrganizationPhoneticProperty, str)
10
-
11
- @min_os_level("10.9")
12
- def testConstants10_9(self):
13
- self.assertIsInstance(AddressBook.kABSocialProfileServiceTencentWeibo, str)
14
-
15
- @min_os_level("10.10")
16
- def testConstants10_10(self):
17
- self.assertIsInstance(AddressBook.kABSocialProfileServiceYelp, str)
18
- self.assertIsInstance(AddressBook.kABAlternateBirthdayComponentsProperty, str)
19
-
20
- @min_os_level("10.8")
21
- def testConstants10_8(self):
22
- self.assertIsInstance(AddressBook.kABSocialProfileServiceSinaWeibo, str)
23
-
24
- @min_os_level("10.7")
25
- def testConstants10_7(self):
26
- self.assertIsInstance(AddressBook.kABMobileMeLabel, str)
27
- self.assertIsInstance(AddressBook.kABBirthdayComponentsProperty, str)
28
- self.assertIsInstance(AddressBook.kABOtherDateComponentsProperty, str)
29
- self.assertIsInstance(AddressBook.kABInstantMessageProperty, str)
30
- self.assertIsInstance(AddressBook.kABInstantMessageUsernameKey, str)
31
- self.assertIsInstance(AddressBook.kABInstantMessageServiceKey, str)
32
- self.assertIsInstance(AddressBook.kABInstantMessageServiceAIM, str)
33
- self.assertIsInstance(AddressBook.kABInstantMessageServiceFacebook, str)
34
- self.assertIsInstance(AddressBook.kABInstantMessageServiceGaduGadu, str)
35
- self.assertIsInstance(AddressBook.kABInstantMessageServiceGoogleTalk, str)
36
- self.assertIsInstance(AddressBook.kABInstantMessageServiceICQ, str)
37
- self.assertIsInstance(AddressBook.kABInstantMessageServiceJabber, str)
38
- self.assertIsInstance(AddressBook.kABInstantMessageServiceMSN, str)
39
- self.assertIsInstance(AddressBook.kABInstantMessageServiceQQ, str)
40
- self.assertIsInstance(AddressBook.kABInstantMessageServiceSkype, str)
41
- self.assertIsInstance(AddressBook.kABInstantMessageServiceYahoo, str)
42
- self.assertIsInstance(AddressBook.kABSocialProfileProperty, str)
43
- self.assertIsInstance(AddressBook.kABSocialProfileURLKey, str)
44
- self.assertIsInstance(AddressBook.kABSocialProfileUsernameKey, str)
45
- self.assertIsInstance(AddressBook.kABSocialProfileUserIdentifierKey, str)
46
- self.assertIsInstance(AddressBook.kABSocialProfileServiceKey, str)
47
- self.assertIsInstance(AddressBook.kABSocialProfileServiceTwitter, str)
48
- self.assertIsInstance(AddressBook.kABSocialProfileServiceFacebook, str)
49
- self.assertIsInstance(AddressBook.kABSocialProfileServiceLinkedIn, str)
50
- self.assertIsInstance(AddressBook.kABSocialProfileServiceFlickr, str)
51
- self.assertIsInstance(AddressBook.kABSocialProfileServiceMySpace, str)
52
-
53
- @min_os_level("10.6")
54
- def testConstants10_6(self):
55
- self.assertIsInstance(AddressBook.kABPhoneiPhoneLabel, str)
56
- self.assertEqual(AddressBook.kABShowAsResource, 2)
57
- self.assertEqual(AddressBook.kABShowAsRoom, 3)
58
-
59
- @min_os_level("10.5")
60
- def testConstants10_5(self):
61
- self.assertIsInstance(AddressBook.kABCalendarURIsProperty, str)
62
-
63
- @expectedFailureIf(os_level_key(os_release()) < os_level_key("10.14"))
64
- def testConstants_10_7_broken(self):
65
- self.assertIsInstance(AddressBook.kABEmailMobileMeLabel, str)
66
- self.assertIsInstance(AddressBook.kABAIMMobileMeLabel, str)
67
-
68
- def testConstants(self):
7
+ def test_constants(self):
69
8
  self.assertEqual(AddressBook.kABShowAsMask, 0o7)
70
9
  self.assertEqual(AddressBook.kABShowAsPerson, 0o0)
71
10
  self.assertEqual(AddressBook.kABShowAsCompany, 0o1)
@@ -156,6 +95,55 @@ class TestABGlobals(TestCase):
156
95
  self.assertIsInstance(AddressBook.kABUpdatedRecords, str)
157
96
  self.assertIsInstance(AddressBook.kABDeletedRecords, str)
158
97
 
159
- def testFunctions(self):
98
+ self.assertIsInstance(AddressBook.kABPhoneiPhoneLabel, str)
99
+ self.assertEqual(AddressBook.kABShowAsResource, 2)
100
+ self.assertEqual(AddressBook.kABShowAsRoom, 3)
101
+
102
+ self.assertIsInstance(AddressBook.kABCalendarURIsProperty, str)
103
+
104
+ self.assertIsInstance(AddressBook.kABMobileMeLabel, str)
105
+ self.assertIsInstance(AddressBook.kABBirthdayComponentsProperty, str)
106
+ self.assertIsInstance(AddressBook.kABOtherDateComponentsProperty, str)
107
+ self.assertIsInstance(AddressBook.kABInstantMessageProperty, str)
108
+ self.assertIsInstance(AddressBook.kABInstantMessageUsernameKey, str)
109
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceKey, str)
110
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceAIM, str)
111
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceFacebook, str)
112
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceGaduGadu, str)
113
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceGoogleTalk, str)
114
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceICQ, str)
115
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceJabber, str)
116
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceMSN, str)
117
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceQQ, str)
118
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceSkype, str)
119
+ self.assertIsInstance(AddressBook.kABInstantMessageServiceYahoo, str)
120
+ self.assertIsInstance(AddressBook.kABSocialProfileProperty, str)
121
+ self.assertIsInstance(AddressBook.kABSocialProfileURLKey, str)
122
+ self.assertIsInstance(AddressBook.kABSocialProfileUsernameKey, str)
123
+ self.assertIsInstance(AddressBook.kABSocialProfileUserIdentifierKey, str)
124
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceKey, str)
125
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceTwitter, str)
126
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceFacebook, str)
127
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceLinkedIn, str)
128
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceFlickr, str)
129
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceMySpace, str)
130
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceSinaWeibo, str)
131
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceTencentWeibo, str)
132
+
133
+ @expectedFailureIf(os_level_key(os_release()) < os_level_key("10.14"))
134
+ def test_constants_broken(self):
135
+ self.assertIsInstance(AddressBook.kABEmailMobileMeLabel, str)
136
+ self.assertIsInstance(AddressBook.kABAIMMobileMeLabel, str)
137
+
138
+ @min_os_level("10.10")
139
+ def test_constants10_10(self):
140
+ self.assertIsInstance(AddressBook.kABSocialProfileServiceYelp, str)
141
+ self.assertIsInstance(AddressBook.kABAlternateBirthdayComponentsProperty, str)
142
+
143
+ @min_os_level("10.12")
144
+ def test_constants10_12(self):
145
+ self.assertIsInstance(AddressBook.kABOrganizationPhoneticProperty, str)
146
+
147
+ def test_functions(self):
160
148
  v = AddressBook.ABLocalizedPropertyOrLabel(AddressBook.kABAssistantLabel)
161
149
  self.assertIsInstance(v, str)
@@ -3,7 +3,7 @@ from PyObjCTools.TestSupport import TestCase
3
3
 
4
4
 
5
5
  class TestABGroup(TestCase):
6
- def testMethods(self):
6
+ def test_methods(self):
7
7
  self.assertResultIsBOOL(AddressBook.ABGroup.addMember_)
8
8
  self.assertResultIsBOOL(AddressBook.ABGroup.removeMember_)
9
9
  self.assertResultIsBOOL(AddressBook.ABGroup.addSubgroup_)
@@ -9,11 +9,11 @@ class TestABImageClientHelper(AddressBook.NSObject):
9
9
 
10
10
 
11
11
  class TestABImageLoading(TestCase):
12
- def test_methods(self):
12
+ def test_protocols(self):
13
+ self.assertProtocolExists("ABImageClient", AddressBook)
14
+
15
+ def test_protocol_methods(self):
13
16
  self.assertResultIsBOOL(AddressBook.ABPerson.setImageData_)
14
17
  self.assertArgHasType(
15
18
  TestABImageClientHelper.consumeImageData_forTag_, 1, objc._C_NSInteger
16
19
  )
17
-
18
- def testProtocols(self):
19
- self.assertProtocolExists("ABImageClient")
@@ -3,7 +3,7 @@ from PyObjCTools.TestSupport import TestCase
3
3
 
4
4
 
5
5
  class TestABMutableMultiValue(TestCase):
6
- def testMethods(self):
6
+ def test_methods(self):
7
7
  self.assertResultIsBOOL(
8
8
  AddressBook.ABMutableMultiValue.removeValueAndLabelAtIndex_
9
9
  )
@@ -4,7 +4,7 @@ from PyObjCTools.TestSupport import TestCase, expectedFailure, fourcc
4
4
 
5
5
 
6
6
  class TestABPeoplePickerC(TestCase):
7
- def testConstants(self):
7
+ def test_constants(self):
8
8
  self.assertEqual(AddressBook.kABPickerSingleValueSelection, 1 << 0)
9
9
  self.assertEqual(AddressBook.kABPickerMultipleValueSelection, 1 << 1)
10
10
  self.assertEqual(AddressBook.kABPickerAllowGroupSelection, 1 << 2)
@@ -18,11 +18,11 @@ class TestABPeoplePickerC(TestCase):
18
18
  self.assertEqual(AddressBook.kEventABPeoplePickerGroupDoubleClicked, 5)
19
19
  self.assertEqual(AddressBook.kEventABPeoplePickerNameDoubleClicked, 6)
20
20
 
21
- def testType(self):
21
+ def test_types(self):
22
22
  self.assertIsInstance(AddressBook.ABPickerRef, objc.objc_class)
23
23
 
24
24
  @expectedFailure
25
- def testFunctions(self):
25
+ def test_functions(self):
26
26
  self.assertResultIsCFRetained(AddressBook.ABPickerCreate)
27
27
 
28
28
  ref = AddressBook.ABPickerCreate()
@@ -3,7 +3,7 @@ from PyObjCTools.TestSupport import TestCase
3
3
 
4
4
 
5
5
  class TestABPeoplePickerView(TestCase):
6
- def testConstants(self):
6
+ def test_constants(self):
7
7
  self.assertEqual(AddressBook.ABNoValueSelection, 0)
8
8
  self.assertEqual(AddressBook.ABSingleValueSelection, 1)
9
9
  self.assertEqual(AddressBook.ABMultipleValueSelection, 2)
@@ -21,7 +21,7 @@ class TestABPeoplePickerView(TestCase):
21
21
  AddressBook.ABPeoplePickerDisplayedPropertyDidChangeNotification, str
22
22
  )
23
23
 
24
- def testMethods(self):
24
+ def test_methods(self):
25
25
  self.assertArgIsBOOL(
26
26
  AddressBook.ABPeoplePickerView.selectGroup_byExtendingSelection_, 1
27
27
  )
@@ -0,0 +1,7 @@
1
+ import AddressBook # noqa: F401
2
+ from PyObjCTools.TestSupport import TestCase
3
+
4
+
5
+ class TestABPersonPickerDelegate(TestCase):
6
+ def test_protocols(self):
7
+ self.assertProtocolExists("ABPersonPickerDelegate", AddressBook)
@@ -1,9 +1,8 @@
1
1
  import AddressBook
2
- from PyObjCTools.TestSupport import TestCase, min_os_level
2
+ from PyObjCTools.TestSupport import TestCase
3
3
 
4
4
 
5
5
  class TestABPersonPicker(TestCase):
6
- @min_os_level("10.9")
7
- def testMethods_10_9(self):
6
+ def test_methods(self):
8
7
  m = AddressBook.ABPersonPicker.showRelativeToRect_ofView_preferredEdge_
9
8
  self.assertArgHasType(m, 0, AddressBook.NSRect.__typestr__)