pyobjc-framework-libxpc 10.2__tar.gz → 11.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 (38) hide show
  1. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/pyobjc_framework_libxpc.egg-info/PKG-INFO +5 -5
  2. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/pyobjc_framework_libxpc.egg-info/SOURCES.txt +5 -2
  3. pyobjc_framework_libxpc-11.0/Lib/pyobjc_framework_libxpc.egg-info/pyobjc-build-info.txt +3 -0
  4. pyobjc_framework_libxpc-11.0/Lib/pyobjc_framework_libxpc.egg-info/requires.txt +2 -0
  5. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/xpc/_metadata.py +81 -6
  6. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Modules/_xpc.m +82 -45
  7. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Modules/pyobjc-api.h +1 -1
  8. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Modules/pyobjc-compat.h +80 -5
  9. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PKG-INFO +5 -5
  10. pyobjc_framework_libxpc-11.0/metadata/raw/arm64-14.5.fwinfo +2605 -0
  11. pyobjc_framework_libxpc-11.0/metadata/raw/arm64-15.0.fwinfo +2605 -0
  12. pyobjc_framework_libxpc-11.0/metadata/raw/x86_64-14.5.fwinfo +2605 -0
  13. pyobjc_framework_libxpc-11.0/metadata/raw/x86_64-15.0.fwinfo +2605 -0
  14. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/metadata/xpc.fwinfo +63 -0
  15. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/pyobjc_setup.py +121 -27
  16. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/setup.py +2 -7
  17. pyobjc-framework-libxpc-10.2/Lib/pyobjc_framework_libxpc.egg-info/requires.txt +0 -2
  18. pyobjc-framework-libxpc-10.2/metadata/raw/arm64-14.0.fwinfo +0 -28
  19. pyobjc-framework-libxpc-10.2/metadata/raw/x86_64-14.0.fwinfo +0 -28
  20. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/pyobjc_framework_libxpc.egg-info/dependency_links.txt +0 -0
  21. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/pyobjc_framework_libxpc.egg-info/not-zip-safe +0 -0
  22. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/pyobjc_framework_libxpc.egg-info/top_level.txt +0 -0
  23. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/Lib/xpc/__init__.py +0 -0
  24. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/License.txt +0 -0
  25. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/MANIFEST.in +0 -0
  26. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/__init__.py +0 -0
  27. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_activity.py +0 -0
  28. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_connection.py +0 -0
  29. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_debug.py +0 -0
  30. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_endpoint.py +0 -0
  31. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_rich_error.py +0 -0
  32. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_session.py +0 -0
  33. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/PyObjCTest/test_xpc.py +0 -0
  34. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/metadata/metadata.ini +0 -0
  35. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/metadata/raw/arm64-13.1.fwinfo +0 -0
  36. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/metadata/raw/x86_64-13.1.fwinfo +0 -0
  37. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/pyproject.toml +0 -0
  38. {pyobjc-framework-libxpc-10.2 → pyobjc_framework_libxpc-11.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-libxpc
3
- Version: 10.2
3
+ Version: 11.0
4
4
  Summary: Wrappers for xpc on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
18
18
  Classifier: Programming Language :: Python
19
19
  Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
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.8
31
+ Requires-Python: >=3.9
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=10.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.2
33
+ Requires-Dist: pyobjc-core>=11.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=11.0
35
35
  Project-URL: Documentation, https://pyobjc.readthedocs.io/en/latest/
36
36
  Project-URL: Issue tracker, https://github.com/ronaldoussoren/pyobjc/issues
37
37
  Project-URL: Repository, https://github.com/ronaldoussoren/pyobjc
@@ -7,6 +7,7 @@ Lib/pyobjc_framework_libxpc.egg-info/PKG-INFO
7
7
  Lib/pyobjc_framework_libxpc.egg-info/SOURCES.txt
8
8
  Lib/pyobjc_framework_libxpc.egg-info/dependency_links.txt
9
9
  Lib/pyobjc_framework_libxpc.egg-info/not-zip-safe
10
+ Lib/pyobjc_framework_libxpc.egg-info/pyobjc-build-info.txt
10
11
  Lib/pyobjc_framework_libxpc.egg-info/requires.txt
11
12
  Lib/pyobjc_framework_libxpc.egg-info/top_level.txt
12
13
  Lib/xpc/__init__.py
@@ -25,6 +26,8 @@ PyObjCTest/test_xpc.py
25
26
  metadata/metadata.ini
26
27
  metadata/xpc.fwinfo
27
28
  metadata/raw/arm64-13.1.fwinfo
28
- metadata/raw/arm64-14.0.fwinfo
29
+ metadata/raw/arm64-14.5.fwinfo
30
+ metadata/raw/arm64-15.0.fwinfo
29
31
  metadata/raw/x86_64-13.1.fwinfo
30
- metadata/raw/x86_64-14.0.fwinfo
32
+ metadata/raw/x86_64-14.5.fwinfo
33
+ metadata/raw/x86_64-15.0.fwinfo
@@ -0,0 +1,3 @@
1
+ macOS 15.3 (24D5040f)
2
+ Apple clang version 16.0.0 (clang-1600.0.26.6)
3
+ SDK: macOS 15.2
@@ -0,0 +1,2 @@
1
+ pyobjc-core>=11.0
2
+ pyobjc-framework-Cocoa>=11.0
@@ -1,6 +1,6 @@
1
1
  # This file is generated by objective.metadata
2
2
  #
3
- # Last update: Sat Jul 1 14:11:47 2023
3
+ # Last update: Fri Nov 15 11:12:37 2024
4
4
  #
5
5
  # flake8: noqa
6
6
 
@@ -31,8 +31,13 @@ else:
31
31
 
32
32
  misc = {}
33
33
  constants = """$$"""
34
- enums = """$IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED@999999$XPC_ACTIVITY_STATE_CHECK_IN@0$XPC_ACTIVITY_STATE_CONTINUE@4$XPC_ACTIVITY_STATE_DEFER@3$XPC_ACTIVITY_STATE_DONE@5$XPC_ACTIVITY_STATE_RUN@2$XPC_ACTIVITY_STATE_WAIT@1$XPC_ARRAY_APPEND@18446744073709551615$XPC_CONNECTION_MACH_SERVICE_LISTENER@1$XPC_CONNECTION_MACH_SERVICE_PRIVILEGED@2$XPC_SESSION_CREATE_INACTIVE@1$XPC_SESSION_CREATE_MACH_PRIVILEGED@2$XPC_SESSION_CREATE_NONE@0$"""
35
- misc.update({})
34
+ enums = """$IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED@999999$XPC_ACTIVITY_STATE_CHECK_IN@0$XPC_ACTIVITY_STATE_CONTINUE@4$XPC_ACTIVITY_STATE_DEFER@3$XPC_ACTIVITY_STATE_DONE@5$XPC_ACTIVITY_STATE_RUN@2$XPC_ACTIVITY_STATE_WAIT@1$XPC_ARRAY_APPEND@18446744073709551615$XPC_CONNECTION_MACH_SERVICE_LISTENER@1$XPC_CONNECTION_MACH_SERVICE_PRIVILEGED@2$XPC_LISTENER_CREATE_FORCE_MACH@2$XPC_LISTENER_CREATE_FORCE_XPCSERVICE@4$XPC_LISTENER_CREATE_INACTIVE@1$XPC_LISTENER_CREATE_NONE@0$XPC_SESSION_CREATE_INACTIVE@1$XPC_SESSION_CREATE_MACH_PRIVILEGED@2$XPC_SESSION_CREATE_NONE@0$"""
35
+ misc.update(
36
+ {
37
+ "xpc_session_create_flags_t": NewType("xpc_session_create_flags_t", int),
38
+ "xpc_listener_create_flags_t": NewType("xpc_listener_create_flags_t", int),
39
+ }
40
+ )
36
41
  misc.update(
37
42
  {
38
43
  "xpc_session_create_flags_t": NewType("xpc_session_create_flags_t", int),
@@ -101,6 +106,11 @@ functions = {
101
106
  "",
102
107
  {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
103
108
  ),
109
+ "xpc_dictionary_copy_mach_send": (
110
+ b"I@^t",
111
+ "",
112
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
113
+ ),
104
114
  "xpc_array_set_string": (
105
115
  b"v@Q^t",
106
116
  "",
@@ -145,6 +155,7 @@ functions = {
145
155
  {"arguments": {2: {"c_array_length_in_arg": 3, "type_modifier": "n"}}},
146
156
  ),
147
157
  "xpc_array_set_date": (b"v@Qq",),
158
+ "xpc_session_set_target_queue": (b"v@@",),
148
159
  "xpc_dictionary_get_uint64": (
149
160
  b"Q@^t",
150
161
  "",
@@ -197,6 +208,22 @@ functions = {
197
208
  }
198
209
  },
199
210
  ),
211
+ "xpc_connection_copy_invalidation_reason": (
212
+ b"^t@",
213
+ "",
214
+ {"retval": {"c_array_delimited_by_null": True}},
215
+ ),
216
+ "xpc_listener_cancel": (b"v@",),
217
+ "xpc_listener_create": (
218
+ b"@^t@Q@?^@",
219
+ "",
220
+ {
221
+ "arguments": {
222
+ 0: {"c_array_delimited_by_null": True, "type_modifier": "n"},
223
+ 4: {"type_modifier": "o"},
224
+ }
225
+ },
226
+ ),
200
227
  "xpc_date_create": (b"@q", "", {"retval": {"already_retained": True}}),
201
228
  "xpc_array_set_double": (b"v@Qd",),
202
229
  "xpc_session_send_message_with_reply_sync": (
@@ -207,7 +234,13 @@ functions = {
207
234
  "arguments": {2: {"type_modifier": "o"}},
208
235
  },
209
236
  ),
237
+ "xpc_listener_activate": (b"B@^@", "", {"arguments": {1: {"type_modifier": "o"}}}),
210
238
  "xpc_uint64_create": (b"@Q", "", {"retval": {"already_retained": True}}),
239
+ "xpc_session_set_peer_code_signing_requirement": (
240
+ b"i@^t",
241
+ "",
242
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
243
+ ),
211
244
  "xpc_connection_set_event_handler": (
212
245
  b"v@@?",
213
246
  "",
@@ -263,6 +296,16 @@ functions = {
263
296
  ),
264
297
  "xpc_int64_get_value": (b"q@",),
265
298
  "xpc_array_get_int64": (b"q@Q",),
299
+ "xpc_dictionary_dup_fd": (
300
+ b"i@^t",
301
+ "",
302
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
303
+ ),
304
+ "xpc_connection_set_peer_team_identity_requirement": (
305
+ b"i@^t",
306
+ "",
307
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
308
+ ),
266
309
  "xpc_rich_error_can_retry": (b"B@",),
267
310
  "xpc_dictionary_set_string": (
268
311
  b"v@^t^t",
@@ -328,6 +371,11 @@ functions = {
328
371
  "",
329
372
  {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
330
373
  ),
374
+ "xpc_listener_copy_description": (
375
+ b"^t@",
376
+ "",
377
+ {"retval": {"c_array_delimited_by_null": True}},
378
+ ),
331
379
  "xpc_data_get_bytes_ptr": (
332
380
  b"^v@",
333
381
  "",
@@ -379,6 +427,11 @@ functions = {
379
427
  ),
380
428
  "xpc_array_get_dictionary": (b"@@Q",),
381
429
  "xpc_connection_send_message_with_reply_sync": (b"@@@",),
430
+ "xpc_connection_set_peer_entitlement_matches_value_requirement": (
431
+ b"i@^t@",
432
+ "",
433
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
434
+ ),
382
435
  "xpc_connection_send_message": (b"v@@",),
383
436
  "xpc_dictionary_set_uint64": (
384
437
  b"v@^tQ",
@@ -397,6 +450,7 @@ functions = {
397
450
  },
398
451
  },
399
452
  ),
453
+ "xpc_connection_set_peer_lightweight_code_requirement": (b"i@@",),
400
454
  "xpc_get_type": (b"^{_xpc_type_s=}@",),
401
455
  "xpc_hash": (b"Q@",),
402
456
  "xpc_dictionary_set_int64": (
@@ -405,7 +459,13 @@ functions = {
405
459
  {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
406
460
  ),
407
461
  "xpc_connection_get_euid": (b"I@",),
462
+ "xpc_dictionary_set_mach_send": (
463
+ b"v@^tI",
464
+ "",
465
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
466
+ ),
408
467
  "xpc_dictionary_create_reply": (b"@@", "", {"retval": {"already_retained": True}}),
468
+ "xpc_array_set_int64": (b"v@Qq",),
409
469
  "xpc_session_set_cancel_handler": (
410
470
  b"v@@?",
411
471
  "",
@@ -428,6 +488,11 @@ functions = {
428
488
  "arguments": {0: {"c_array_of_fixed_length": 16, "type_modifier": "n"}},
429
489
  },
430
490
  ),
491
+ "xpc_listener_reject_peer": (
492
+ b"v@^t",
493
+ "",
494
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
495
+ ),
431
496
  "xpc_string_get_length": (b"Q@",),
432
497
  "xpc_connection_set_context": (b"v@^v",),
433
498
  "xpc_array_set_uuid": (
@@ -509,7 +574,8 @@ functions = {
509
574
  "callable": {
510
575
  "retval": {"type": b"v"},
511
576
  "arguments": {0: {"type": b"^v"}},
512
- }
577
+ },
578
+ "callable_retained": True,
513
579
  }
514
580
  }
515
581
  },
@@ -526,6 +592,11 @@ functions = {
526
592
  "xpc_array_create_connection": (b"@@Q", "", {"retval": {"already_retained": True}}),
527
593
  "xpc_dictionary_get_remote_connection": (b"@@",),
528
594
  "xpc_date_create_from_current": (b"@", "", {"retval": {"already_retained": True}}),
595
+ "xpc_listener_set_peer_code_signing_requirement": (
596
+ b"i@^t",
597
+ "",
598
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
599
+ ),
529
600
  "xpc_dictionary_get_bool": (
530
601
  b"B@^t",
531
602
  "",
@@ -547,7 +618,7 @@ functions = {
547
618
  "arguments": {0: {"c_array_delimited_by_null": True, "type_modifier": "n"}},
548
619
  },
549
620
  ),
550
- "xpc_dictionary_dup_fd": (
621
+ "xpc_connection_set_peer_platform_identity_requirement": (
551
622
  b"i@^t",
552
623
  "",
553
624
  {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
@@ -567,7 +638,11 @@ functions = {
567
638
  },
568
639
  ),
569
640
  "xpc_fd_create": (b"@i", "", {"retval": {"already_retained": True}}),
570
- "xpc_array_set_int64": (b"v@Qq",),
641
+ "xpc_connection_set_peer_entitlement_exists_requirement": (
642
+ b"i@^t",
643
+ "",
644
+ {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
645
+ ),
571
646
  "xpc_double_get_value": (b"d@",),
572
647
  "xpc_connection_get_name": (
573
648
  b"^t@",
@@ -1,4 +1,3 @@
1
- /*#define Py_LIMITED_API 0x03060000*/
2
1
  #define PY_SSIZE_T_CLEAN
3
2
  #include "Python.h"
4
3
  #include "pyobjc-api.h"
@@ -110,6 +109,9 @@ add_constant(PyObject* m, const char* name, char* typestr, const void* value)
110
109
  }
111
110
 
112
111
  r = PyModule_AddObject(m, name, v);
112
+ if (r == -1) {
113
+ Py_DECREF(v);
114
+ }
113
115
 
114
116
  return r;
115
117
  }
@@ -126,6 +128,9 @@ add_bytes_constant(PyObject* m, const char* name, const char* value)
126
128
  }
127
129
 
128
130
  r = PyModule_AddObject(m, name, v);
131
+ if (r == -1) {
132
+ Py_DECREF(v);
133
+ }
129
134
 
130
135
  return r;
131
136
  }
@@ -172,23 +177,11 @@ static struct int64_constants {
172
177
 
173
178
  #pragma clang diagnostic pop
174
179
 
175
- /* Python glue */
176
- static struct PyModuleDef mod_module = {
177
- PyModuleDef_HEAD_INIT, "_xpc", NULL, 0, mod_methods, NULL, NULL, NULL, NULL};
178
-
179
- PyObject* PyInit__xpc(void);
180
180
 
181
- PyObject* __attribute__((__visibility__("default"))) PyInit__xpc(void)
181
+ static int mod_exec_module(PyObject* module)
182
182
  {
183
- PyObject* m;
184
-
185
- m = PyModule_Create(&mod_module);
186
- if (!m) {
187
- return NULL;
188
- }
189
-
190
- if (PyObjC_ImportAPI(m) == -1)
191
- return NULL;
183
+ if (PyObjC_ImportAPI(module) == -1)
184
+ return -1;
192
185
 
193
186
  /*
194
187
  * Register a number of struct pointer types that are actually Objective-C objects
@@ -208,7 +201,7 @@ PyObject* __attribute__((__visibility__("default"))) PyInit__xpc(void)
208
201
  for (struct bytes_constants* cur = BYTES_CONSTANTS; cur->name != NULL; cur++) {
209
202
  if (cur->value == NULL)
210
203
  continue;
211
- if (add_bytes_constant(m, cur->name, *(cur->value)) != 0)
204
+ if (add_bytes_constant(module, cur->name, *(cur->value)) != 0)
212
205
  goto error;
213
206
  }
214
207
 
@@ -219,43 +212,43 @@ PyObject* __attribute__((__visibility__("default"))) PyInit__xpc(void)
219
212
  if (v == NULL)
220
213
  goto error;
221
214
 
222
- if (PyModule_AddObject(m, cur->name, v) == -1) {
215
+ if (PyModule_AddObject(module, cur->name, v) == -1) {
223
216
  Py_DECREF(v);
224
217
  goto error;
225
218
  }
226
219
  }
227
220
 
228
221
  id v = (id)XPC_TYPE_ACTIVITY;
229
- if (add_constant(m, "XPC_TYPE_ACTIVITY", @encode(id), &v) != 0)
222
+ if (add_constant(module, "XPC_TYPE_ACTIVITY", @encode(id), &v) != 0)
230
223
  goto error;
231
224
 
232
225
  v = (id)XPC_ACTIVITY_CHECK_IN;
233
- if (add_constant(m, "XPC_ACTIVITY_CHECK_IN", @encode(id), &v) != 0)
226
+ if (add_constant(module, "XPC_ACTIVITY_CHECK_IN", @encode(id), &v) != 0)
234
227
  goto error;
235
228
 
236
229
  v = (id)XPC_TYPE_ENDPOINT;
237
- if (add_constant(m, "XPC_TYPE_ENDPOINT", @encode(id), &v) != 0)
230
+ if (add_constant(module, "XPC_TYPE_ENDPOINT", @encode(id), &v) != 0)
238
231
  goto error;
239
232
 
240
233
  xpc_object_t d;
241
234
 
242
235
  d = XPC_ERROR_CONNECTION_INTERRUPTED;
243
- if (add_constant(m, "XPC_ERROR_CONNECTION_INTERRUPTED", @encode(xpc_object_t), &d)
236
+ if (add_constant(module, "XPC_ERROR_CONNECTION_INTERRUPTED", @encode(xpc_object_t), &d)
244
237
  != 0)
245
238
  goto error;
246
239
 
247
240
  d = XPC_ERROR_CONNECTION_INVALID;
248
- if (add_constant(m, "XPC_ERROR_CONNECTION_INVALID", @encode(xpc_object_t), &d) != 0)
241
+ if (add_constant(module, "XPC_ERROR_CONNECTION_INVALID", @encode(xpc_object_t), &d) != 0)
249
242
  goto error;
250
243
 
251
244
  d = XPC_ERROR_TERMINATION_IMMINENT;
252
- if (add_constant(m, "XPC_ERROR_TERMINATION_IMMINENT", @encode(xpc_object_t), &d) != 0)
245
+ if (add_constant(module, "XPC_ERROR_TERMINATION_IMMINENT", @encode(xpc_object_t), &d) != 0)
253
246
  goto error;
254
247
 
255
248
  #if PyObjC_BUILD_RELEASE >= 1200
256
249
  if (__builtin_available(macOS 12.0, *)) {
257
250
  d = XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT;
258
- if (add_constant(m, "XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT",
251
+ if (add_constant(module, "XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT",
259
252
  @encode(xpc_object_t), &d)
260
253
  != 0)
261
254
  goto error;
@@ -264,81 +257,125 @@ PyObject* __attribute__((__visibility__("default"))) PyInit__xpc(void)
264
257
 
265
258
  xpc_type_t t;
266
259
  t = XPC_TYPE_NULL;
267
- if (add_constant(m, "XPC_TYPE_NULL", @encode(xpc_type_t), &t) != 0)
260
+ if (add_constant(module, "XPC_TYPE_NULL", @encode(xpc_type_t), &t) != 0)
268
261
  goto error;
269
262
 
270
263
  t = XPC_TYPE_BOOL;
271
- if (add_constant(m, "XPC_TYPE_BOOL", @encode(xpc_type_t), &t) != 0)
264
+ if (add_constant(module, "XPC_TYPE_BOOL", @encode(xpc_type_t), &t) != 0)
272
265
  goto error;
273
266
 
274
267
  t = XPC_TYPE_INT64;
275
- if (add_constant(m, "XPC_TYPE_INT64", @encode(xpc_type_t), &t) != 0)
268
+ if (add_constant(module, "XPC_TYPE_INT64", @encode(xpc_type_t), &t) != 0)
276
269
  goto error;
277
270
 
278
271
  t = XPC_TYPE_UINT64;
279
- if (add_constant(m, "XPC_TYPE_UINT64", @encode(xpc_type_t), &t) != 0)
272
+ if (add_constant(module, "XPC_TYPE_UINT64", @encode(xpc_type_t), &t) != 0)
280
273
  goto error;
281
274
 
282
275
  t = XPC_TYPE_DOUBLE;
283
- if (add_constant(m, "XPC_TYPE_DOUBLE", @encode(xpc_type_t), &t) != 0)
276
+ if (add_constant(module, "XPC_TYPE_DOUBLE", @encode(xpc_type_t), &t) != 0)
284
277
  goto error;
285
278
 
286
279
  t = XPC_TYPE_DATE;
287
- if (add_constant(m, "XPC_TYPE_DATE", @encode(xpc_type_t), &t) != 0)
280
+ if (add_constant(module, "XPC_TYPE_DATE", @encode(xpc_type_t), &t) != 0)
288
281
  goto error;
289
282
 
290
283
  t = XPC_TYPE_DATA;
291
- if (add_constant(m, "XPC_TYPE_DATA", @encode(xpc_type_t), &t) != 0)
284
+ if (add_constant(module, "XPC_TYPE_DATA", @encode(xpc_type_t), &t) != 0)
292
285
  goto error;
293
286
 
294
287
  t = XPC_TYPE_STRING;
295
- if (add_constant(m, "XPC_TYPE_STRING", @encode(xpc_type_t), &t) != 0)
288
+ if (add_constant(module, "XPC_TYPE_STRING", @encode(xpc_type_t), &t) != 0)
296
289
  goto error;
297
290
 
298
291
  t = XPC_TYPE_UUID;
299
- if (add_constant(m, "XPC_TYPE_UUID", @encode(xpc_type_t), &t) != 0)
292
+ if (add_constant(module, "XPC_TYPE_UUID", @encode(xpc_type_t), &t) != 0)
300
293
  goto error;
301
294
 
302
295
  t = XPC_TYPE_FD;
303
- if (add_constant(m, "XPC_TYPE_FD", @encode(xpc_type_t), &t) != 0)
296
+ if (add_constant(module, "XPC_TYPE_FD", @encode(xpc_type_t), &t) != 0)
304
297
  goto error;
305
298
 
306
299
  t = XPC_TYPE_SHMEM;
307
- if (add_constant(m, "XPC_TYPE_SHMEM", @encode(xpc_type_t), &t) != 0)
300
+ if (add_constant(module, "XPC_TYPE_SHMEM", @encode(xpc_type_t), &t) != 0)
308
301
  goto error;
309
302
 
310
303
  t = XPC_TYPE_ARRAY;
311
- if (add_constant(m, "XPC_TYPE_ARRAY", @encode(xpc_type_t), &t) != 0)
304
+ if (add_constant(module, "XPC_TYPE_ARRAY", @encode(xpc_type_t), &t) != 0)
312
305
  goto error;
313
306
 
314
307
  t = XPC_TYPE_DICTIONARY;
315
- if (add_constant(m, "XPC_TYPE_DICTIONARY", @encode(xpc_type_t), &t) != 0)
308
+ if (add_constant(module, "XPC_TYPE_DICTIONARY", @encode(xpc_type_t), &t) != 0)
316
309
  goto error;
317
310
 
318
311
  t = XPC_TYPE_ERROR;
319
- if (add_constant(m, "XPC_TYPE_ERROR", @encode(xpc_type_t), &t) != 0)
312
+ if (add_constant(module, "XPC_TYPE_ERROR", @encode(xpc_type_t), &t) != 0)
320
313
  goto error;
321
314
 
322
315
  #if PyObjC_BUILD_RELEASE >= 1300
323
316
  t = XPC_TYPE_SESSION;
324
- if (add_constant(m, "XPC_TYPE_SESSION", @encode(xpc_type_t), &t) != 0)
317
+ if (add_constant(module, "XPC_TYPE_SESSION", @encode(xpc_type_t), &t) != 0)
325
318
  goto error;
326
319
 
327
320
  t = XPC_TYPE_RICH_ERROR;
328
- if (add_constant(m, "XPC_TYPE_RICH_ERROR", @encode(xpc_type_t), &t) != 0)
321
+ if (add_constant(module, "XPC_TYPE_RICH_ERROR", @encode(xpc_type_t), &t) != 0)
329
322
  goto error;
330
323
  #endif /* PyObjC_BUILD_RELEASE >= 1300 */
331
324
 
332
325
  xpc_object_t b = XPC_BOOL_TRUE;
333
- if (add_constant(m, "XPC_BOOL_TRUE", @encode(xpc_object_t), &b) != 0)
326
+ if (add_constant(module, "XPC_BOOL_TRUE", @encode(xpc_object_t), &b) != 0)
334
327
  goto error;
335
328
 
336
329
  b = XPC_BOOL_FALSE;
337
- if (add_constant(m, "XPC_BOOL_FALSE", @encode(xpc_object_t), &b) != 0)
330
+ if (add_constant(module, "XPC_BOOL_FALSE", @encode(xpc_object_t), &b) != 0)
338
331
  goto error;
339
332
 
340
- return m;
333
+ return 0;
341
334
 
342
335
  error:
343
- return NULL;
336
+ return -1;
337
+ }
338
+
339
+ static struct PyModuleDef_Slot mod_slots[] = {
340
+ {
341
+ .slot = Py_mod_exec,
342
+ .value = (void*)mod_exec_module
343
+ },
344
+ #if PY_VERSION_HEX >= 0x030c0000
345
+ {
346
+ /* Subinterpreters are not yet supported because of PyObjC_API */
347
+ .slot = Py_mod_multiple_interpreters,
348
+ .value = Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED,
349
+ },
350
+ #endif
351
+ #if PY_VERSION_HEX >= 0x030d0000
352
+ {
353
+ /* The code in this extension should be safe to use without the GIL */
354
+ .slot = Py_mod_gil,
355
+ .value = Py_MOD_GIL_NOT_USED,
356
+ },
357
+ #endif
358
+ { /* Sentinel */
359
+ .slot = 0,
360
+ .value = 0
361
+ }
362
+ };
363
+
364
+ static struct PyModuleDef mod_module = {
365
+ .m_base = PyModuleDef_HEAD_INIT,
366
+ .m_name = "_xpc",
367
+ .m_doc = NULL,
368
+ .m_size = 0,
369
+ .m_methods = mod_methods,
370
+ .m_slots = mod_slots,
371
+ .m_traverse = NULL,
372
+ .m_clear = NULL,
373
+ .m_free = NULL,
374
+ };
375
+
376
+ PyObject* PyInit__xpc(void);
377
+
378
+ PyObject* __attribute__((__visibility__("default"))) PyInit__xpc(void)
379
+ {
380
+ return PyModuleDef_Init(&mod_module);
344
381
  }
@@ -83,7 +83,7 @@ struct pyobjc_api {
83
83
  PyObject* _Nullable (*_Nonnull unsupported_method_caller)(
84
84
  PyObject* _Nonnull, PyObject* _Nonnull, PyObject* _Nonnull const* _Nonnull,
85
85
  size_t);
86
- void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state);
86
+ void (*_Nonnull err_python_to_objc_gil)(PyGILState_STATE* _Nonnull state) __attribute__((__noreturn__));
87
87
  int (*_Nonnull simplify_sig)(const char* signature, char* buf, size_t buflen);
88
88
  void (*_Nonnull free_c_array)(int, Py_buffer*);
89
89
  int (*_Nonnull py_to_c_array)(BOOL, BOOL, const char* _Nonnull, PyObject* _Nonnull,
@@ -11,6 +11,12 @@
11
11
 
12
12
  NS_ASSUME_NONNULL_BEGIN
13
13
 
14
+ #ifdef USE_STATIC_ANALYZER
15
+ #define CLANG_SUPPRESS [[clang::suppress]]
16
+ #else
17
+ #define CLANG_SUPPRESS
18
+ #endif
19
+
14
20
  /*
15
21
  *
16
22
  * Start of compiler definitions
@@ -153,10 +159,6 @@ extern PyObject* _Nullable PyObject_VectorcallMethod(
153
159
 
154
160
  extern int PyObjC_Cmp(PyObject* o1, PyObject* o2, int* result);
155
161
 
156
- extern PyObject* _Nullable PyObjCBytes_InternFromString(const char* v);
157
- extern PyObject* _Nullable PyObjCBytes_InternFromStringAndSize(const char* v,
158
- Py_ssize_t l);
159
-
160
162
  /*
161
163
  * A micro optimization: when using Python 3.3 or later it
162
164
  * is possible to access a 'char*' with an ASCII representation
@@ -238,7 +240,80 @@ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
238
240
  PyGILState_Release(_GILState); \
239
241
  } while (0)
240
242
 
241
- extern PyObject* _Nullable PyObjC_get_tp_dict(PyTypeObject* _Nonnull tp);
243
+ #if PY_VERSION_HEX < 0x030a0000
244
+
245
+ static inline PyObject* Py_NewRef(PyObject* o)
246
+ {
247
+ Py_INCREF(o);
248
+ return o;
249
+ }
250
+
251
+ static inline PyObject* Py_XNewRef(PyObject* o)
252
+ {
253
+ Py_XINCREF(o);
254
+ return o;
255
+ }
256
+
257
+ #endif /* PY_VERSION_HEX < 0x030a0000 */
258
+
259
+ #if PY_VERSION_HEX < 0x030d0000
260
+ #define Py_BEGIN_CRITICAL_SECTION(value) { (void)(value);
261
+ #define Py_END_CRITICAL_SECTION() }
262
+ #define Py_EXIT_CRITICAL_SECTION() ((void)0)
263
+
264
+ #define Py_BEGIN_CRITICAL_SECTION2(value1, value2) { (void)(value1); (void)(value2);
265
+ #define Py_END_CRITICAL_SECTION2() }
266
+ #define Py_EXIT_CRITICAL_SECTION2() ((void)0)
267
+
268
+ #define PyObjC_ATOMIC
269
+
270
+ #else
271
+
272
+ #ifdef Py_GIL_DISABLED
273
+ #define Py_EXIT_CRITICAL_SECTION() PyCriticalSection_End(&_py_cs)
274
+ #define Py_EXIT_CRITICAL_SECTION2() PyCriticalSection2_End(&_py_cs2)
275
+ #define PyObjC_ATOMIC _Atomic
276
+ #else
277
+ #define Py_EXIT_CRITICAL_SECTION() ((void)0)
278
+ #define Py_EXIT_CRITICAL_SECTION2() ((void)0)
279
+ #define PyObjC_ATOMIC
280
+ #endif
281
+
282
+ #endif
283
+
284
+ #if PY_VERSION_HEX < 0x030d0000
285
+ static inline int PyDict_GetItemRef(PyObject *p, PyObject *key, PyObject * _Nonnull* _Nullable result)
286
+ {
287
+ *result = PyDict_GetItemWithError(p, key);
288
+ if (*result == NULL) {
289
+ if (PyErr_Occurred()) {
290
+ return -1;
291
+ } else {
292
+ return 0;
293
+ }
294
+ } else {
295
+ Py_INCREF(*result);
296
+ return 1;
297
+ }
298
+ }
299
+
300
+ static inline PyObject* _Nullable PyList_GetItemRef(PyObject* l, Py_ssize_t i)
301
+ {
302
+ PyObject* result = PyList_GetItem(l, i);
303
+ Py_XINCREF(result);
304
+ return result;
305
+ }
306
+ #endif
307
+
308
+ #if PY_VERSION_HEX < 0x030c0000
309
+ static inline PyObject* PyType_GetDict(PyTypeObject* type)
310
+ {
311
+ PyObject* result = type->tp_dict;
312
+ Py_INCREF(result);
313
+ return result;
314
+ }
315
+ #endif
316
+
242
317
 
243
318
  NS_ASSUME_NONNULL_END
244
319
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobjc-framework-libxpc
3
- Version: 10.2
3
+ Version: 11.0
4
4
  Summary: Wrappers for xpc on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -18,20 +18,20 @@ Classifier: Operating System :: MacOS :: MacOS X
18
18
  Classifier: Programming Language :: Python
19
19
  Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Programming Language :: Python :: Implementation :: CPython
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.8
31
+ Requires-Python: >=3.9
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=10.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=10.2
33
+ Requires-Dist: pyobjc-core>=11.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=11.0
35
35
 
36
36
 
37
37
  Wrappers for the "xpc" library on macOS.