winrt-Windows.Devices 2.0.1__tar.gz → 2.2.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 (21) hide show
  1. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/PKG-INFO +8 -8
  2. winrt_windows_devices-2.2.0/all-requirements.txt +7 -0
  3. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/py.Windows.Devices.cpp +187 -111
  4. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_devices-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/requirements.txt +2 -2
  7. winrt_windows_devices-2.2.0/winrt/_winrt_windows_devices.pyi +62 -0
  8. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt/windows/devices/__init__.py +1 -1
  9. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt_Windows.Devices.egg-info/PKG-INFO +8 -8
  10. winrt_windows_devices-2.2.0/winrt_Windows.Devices.egg-info/requires.txt +8 -0
  11. winrt_windows_devices-2.0.1/all-requirements.txt +0 -7
  12. winrt_windows_devices-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_devices-2.0.1/winrt/_winrt_windows_devices.pyi +0 -62
  14. winrt_windows_devices-2.0.1/winrt_Windows.Devices.egg-info/requires.txt +0 -8
  15. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/README.md +0 -0
  16. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/setup.cfg +0 -0
  17. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/setup.py +0 -0
  18. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt/windows/devices/py.typed +0 -0
  19. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt_Windows.Devices.egg-info/SOURCES.txt +0 -0
  20. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt_Windows.Devices.egg-info/dependency_links.txt +0 -0
  21. {winrt_windows_devices-2.0.1 → winrt_windows_devices-2.2.0}/winrt_Windows.Devices.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Devices
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,15 +10,15 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==2.0.1; extra == "all"
21
- Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==2.2.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==2.2.0; extra == "all"
22
22
 
23
23
  <!-- warning: Please don't edit this file. It was automatically generated. -->
24
24
 
@@ -0,0 +1,7 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
+
3
+ winrt-Windows.Devices.Adc.Provider[all]==2.2.0
4
+ winrt-Windows.Devices.Gpio.Provider[all]==2.2.0
5
+ winrt-Windows.Devices.I2c.Provider[all]==2.2.0
6
+ winrt-Windows.Devices.Pwm.Provider[all]==2.2.0
7
+ winrt-Windows.Devices.Spi.Provider[all]==2.2.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.Devices.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Devices
7
6
  {
8
7
  // ----- LowLevelDevicesAggregateProvider class --------------------
@@ -26,7 +25,7 @@ namespace py::cpp::Windows::Devices
26
25
  auto param3 = py::convert_to<winrt::Windows::Devices::I2c::Provider::II2cControllerProvider>(args, 3);
27
26
  auto param4 = py::convert_to<winrt::Windows::Devices::Spi::Provider::ISpiControllerProvider>(args, 4);
28
27
 
29
- winrt::Windows::Devices::LowLevelDevicesAggregateProvider instance{ param0, param1, param2, param3, param4 };
28
+ winrt::Windows::Devices::LowLevelDevicesAggregateProvider instance{param0, param1, param2, param3, param4};
30
29
  return py::wrap(instance, type);
31
30
  }
32
31
  catch (...)
@@ -52,14 +51,21 @@ namespace py::cpp::Windows::Devices
52
51
 
53
52
  static PyObject* LowLevelDevicesAggregateProvider_get_AdcControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
54
53
  {
55
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"AdcControllerProvider"))
56
- {
57
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
58
- return nullptr;
59
- }
60
-
61
54
  try
62
55
  {
56
+ static std::optional<bool> is_property_present{};
57
+
58
+ if (!is_property_present.has_value())
59
+ {
60
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"AdcControllerProvider");
61
+ }
62
+
63
+ if (!is_property_present.value())
64
+ {
65
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
66
+ return nullptr;
67
+ }
68
+
63
69
  return py::convert(self->obj.AdcControllerProvider());
64
70
  }
65
71
  catch (...)
@@ -71,14 +77,21 @@ namespace py::cpp::Windows::Devices
71
77
 
72
78
  static PyObject* LowLevelDevicesAggregateProvider_get_GpioControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
73
79
  {
74
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"GpioControllerProvider"))
75
- {
76
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
77
- return nullptr;
78
- }
79
-
80
80
  try
81
81
  {
82
+ static std::optional<bool> is_property_present{};
83
+
84
+ if (!is_property_present.has_value())
85
+ {
86
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"GpioControllerProvider");
87
+ }
88
+
89
+ if (!is_property_present.value())
90
+ {
91
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
92
+ return nullptr;
93
+ }
94
+
82
95
  return py::convert(self->obj.GpioControllerProvider());
83
96
  }
84
97
  catch (...)
@@ -90,14 +103,21 @@ namespace py::cpp::Windows::Devices
90
103
 
91
104
  static PyObject* LowLevelDevicesAggregateProvider_get_I2cControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
92
105
  {
93
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"I2cControllerProvider"))
94
- {
95
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
96
- return nullptr;
97
- }
98
-
99
106
  try
100
107
  {
108
+ static std::optional<bool> is_property_present{};
109
+
110
+ if (!is_property_present.has_value())
111
+ {
112
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"I2cControllerProvider");
113
+ }
114
+
115
+ if (!is_property_present.value())
116
+ {
117
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
118
+ return nullptr;
119
+ }
120
+
101
121
  return py::convert(self->obj.I2cControllerProvider());
102
122
  }
103
123
  catch (...)
@@ -109,14 +129,21 @@ namespace py::cpp::Windows::Devices
109
129
 
110
130
  static PyObject* LowLevelDevicesAggregateProvider_get_PwmControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
111
131
  {
112
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"PwmControllerProvider"))
113
- {
114
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
115
- return nullptr;
116
- }
117
-
118
132
  try
119
133
  {
134
+ static std::optional<bool> is_property_present{};
135
+
136
+ if (!is_property_present.has_value())
137
+ {
138
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"PwmControllerProvider");
139
+ }
140
+
141
+ if (!is_property_present.value())
142
+ {
143
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
144
+ return nullptr;
145
+ }
146
+
120
147
  return py::convert(self->obj.PwmControllerProvider());
121
148
  }
122
149
  catch (...)
@@ -128,14 +155,21 @@ namespace py::cpp::Windows::Devices
128
155
 
129
156
  static PyObject* LowLevelDevicesAggregateProvider_get_SpiControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
130
157
  {
131
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"SpiControllerProvider"))
132
- {
133
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
134
- return nullptr;
135
- }
136
-
137
158
  try
138
159
  {
160
+ static std::optional<bool> is_property_present{};
161
+
162
+ if (!is_property_present.has_value())
163
+ {
164
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"SpiControllerProvider");
165
+ }
166
+
167
+ if (!is_property_present.value())
168
+ {
169
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
170
+ return nullptr;
171
+ }
172
+
139
173
  return py::convert(self->obj.SpiControllerProvider());
140
174
  }
141
175
  catch (...)
@@ -184,23 +218,20 @@ namespace py::cpp::Windows::Devices
184
218
  { }
185
219
  };
186
220
 
187
- static PyType_Slot _type_slots_LowLevelDevicesAggregateProvider[] =
188
- {
221
+ static PyType_Slot _type_slots_LowLevelDevicesAggregateProvider[] = {
189
222
  { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesAggregateProvider) },
190
223
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesAggregateProvider) },
191
224
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesAggregateProvider) },
192
225
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesAggregateProvider) },
193
- { },
226
+ { }
194
227
  };
195
228
 
196
- static PyType_Spec type_spec_LowLevelDevicesAggregateProvider =
197
- {
229
+ static PyType_Spec type_spec_LowLevelDevicesAggregateProvider = {
198
230
  "winrt._winrt_windows_devices.LowLevelDevicesAggregateProvider",
199
231
  sizeof(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider),
200
232
  0,
201
233
  Py_TPFLAGS_DEFAULT,
202
- _type_slots_LowLevelDevicesAggregateProvider
203
- };
234
+ _type_slots_LowLevelDevicesAggregateProvider};
204
235
 
205
236
  // ----- LowLevelDevicesController class --------------------
206
237
 
@@ -221,14 +252,21 @@ namespace py::cpp::Windows::Devices
221
252
 
222
253
  static PyObject* LowLevelDevicesController_get_DefaultProvider(PyObject* /*unused*/, void* /*unused*/) noexcept
223
254
  {
224
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider"))
225
- {
226
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
227
- return nullptr;
228
- }
229
-
230
255
  try
231
256
  {
257
+ static std::optional<bool> is_property_present{};
258
+
259
+ if (!is_property_present.has_value())
260
+ {
261
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider");
262
+ }
263
+
264
+ if (!is_property_present.value())
265
+ {
266
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
267
+ return nullptr;
268
+ }
269
+
232
270
  return py::convert(winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider());
233
271
  }
234
272
  catch (...)
@@ -240,12 +278,6 @@ namespace py::cpp::Windows::Devices
240
278
 
241
279
  static int LowLevelDevicesController_put_DefaultProvider(PyObject* /*unused*/, PyObject* arg, void* /*unused*/) noexcept
242
280
  {
243
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider"))
244
- {
245
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
246
- return -1;
247
- }
248
-
249
281
  if (arg == nullptr)
250
282
  {
251
283
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -254,6 +286,19 @@ namespace py::cpp::Windows::Devices
254
286
 
255
287
  try
256
288
  {
289
+ static std::optional<bool> is_property_present{};
290
+
291
+ if (!is_property_present.has_value())
292
+ {
293
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider");
294
+ }
295
+
296
+ if (!is_property_present.value())
297
+ {
298
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
299
+ return -1;
300
+ }
301
+
257
302
  auto param0 = py::convert_to<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>(arg);
258
303
 
259
304
  winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider(param0);
@@ -300,23 +345,20 @@ namespace py::cpp::Windows::Devices
300
345
  { }
301
346
  };
302
347
 
303
- static PyType_Slot _type_slots_LowLevelDevicesController[] =
304
- {
348
+ static PyType_Slot _type_slots_LowLevelDevicesController[] = {
305
349
  { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesController) },
306
350
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesController) },
307
351
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesController) },
308
352
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesController) },
309
- { },
353
+ { }
310
354
  };
311
355
 
312
- static PyType_Spec type_spec_LowLevelDevicesController =
313
- {
356
+ static PyType_Spec type_spec_LowLevelDevicesController = {
314
357
  "winrt._winrt_windows_devices.LowLevelDevicesController",
315
358
  sizeof(py::wrapper::Windows::Devices::LowLevelDevicesController),
316
359
  0,
317
360
  Py_TPFLAGS_DEFAULT,
318
- _type_slots_LowLevelDevicesController
319
- };
361
+ _type_slots_LowLevelDevicesController};
320
362
 
321
363
  static PyGetSetDef getset_LowLevelDevicesController_Static[] = {
322
364
  { "default_provider", reinterpret_cast<getter>(LowLevelDevicesController_get_DefaultProvider), reinterpret_cast<setter>(LowLevelDevicesController_put_DefaultProvider), nullptr, nullptr },
@@ -363,14 +405,21 @@ namespace py::cpp::Windows::Devices
363
405
 
364
406
  static PyObject* ILowLevelDevicesAggregateProvider_get_AdcControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
365
407
  {
366
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"AdcControllerProvider"))
367
- {
368
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
369
- return nullptr;
370
- }
371
-
372
408
  try
373
409
  {
410
+ static std::optional<bool> is_property_present{};
411
+
412
+ if (!is_property_present.has_value())
413
+ {
414
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"AdcControllerProvider");
415
+ }
416
+
417
+ if (!is_property_present.value())
418
+ {
419
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
420
+ return nullptr;
421
+ }
422
+
374
423
  return py::convert(self->obj.AdcControllerProvider());
375
424
  }
376
425
  catch (...)
@@ -382,14 +431,21 @@ namespace py::cpp::Windows::Devices
382
431
 
383
432
  static PyObject* ILowLevelDevicesAggregateProvider_get_GpioControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
384
433
  {
385
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"GpioControllerProvider"))
386
- {
387
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
388
- return nullptr;
389
- }
390
-
391
434
  try
392
435
  {
436
+ static std::optional<bool> is_property_present{};
437
+
438
+ if (!is_property_present.has_value())
439
+ {
440
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"GpioControllerProvider");
441
+ }
442
+
443
+ if (!is_property_present.value())
444
+ {
445
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
446
+ return nullptr;
447
+ }
448
+
393
449
  return py::convert(self->obj.GpioControllerProvider());
394
450
  }
395
451
  catch (...)
@@ -401,14 +457,21 @@ namespace py::cpp::Windows::Devices
401
457
 
402
458
  static PyObject* ILowLevelDevicesAggregateProvider_get_I2cControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
403
459
  {
404
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"I2cControllerProvider"))
405
- {
406
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
407
- return nullptr;
408
- }
409
-
410
460
  try
411
461
  {
462
+ static std::optional<bool> is_property_present{};
463
+
464
+ if (!is_property_present.has_value())
465
+ {
466
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"I2cControllerProvider");
467
+ }
468
+
469
+ if (!is_property_present.value())
470
+ {
471
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
472
+ return nullptr;
473
+ }
474
+
412
475
  return py::convert(self->obj.I2cControllerProvider());
413
476
  }
414
477
  catch (...)
@@ -420,14 +483,21 @@ namespace py::cpp::Windows::Devices
420
483
 
421
484
  static PyObject* ILowLevelDevicesAggregateProvider_get_PwmControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
422
485
  {
423
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"PwmControllerProvider"))
424
- {
425
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
426
- return nullptr;
427
- }
428
-
429
486
  try
430
487
  {
488
+ static std::optional<bool> is_property_present{};
489
+
490
+ if (!is_property_present.has_value())
491
+ {
492
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"PwmControllerProvider");
493
+ }
494
+
495
+ if (!is_property_present.value())
496
+ {
497
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
498
+ return nullptr;
499
+ }
500
+
431
501
  return py::convert(self->obj.PwmControllerProvider());
432
502
  }
433
503
  catch (...)
@@ -439,14 +509,21 @@ namespace py::cpp::Windows::Devices
439
509
 
440
510
  static PyObject* ILowLevelDevicesAggregateProvider_get_SpiControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
441
511
  {
442
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"SpiControllerProvider"))
443
- {
444
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
445
- return nullptr;
446
- }
447
-
448
512
  try
449
513
  {
514
+ static std::optional<bool> is_property_present{};
515
+
516
+ if (!is_property_present.has_value())
517
+ {
518
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"SpiControllerProvider");
519
+ }
520
+
521
+ if (!is_property_present.value())
522
+ {
523
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
524
+ return nullptr;
525
+ }
526
+
450
527
  return py::convert(self->obj.SpiControllerProvider());
451
528
  }
452
529
  catch (...)
@@ -495,39 +572,35 @@ namespace py::cpp::Windows::Devices
495
572
  { }
496
573
  };
497
574
 
498
- static PyType_Slot _type_slots_ILowLevelDevicesAggregateProvider[] =
499
- {
575
+ static PyType_Slot _type_slots_ILowLevelDevicesAggregateProvider[] = {
500
576
  { Py_tp_new, reinterpret_cast<void*>(_new_ILowLevelDevicesAggregateProvider) },
501
577
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ILowLevelDevicesAggregateProvider) },
502
578
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ILowLevelDevicesAggregateProvider) },
503
579
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ILowLevelDevicesAggregateProvider) },
504
- { },
580
+ { }
505
581
  };
506
582
 
507
- static PyType_Spec type_spec_ILowLevelDevicesAggregateProvider =
508
- {
583
+ static PyType_Spec type_spec_ILowLevelDevicesAggregateProvider = {
509
584
  "winrt._winrt_windows_devices.ILowLevelDevicesAggregateProvider",
510
585
  sizeof(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider),
511
586
  0,
512
587
  Py_TPFLAGS_DEFAULT,
513
- _type_slots_ILowLevelDevicesAggregateProvider
514
- };
588
+ _type_slots_ILowLevelDevicesAggregateProvider};
515
589
 
516
590
  // ----- Windows.Devices Initialization --------------------
517
- PyDoc_STRVAR(module_doc, "Windows::Devices");
518
591
 
592
+ PyDoc_STRVAR(module_doc, "Windows.Devices");
519
593
 
520
- static PyModuleDef module_def
521
- = {PyModuleDef_HEAD_INIT,
522
- "_winrt_windows_devices",
523
- module_doc,
524
- 0,
525
- nullptr,
526
- nullptr,
527
- nullptr,
528
- nullptr,
529
- nullptr};
530
-
594
+ static PyModuleDef module_def = {
595
+ PyModuleDef_HEAD_INIT,
596
+ "_winrt_windows_devices",
597
+ module_doc,
598
+ 0,
599
+ nullptr,
600
+ nullptr,
601
+ nullptr,
602
+ nullptr,
603
+ nullptr};
531
604
  } // py::cpp::Windows::Devices
532
605
 
533
606
  PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
@@ -559,7 +632,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
559
632
  return nullptr;
560
633
  }
561
634
 
562
- if (py::register_python_type(module.get(), &type_spec_LowLevelDevicesAggregateProvider, object_bases.get(), nullptr) == -1)
635
+ py::pytype_handle LowLevelDevicesAggregateProvider_type{py::register_python_type(module.get(), &type_spec_LowLevelDevicesAggregateProvider, object_bases.get(), nullptr)};
636
+ if (!LowLevelDevicesAggregateProvider_type)
563
637
  {
564
638
  return nullptr;
565
639
  }
@@ -570,12 +644,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
570
644
  return nullptr;
571
645
  }
572
646
 
573
- if (py::register_python_type(module.get(), &type_spec_LowLevelDevicesController, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LowLevelDevicesController_Static.get())) == -1)
647
+ py::pytype_handle LowLevelDevicesController_type{py::register_python_type(module.get(), &type_spec_LowLevelDevicesController, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LowLevelDevicesController_Static.get()))};
648
+ if (!LowLevelDevicesController_type)
574
649
  {
575
650
  return nullptr;
576
651
  }
577
652
 
578
- if (py::register_python_type(module.get(), &type_spec_ILowLevelDevicesAggregateProvider, object_bases.get(), nullptr) == -1)
653
+ py::pytype_handle ILowLevelDevicesAggregateProvider_type{py::register_python_type(module.get(), &type_spec_ILowLevelDevicesAggregateProvider, object_bases.get(), nullptr)};
654
+ if (!ILowLevelDevicesAggregateProvider_type)
579
655
  {
580
656
  return nullptr;
581
657
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # suppress warnings about ARM64 testing
@@ -0,0 +1 @@
1
+ 2.2.0
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -0,0 +1,62 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.devices.adc.provider as windows_devices_adc_provider
13
+ import winrt.windows.devices.gpio.provider as windows_devices_gpio_provider
14
+ import winrt.windows.devices.i2c.provider as windows_devices_i2c_provider
15
+ import winrt.windows.devices.pwm.provider as windows_devices_pwm_provider
16
+ import winrt.windows.devices.spi.provider as windows_devices_spi_provider
17
+
18
+ Self = typing.TypeVar('Self')
19
+
20
+ @typing.final
21
+ class LowLevelDevicesAggregateProvider(winrt.system.Object):
22
+ @staticmethod
23
+ def _from(obj: winrt.system.Object, /) -> LowLevelDevicesAggregateProvider: ...
24
+ def __new__(cls: typing.Type[LowLevelDevicesAggregateProvider], adc: typing.Optional[windows_devices_adc_provider.IAdcControllerProvider], pwm: typing.Optional[windows_devices_pwm_provider.IPwmControllerProvider], gpio: typing.Optional[windows_devices_gpio_provider.IGpioControllerProvider], i2c: typing.Optional[windows_devices_i2c_provider.II2cControllerProvider], spi: typing.Optional[windows_devices_spi_provider.ISpiControllerProvider]) -> LowLevelDevicesAggregateProvider: ...
25
+ @_property
26
+ def adc_controller_provider(self) -> typing.Optional[windows_devices_adc_provider.IAdcControllerProvider]: ...
27
+ @_property
28
+ def gpio_controller_provider(self) -> typing.Optional[windows_devices_gpio_provider.IGpioControllerProvider]: ...
29
+ @_property
30
+ def i2c_controller_provider(self) -> typing.Optional[windows_devices_i2c_provider.II2cControllerProvider]: ...
31
+ @_property
32
+ def pwm_controller_provider(self) -> typing.Optional[windows_devices_pwm_provider.IPwmControllerProvider]: ...
33
+ @_property
34
+ def spi_controller_provider(self) -> typing.Optional[windows_devices_spi_provider.ISpiControllerProvider]: ...
35
+
36
+ @typing.final
37
+ class LowLevelDevicesController_Static(type):
38
+ @_property
39
+ def default_provider(cls) -> typing.Optional[ILowLevelDevicesAggregateProvider]: ...
40
+ @default_provider.setter
41
+ def default_provider(cls, value: typing.Optional[ILowLevelDevicesAggregateProvider]) -> None: ...
42
+
43
+ @typing.final
44
+ class LowLevelDevicesController(winrt.system.Object, metaclass=LowLevelDevicesController_Static):
45
+ @staticmethod
46
+ def _from(obj: winrt.system.Object, /) -> LowLevelDevicesController: ...
47
+
48
+ @typing.final
49
+ class ILowLevelDevicesAggregateProvider(winrt.system.Object):
50
+ @staticmethod
51
+ def _from(obj: winrt.system.Object, /) -> ILowLevelDevicesAggregateProvider: ...
52
+ @_property
53
+ def adc_controller_provider(self) -> typing.Optional[windows_devices_adc_provider.IAdcControllerProvider]: ...
54
+ @_property
55
+ def gpio_controller_provider(self) -> typing.Optional[windows_devices_gpio_provider.IGpioControllerProvider]: ...
56
+ @_property
57
+ def i2c_controller_provider(self) -> typing.Optional[windows_devices_i2c_provider.II2cControllerProvider]: ...
58
+ @_property
59
+ def pwm_controller_provider(self) -> typing.Optional[windows_devices_pwm_provider.IPwmControllerProvider]: ...
60
+ @_property
61
+ def spi_controller_provider(self) -> typing.Optional[windows_devices_spi_provider.ISpiControllerProvider]: ...
62
+
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import winrt.system
4
4
  from winrt import _winrt_windows_devices
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Devices
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,15 +10,15 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==2.0.1; extra == "all"
21
- Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==2.2.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==2.2.0; extra == "all"
22
22
 
23
23
  <!-- warning: Please don't edit this file. It was automatically generated. -->
24
24
 
@@ -0,0 +1,8 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Devices.Adc.Provider[all]==2.2.0
5
+ winrt-Windows.Devices.Gpio.Provider[all]==2.2.0
6
+ winrt-Windows.Devices.I2c.Provider[all]==2.2.0
7
+ winrt-Windows.Devices.Pwm.Provider[all]==2.2.0
8
+ winrt-Windows.Devices.Spi.Provider[all]==2.2.0
@@ -1,7 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Devices.Adc.Provider[all]==2.0.1
4
- winrt-Windows.Devices.Gpio.Provider[all]==2.0.1
5
- winrt-Windows.Devices.I2c.Provider[all]==2.0.1
6
- winrt-Windows.Devices.Pwm.Provider[all]==2.0.1
7
- winrt-Windows.Devices.Spi.Provider[all]==2.0.1
@@ -1 +0,0 @@
1
- 2.0.1
@@ -1,62 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- import datetime
4
- import sys
5
- import types
6
- import typing
7
- import uuid as _uuid
8
- from builtins import property as _property
9
-
10
- import winrt._winrt
11
- import winrt.system
12
- import winrt.windows.devices.adc.provider
13
- import winrt.windows.devices.gpio.provider
14
- import winrt.windows.devices.i2c.provider
15
- import winrt.windows.devices.pwm.provider
16
- import winrt.windows.devices.spi.provider
17
-
18
- Self = typing.TypeVar('Self')
19
-
20
- @typing.final
21
- class LowLevelDevicesAggregateProvider(winrt.system.Object):
22
- @staticmethod
23
- def _from(obj: winrt.system.Object, /) -> LowLevelDevicesAggregateProvider: ...
24
- def __new__(cls: typing.Type[LowLevelDevicesAggregateProvider], adc: typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider], pwm: typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider], gpio: typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider], i2c: typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider], spi: typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]) -> LowLevelDevicesAggregateProvider:...
25
- @_property
26
- def adc_controller_provider(self) -> typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider]: ...
27
- @_property
28
- def gpio_controller_provider(self) -> typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider]: ...
29
- @_property
30
- def i2c_controller_provider(self) -> typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider]: ...
31
- @_property
32
- def pwm_controller_provider(self) -> typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider]: ...
33
- @_property
34
- def spi_controller_provider(self) -> typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]: ...
35
-
36
- @typing.final
37
- class LowLevelDevicesController_Static(type):
38
- @_property
39
- def default_provider(cls) -> typing.Optional[ILowLevelDevicesAggregateProvider]: ...
40
- @default_provider.setter
41
- def default_provider(cls, value: typing.Optional[ILowLevelDevicesAggregateProvider]) -> None: ...
42
-
43
- @typing.final
44
- class LowLevelDevicesController(winrt.system.Object, metaclass=LowLevelDevicesController_Static):
45
- @staticmethod
46
- def _from(obj: winrt.system.Object, /) -> LowLevelDevicesController: ...
47
-
48
- @typing.final
49
- class ILowLevelDevicesAggregateProvider(winrt.system.Object):
50
- @staticmethod
51
- def _from(obj: winrt.system.Object, /) -> ILowLevelDevicesAggregateProvider: ...
52
- @_property
53
- def adc_controller_provider(self) -> typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider]: ...
54
- @_property
55
- def gpio_controller_provider(self) -> typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider]: ...
56
- @_property
57
- def i2c_controller_provider(self) -> typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider]: ...
58
- @_property
59
- def pwm_controller_provider(self) -> typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider]: ...
60
- @_property
61
- def spi_controller_provider(self) -> typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]: ...
62
-
@@ -1,8 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Devices.Adc.Provider[all]==2.0.1
5
- winrt-Windows.Devices.Gpio.Provider[all]==2.0.1
6
- winrt-Windows.Devices.I2c.Provider[all]==2.0.1
7
- winrt-Windows.Devices.Pwm.Provider[all]==2.0.1
8
- winrt-Windows.Devices.Spi.Provider[all]==2.0.1