pyobjc-framework-CoreML 12.2.2__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 (74) hide show
  1. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/CoreML/__init__.py +2 -2
  2. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/CoreML/_metadata.py +35 -13
  3. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/pyobjc_framework_CoreML.egg-info/PKG-INFO +5 -5
  4. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/pyobjc_framework_CoreML.egg-info/SOURCES.txt +2 -2
  5. pyobjc_framework_coreml-13.0/Lib/pyobjc_framework_CoreML.egg-info/pyobjc-build-info.txt +3 -0
  6. pyobjc_framework_coreml-13.0/Lib/pyobjc_framework_CoreML.egg-info/requires.txt +2 -0
  7. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Modules/_CoreML.m +10 -2
  8. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Modules/_CoreML_protocols.m +6 -0
  9. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Modules/pyobjc-api.h +18 -4
  10. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Modules/pyobjc-compat.h +0 -18
  11. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PKG-INFO +5 -5
  12. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlbatchprovider.py +4 -4
  13. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcomputedeviceprotocol.py +1 -1
  14. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcomputeplan.py +2 -2
  15. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcomputeplancost.py +1 -1
  16. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcomputeplandeviceusage.py +1 -1
  17. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcustomlayer.py +3 -3
  18. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlcustommodel.py +3 -3
  19. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mldictionaryfeatureprovider.py +1 -1
  20. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlfeaturedescription.py +1 -1
  21. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlfeatureprovider.py +2 -2
  22. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlfeaturetype.py +1 -3
  23. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlfeaturevalue.py +1 -1
  24. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlfeaturevalue_mlimageconversion.py +1 -1
  25. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlimagesizeconstrainttype.py +1 -3
  26. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodel.py +7 -7
  27. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodel_mlmodelcompilation.py +2 -2
  28. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodel_mlstate.py +3 -3
  29. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelconfiguration.py +1 -3
  30. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelerror.py +2 -4
  31. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelmetadatakeys.py +2 -2
  32. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmultiarray.py +3 -5
  33. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmultiarrayshapeconstrainttype.py +1 -3
  34. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlpredictionoptions.py +1 -1
  35. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlreshapefrequencyhint.py +1 -1
  36. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mltask.py +1 -3
  37. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlupdateprogressevent.py +1 -3
  38. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlwritable.py +3 -3
  39. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/metadata/CoreML.fwinfo +28 -274
  40. pyobjc_framework_coreml-12.2.2/metadata/raw/arm64-26.5.fwinfo → pyobjc_framework_coreml-13.0/metadata/raw/arm64-27.fwinfo +3 -3
  41. pyobjc_framework_coreml-12.2.2/metadata/raw/x86_64-26.5.fwinfo → pyobjc_framework_coreml-13.0/metadata/raw/x86_64-27.fwinfo +3 -3
  42. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/pyobjc_setup.py +7 -7
  43. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/setup.py +1 -1
  44. pyobjc_framework_coreml-12.2.2/Lib/pyobjc_framework_CoreML.egg-info/pyobjc-build-info.txt +0 -3
  45. pyobjc_framework_coreml-12.2.2/Lib/pyobjc_framework_CoreML.egg-info/requires.txt +0 -2
  46. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/pyobjc_framework_CoreML.egg-info/dependency_links.txt +0 -0
  47. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/pyobjc_framework_CoreML.egg-info/not-zip-safe +0 -0
  48. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/Lib/pyobjc_framework_CoreML.egg-info/top_level.txt +0 -0
  49. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/License.txt +0 -0
  50. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/MANIFEST.in +0 -0
  51. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/__init__.py +0 -0
  52. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_coreml.py +0 -0
  53. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlallcomputedevices.py +0 -0
  54. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelasset.py +0 -0
  55. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelcollection.py +0 -0
  56. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructure.py +0 -0
  57. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureneuralnetwork.py +0 -0
  58. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureneuralnetworklayer.py +0 -0
  59. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructurepipeline.py +0 -0
  60. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogram.py +0 -0
  61. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramargument.py +0 -0
  62. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogrambinding.py +0 -0
  63. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramblock.py +0 -0
  64. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramfunction.py +0 -0
  65. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramnamedvaluetype.py +0 -0
  66. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramoperation.py +0 -0
  67. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramvalue.py +0 -0
  68. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlmodelstructureprogramvaluetype.py +0 -0
  69. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlstate.py +0 -0
  70. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlupdateprogresshandlers.py +0 -0
  71. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/PyObjCTest/test_mlupdatetask.py +0 -0
  72. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/metadata/metadata.ini +0 -0
  73. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/pyproject.toml +0 -0
  74. {pyobjc_framework_coreml-12.2.2 → pyobjc_framework_coreml-13.0}/setup.cfg +0 -0
@@ -50,8 +50,8 @@ def _setup():
50
50
  ):
51
51
  try:
52
52
  objc.lookUpClass(clsname).__objc_final__ = True
53
- except objc.error:
54
- pass
53
+ except objc.error: # pragma: no cover
54
+ pass # pragma: no cover
55
55
 
56
56
  for cls, sel in (
57
57
  ("MLMetricKey", b"init"),
@@ -1,7 +1,5 @@
1
1
  # This file is generated by objective.metadata
2
2
  #
3
- # Last update: Thu May 28 21:26:32 2026
4
- #
5
3
  # flake8: noqa
6
4
 
7
5
  import objc, sys
@@ -224,6 +222,7 @@ try:
224
222
  b"modelWithContentsOfURL:error:",
225
223
  {"arguments": {3: {"type_modifier": b"o"}}},
226
224
  )
225
+ r(b"MLModel", b"newState", {"retval": {"already_retained": True}})
227
226
  r(
228
227
  b"MLModel",
229
228
  b"parameterValueForKey:error:",
@@ -572,6 +571,21 @@ try:
572
571
  }
573
572
  },
574
573
  )
574
+ r(
575
+ b"MLUpdateProgressHandlers",
576
+ b"updateTaskForModelAtURL:trainingData:configuration:completionHandler:error:",
577
+ {
578
+ "arguments": {
579
+ 5: {
580
+ "callable": {
581
+ "retval": {"type": b"v"},
582
+ "arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
583
+ }
584
+ },
585
+ 6: {"type_modifier": b"o"},
586
+ }
587
+ },
588
+ )
575
589
  r(
576
590
  b"MLUpdateTask",
577
591
  b"updateTaskForModelAtURL:trainingData:completionHandler:error:",
@@ -628,12 +642,12 @@ try:
628
642
  b"encodeToCommandBuffer:inputs:outputs:error:",
629
643
  {
630
644
  "required": False,
631
- "retval": {"type": "Z"},
645
+ "retval": {"type": b"Z"},
632
646
  "arguments": {
633
647
  2: {"type": b"@"},
634
648
  3: {"type": b"@"},
635
649
  4: {"type": b"@"},
636
- 5: {"type": "^@", "type_modifier": b"o"},
650
+ 5: {"type": b"^@", "type_modifier": b"o"},
637
651
  },
638
652
  },
639
653
  )
@@ -642,11 +656,11 @@ try:
642
656
  b"evaluateOnCPUWithInputs:outputs:error:",
643
657
  {
644
658
  "required": True,
645
- "retval": {"type": "Z"},
659
+ "retval": {"type": b"Z"},
646
660
  "arguments": {
647
661
  2: {"type": b"@"},
648
662
  3: {"type": b"@"},
649
- 4: {"type": "^@", "type_modifier": b"o"},
663
+ 4: {"type": b"^@", "type_modifier": b"o"},
650
664
  },
651
665
  },
652
666
  )
@@ -670,7 +684,7 @@ try:
670
684
  "arguments": {
671
685
  2: {"type": b"@"},
672
686
  3: {"type": b"@"},
673
- 4: {"type": "^@", "type_modifier": b"o"},
687
+ 4: {"type": b"^@", "type_modifier": b"o"},
674
688
  },
675
689
  },
676
690
  )
@@ -680,7 +694,7 @@ try:
680
694
  {
681
695
  "required": True,
682
696
  "retval": {"type": b"@"},
683
- "arguments": {2: {"type": b"@"}, 3: {"type": "^@", "type_modifier": b"o"}},
697
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"^@", "type_modifier": b"o"}},
684
698
  },
685
699
  )
686
700
  r(
@@ -689,7 +703,7 @@ try:
689
703
  {
690
704
  "required": True,
691
705
  "retval": {"type": b"@"},
692
- "arguments": {2: {"type": b"@"}, 3: {"type": "^@", "type_modifier": b"o"}},
706
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"^@", "type_modifier": b"o"}},
693
707
  },
694
708
  )
695
709
  r(
@@ -701,7 +715,7 @@ try:
701
715
  "arguments": {
702
716
  2: {"type": b"@"},
703
717
  3: {"type": b"@"},
704
- 4: {"type": "^@", "type_modifier": b"o"},
718
+ 4: {"type": b"^@", "type_modifier": b"o"},
705
719
  },
706
720
  },
707
721
  )
@@ -714,7 +728,7 @@ try:
714
728
  "arguments": {
715
729
  2: {"type": b"@"},
716
730
  3: {"type": b"@"},
717
- 4: {"type": "^@", "type_modifier": b"o"},
731
+ 4: {"type": b"^@", "type_modifier": b"o"},
718
732
  },
719
733
  },
720
734
  )
@@ -723,8 +737,8 @@ try:
723
737
  b"setWeightData:error:",
724
738
  {
725
739
  "required": True,
726
- "retval": {"type": "Z"},
727
- "arguments": {2: {"type": b"@"}, 3: {"type": "^@", "type_modifier": b"o"}},
740
+ "retval": {"type": b"Z"},
741
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"^@", "type_modifier": b"o"}},
728
742
  },
729
743
  )
730
744
  r(
@@ -881,5 +895,13 @@ objc.registerNewKeywords("MLSequence", ("type",), "emptySequenceWithType_")
881
895
  objc.registerNewKeywords("MLSequence", ("int64Array",), "sequenceWithInt64Array_")
882
896
  objc.registerNewKeywords("MLSequence", ("stringArray",), "sequenceWithStringArray_")
883
897
  expressions = {}
898
+ formal_protocols = {
899
+ "MLBatchProvider": "MLBatchProvider",
900
+ "MLComputeDeviceProtocol": "MLComputeDeviceProtocol",
901
+ "MLCustomLayer": "MLCustomLayer",
902
+ "MLCustomModel": "MLCustomModel",
903
+ "MLFeatureProvider": "MLFeatureProvider",
904
+ "MLWritable": "MLWritable",
905
+ }
884
906
 
885
907
  # END OF FILE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobjc-framework-CoreML
3
- Version: 12.2.2
3
+ Version: 13.0
4
4
  Summary: Wrappers for the framework CoreML on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,21 +17,21 @@ 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
- Requires-Dist: pyobjc-core>=12.2.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.2
33
+ Requires-Dist: pyobjc-core>=13.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=13.0
35
35
  Dynamic: author
36
36
  Dynamic: author-email
37
37
  Dynamic: classifier
@@ -66,5 +66,5 @@ PyObjCTest/test_mlupdatetask.py
66
66
  PyObjCTest/test_mlwritable.py
67
67
  metadata/CoreML.fwinfo
68
68
  metadata/metadata.ini
69
- metadata/raw/arm64-26.5.fwinfo
70
- metadata/raw/x86_64-26.5.fwinfo
69
+ metadata/raw/arm64-27.fwinfo
70
+ 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 <CoreML/CoreML.h>
6
10
  #import <Foundation/Foundation.h>
7
11
 
@@ -10,6 +14,8 @@
10
14
  */
11
15
  #include "_CoreML_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__CoreML(void);
64
+ PyObject* _Nullable PyInit__CoreML(void);
59
65
 
60
- PyObject* __attribute__((__visibility__("default")))
66
+ PyObject* _Nullable __attribute__((__visibility__("default")))
61
67
  PyInit__CoreML(void)
62
68
  {
63
69
  return PyModuleDef_Init(&mod_module);
64
70
  }
71
+
72
+ NS_ASSUME_NONNULL_END
@@ -1,3 +1,7 @@
1
+ // LCOV_EXCL_START
2
+ // This function is only present to ensure protocols are
3
+ // available at runtime.
4
+ NS_ASSUME_NONNULL_BEGIN
1
5
  static void __attribute__((__used__))
2
6
  use_protocols(void)
3
7
  {
@@ -23,3 +27,5 @@ use_protocols(void)
23
27
  Py_XDECREF(p);
24
28
  #endif
25
29
  }
30
+ NS_ASSUME_NONNULL_END
31
+ // 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-CoreML
3
- Version: 12.2.2
3
+ Version: 13.0
4
4
  Summary: Wrappers for the framework CoreML on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,21 +17,21 @@ 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
- Requires-Dist: pyobjc-core>=12.2.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.2
33
+ Requires-Dist: pyobjc-core>=13.0
34
+ Requires-Dist: pyobjc-framework-Cocoa>=13.0
35
35
  Dynamic: author
36
36
  Dynamic: author-email
37
37
  Dynamic: classifier
@@ -14,11 +14,11 @@ class TestMLBatchProviderHelper(CoreML.NSObject):
14
14
 
15
15
  class TestMLBatchProvider(TestCase):
16
16
  @min_sdk_level("10.14")
17
- def testProtocols(self):
18
- self.assertProtocolExists("MLBatchProvider")
19
- self.assertProtocolExists("MLFeatureProvider")
17
+ def test_protocols(self):
18
+ self.assertProtocolExists("MLBatchProvider", CoreML)
19
+ self.assertProtocolExists("MLFeatureProvider", CoreML)
20
20
 
21
- def testMethods(self):
21
+ def test_protocol_methods(self):
22
22
  self.assertResultHasType(TestMLBatchProviderHelper.count, objc._C_NSInteger)
23
23
  self.assertArgHasType(
24
24
  TestMLBatchProviderHelper.featuresAtIndex_, 0, objc._C_NSInteger
@@ -5,4 +5,4 @@ import CoreML # noqa: F401
5
5
  class TestMLComputeDeviceProtocol(TestCase):
6
6
  @min_sdk_level("14.0")
7
7
  def test_functions(self):
8
- self.assertProtocolExists("MLComputeDeviceProtocol")
8
+ self.assertProtocolExists("MLComputeDeviceProtocol", CoreML)
@@ -4,11 +4,11 @@ import CoreML
4
4
 
5
5
  class TestMLComputePlan(TestCase):
6
6
  @min_os_level("14.4")
7
- def testClasses(self):
7
+ def test_classes(self):
8
8
  self.assertTrue(CoreML.MLComputePlan.__objc_final__)
9
9
 
10
10
  @min_os_level("14.4")
11
- def testMethods(self):
11
+ def test_methods(self):
12
12
  self.assertArgIsBlock(
13
13
  CoreML.MLComputePlan.loadContentsOfURL_configuration_completionHandler_,
14
14
  2,
@@ -4,5 +4,5 @@ import CoreML
4
4
 
5
5
  class TestMLComputePlanCost(TestCase):
6
6
  @min_os_level("14.4")
7
- def testClasses(self):
7
+ def test_classes(self):
8
8
  self.assertTrue(CoreML.MLComputePlanCost.__objc_final__)
@@ -4,5 +4,5 @@ import CoreML
4
4
 
5
5
  class TestMLComputePlanDeviceUsage(TestCase):
6
6
  @min_os_level("14.4")
7
- def testClasses(self):
7
+ def test_classes(self):
8
8
  self.assertTrue(CoreML.MLComputePlanDeviceUsage.__objc_final__)
@@ -21,10 +21,10 @@ class TestMLCustomLayerHelper(CoreML.NSObject):
21
21
 
22
22
  class TestMLCustomLayer(TestCase):
23
23
  @min_sdk_level("10.13")
24
- def testProtocols(self):
25
- self.assertProtocolExists("MLCustomLayer")
24
+ def test_protocols(self):
25
+ self.assertProtocolExists("MLCustomLayer", CoreML)
26
26
 
27
- def testMethods(self):
27
+ def test_protocol_methods(self):
28
28
  self.assertArgHasType(
29
29
  TestMLCustomLayerHelper.initWithParameterDictionary_error_, 1, b"o^@"
30
30
  )
@@ -15,10 +15,10 @@ class TestMLCustomModelHelper(CoreML.NSObject):
15
15
 
16
16
  class TestMLCustomModel(TestCase):
17
17
  @min_sdk_level("10.14")
18
- def testProtocols(self):
19
- self.assertProtocolExists("MLCustomModel")
18
+ def test_protocols(self):
19
+ self.assertProtocolExists("MLCustomModel", CoreML)
20
20
 
21
- def testMethods(self):
21
+ def test_protocol_methods(self):
22
22
  self.assertArgHasType(
23
23
  TestMLCustomModelHelper.initWithModelDescription_parameterDictionary_error_,
24
24
  2,
@@ -4,7 +4,7 @@ import CoreML
4
4
 
5
5
  class TestMLDictionaryFeatureProvider(TestCase):
6
6
  @min_os_level("10.13")
7
- def testMethods10_13(self):
7
+ def test_methods10_13(self):
8
8
  self.assertArgIsOut(
9
9
  CoreML.MLDictionaryFeatureProvider.initWithDictionary_error_, 1
10
10
  )
@@ -4,7 +4,7 @@ import CoreML
4
4
 
5
5
  class TestMLFeatureDescription(TestCase):
6
6
  @min_os_level("10.13")
7
- def testMethods10_13(self):
7
+ def test_methods10_13(self):
8
8
  self.assertResultIsBOOL(CoreML.MLFeatureDescription.isOptional)
9
9
  # self.assertArgIsBOOL(CoreML.MLFeatureDescription.setOptional_, 0)
10
10
  self.assertResultIsBOOL(CoreML.MLFeatureDescription.isAllowedValue_)
@@ -4,5 +4,5 @@ import CoreML # noqa: F401
4
4
 
5
5
  class TestMLDictionaryFeatureProvider(TestCase):
6
6
  @min_sdk_level("10.13")
7
- def testProtocols(self):
8
- self.assertProtocolExists("MLFeatureProvider")
7
+ def test_protocols(self):
8
+ self.assertProtocolExists("MLFeatureProvider", CoreML)
@@ -3,10 +3,8 @@ import CoreML
3
3
 
4
4
 
5
5
  class TestMLFeatureType(TestCase):
6
- def test_enum_types(self):
6
+ def test_enums(self):
7
7
  self.assertIsEnumType(CoreML.MLFeatureType)
8
-
9
- def testConstants(self):
10
8
  self.assertEqual(CoreML.MLFeatureTypeInvalid, 0)
11
9
  self.assertEqual(CoreML.MLFeatureTypeInt64, 1)
12
10
  self.assertEqual(CoreML.MLFeatureTypeDouble, 2)
@@ -4,7 +4,7 @@ import CoreML
4
4
 
5
5
  class TestMLFeatureValue(TestCase):
6
6
  @min_os_level("10.13")
7
- def testMethods10_13(self):
7
+ def test_methods10_13(self):
8
8
  self.assertResultIsBOOL(CoreML.MLFeatureValue.isUndefined)
9
9
  self.assertArgIsOut(CoreML.MLFeatureValue.featureValueWithDictionary_error_, 1)
10
10
  self.assertResultIsBOOL(CoreML.MLFeatureValue.isEqualToFeatureValue_)
@@ -3,7 +3,7 @@ import CoreML
3
3
 
4
4
 
5
5
  class TestMLFeatureValue_MLImageConversion(TestCase):
6
- def test_typed_enum(self):
6
+ def test_typed_enums(self):
7
7
  self.assertIsTypedEnum(CoreML.MLFeatureValueImageOption, str)
8
8
 
9
9
  @min_os_level("10.15")
@@ -3,10 +3,8 @@ import CoreML
3
3
 
4
4
 
5
5
  class TestMLImageSizeConstraintType(TestCase):
6
- def test_enum_types(self):
6
+ def test_enums(self):
7
7
  self.assertIsEnumType(CoreML.MLImageSizeConstraintType)
8
-
9
- def test_constants(self):
10
8
  self.assertEqual(CoreML.MLImageSizeConstraintTypeUnspecified, 0)
11
9
  self.assertEqual(CoreML.MLImageSizeConstraintTypeEnumerated, 2)
12
10
  self.assertEqual(CoreML.MLImageSizeConstraintTypeRange, 3)
@@ -4,40 +4,40 @@ import CoreML
4
4
 
5
5
  class TestMLModel(TestCase):
6
6
  @min_os_level("10.13")
7
- def testMethods10_13(self):
7
+ def test_methods10_13(self):
8
8
  self.assertArgIsOut(CoreML.MLModel.modelWithContentsOfURL_error_, 1)
9
9
  self.assertArgIsOut(CoreML.MLModel.predictionFromFeatures_error_, 1)
10
10
  self.assertArgIsOut(CoreML.MLModel.predictionFromFeatures_options_error_, 2)
11
11
 
12
12
  @min_os_level("10.14")
13
- def testMethods10_14(self):
13
+ def test_methods10_14(self):
14
14
  self.assertArgIsOut(
15
15
  CoreML.MLModel.modelWithContentsOfURL_configuration_error_, 2
16
16
  )
17
17
  self.assertArgIsOut(CoreML.MLModel.predictionsFromBatch_options_error_, 2)
18
18
 
19
19
  @min_os_level("10.15")
20
- def testMethods10_14_missing(self):
20
+ def test_methods10_14_missing(self):
21
21
  self.assertArgIsOut(CoreML.MLModel.predictionsFromBatch_error_, 1)
22
22
 
23
23
  @min_os_level("10.15")
24
- def testMethods10_15(self):
24
+ def test_methods10_15(self):
25
25
  self.assertArgIsOut(CoreML.MLModel.parameterValueForKey_error_, 1)
26
26
 
27
27
  @min_os_level("11.0")
28
- def testMethods11_0(self):
28
+ def test_methods11_0(self):
29
29
  self.assertArgIsBlock(
30
30
  CoreML.MLModel.loadContentsOfURL_configuration_completionHandler_, 2, b"v@@"
31
31
  )
32
32
 
33
33
  @min_os_level("13.0")
34
- def testMethods13_0(self):
34
+ def test_methods13_0(self):
35
35
  self.assertArgIsBlock(
36
36
  CoreML.MLModel.loadModelAsset_configuration_completionHandler_, 2, b"v@@"
37
37
  )
38
38
 
39
39
  @min_os_level("14.0")
40
- def testMethods14_0(self):
40
+ def test_methods14_0(self):
41
41
  self.assertArgIsBlock(
42
42
  CoreML.MLModel.predictionFromFeatures_completionHandler_, 1, b"v@@"
43
43
  )
@@ -4,11 +4,11 @@ import CoreML
4
4
 
5
5
  class TestMLModel_MLModelCompilation(TestCase):
6
6
  @min_os_level("10.13")
7
- def testMethods10_13(self):
7
+ def test_methods10_13(self):
8
8
  self.assertArgIsOut(CoreML.MLModel.compileModelAtURL_error_, 1)
9
9
 
10
10
  @min_os_level("13.0")
11
- def testMethods13_0(self):
11
+ def test_methods13_0(self):
12
12
  self.assertArgIsBlock(
13
13
  CoreML.MLModel.compileModelAtURL_completionHandler_, 1, b"v@@"
14
14
  )
@@ -1,4 +1,4 @@
1
- from PyObjCTools.TestSupport import TestCase, min_os_level, expectedFailure
1
+ from PyObjCTools.TestSupport import TestCase, min_os_level
2
2
  import CoreML
3
3
 
4
4
 
@@ -10,12 +10,12 @@ class TestMLModel_MLState(TestCase):
10
10
  CoreML.MLModel.predictionFromFeatures_usingState_options_error_, 3
11
11
  )
12
12
 
13
- @expectedFailure
14
13
  @min_os_level("15.0")
15
14
  def test_methods16_0(self):
16
- # XXX: Marked as 'macOS 16.0' in the headers.
17
15
  self.assertArgIsBlock(
18
16
  CoreML.MLModel.new().predictionFromFeatures_usingState_options_completionHandler_,
19
17
  3,
20
18
  b"v@@",
21
19
  )
20
+
21
+ self.assertResultIsRetained(CoreML.MLModel.newState)
@@ -3,10 +3,8 @@ import CoreML
3
3
 
4
4
 
5
5
  class TestMLModelConfiguration(TestCase):
6
- def test_enum_types(self):
6
+ def test_enums(self):
7
7
  self.assertIsEnumType(CoreML.MLComputeUnits)
8
-
9
- def test_constants(self):
10
8
  self.assertEqual(CoreML.MLComputeUnitsCPUOnly, 0)
11
9
  self.assertEqual(CoreML.MLComputeUnitsCPUAndGPU, 1)
12
10
  self.assertEqual(CoreML.MLComputeUnitsAll, 2)
@@ -3,10 +3,8 @@ import CoreML
3
3
 
4
4
 
5
5
  class TestMLFeatureDescription(TestCase):
6
- def test_enum_types(self):
6
+ def test_enums(self):
7
7
  self.assertIsEnumType(CoreML.MLModelError)
8
-
9
- def testConstants(self):
10
8
  self.assertEqual(CoreML.MLModelErrorGeneric, 0)
11
9
  self.assertEqual(CoreML.MLModelErrorFeatureType, 1)
12
10
  self.assertEqual(CoreML.MLModelErrorIO, 3)
@@ -20,5 +18,5 @@ class TestMLFeatureDescription(TestCase):
20
18
  self.assertEqual(CoreML.MLModelErrorPredictionCancelled, 11)
21
19
 
22
20
  @min_os_level("10.13")
23
- def testConstants10_13(self):
21
+ def test_constants10_13(self):
24
22
  self.assertIsInstance(CoreML.MLModelErrorDomain, str)