winrt-Windows.Devices 2.2.0__tar.gz → 3.0.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 (22) hide show
  1. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/PKG-INFO +8 -8
  2. winrt_windows_devices-3.0.0/all-requirements.txt +7 -0
  3. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/py.Windows.Devices.cpp +291 -61
  4. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/pyproject.toml +2 -2
  5. winrt_windows_devices-3.0.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/requirements.txt +2 -2
  7. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/setup.py +1 -1
  8. winrt_windows_devices-3.0.0/winrt/_winrt_windows_devices.pyi +77 -0
  9. winrt_windows_devices-3.0.0/winrt/windows/devices/__init__.py +16 -0
  10. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/winrt_Windows.Devices.egg-info/PKG-INFO +8 -8
  11. winrt_windows_devices-3.0.0/winrt_Windows.Devices.egg-info/requires.txt +8 -0
  12. winrt_windows_devices-2.2.0/all-requirements.txt +0 -7
  13. winrt_windows_devices-2.2.0/pywinrt-version.txt +0 -1
  14. winrt_windows_devices-2.2.0/winrt/_winrt_windows_devices.pyi +0 -62
  15. winrt_windows_devices-2.2.0/winrt/windows/devices/__init__.py +0 -14
  16. winrt_windows_devices-2.2.0/winrt_Windows.Devices.egg-info/requires.txt +0 -8
  17. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/README.md +0 -0
  18. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/setup.cfg +0 -0
  19. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/winrt/windows/devices/py.typed +0 -0
  20. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/winrt_Windows.Devices.egg-info/SOURCES.txt +0 -0
  21. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.0}/winrt_Windows.Devices.egg-info/dependency_links.txt +0 -0
  22. {winrt_windows_devices-2.2.0 → winrt_windows_devices-3.0.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.2.0
3
+ Version: 3.0.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.14,>=3.9
13
+ Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.2.0
15
+ Requires-Dist: winrt-runtime==3.0.0
16
16
  Provides-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"
17
+ Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==3.0.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==3.0.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==3.0.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==3.0.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==3.0.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 v3.0.0
2
+
3
+ winrt-Windows.Devices.Adc.Provider[all]==3.0.0
4
+ winrt-Windows.Devices.Gpio.Provider[all]==3.0.0
5
+ winrt-Windows.Devices.I2c.Provider[all]==3.0.0
6
+ winrt-Windows.Devices.Pwm.Provider[all]==3.0.0
7
+ winrt-Windows.Devices.Spi.Provider[all]==3.0.0
@@ -1,4 +1,4 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
2
2
 
3
3
  #include "py.Windows.Devices.h"
4
4
 
@@ -8,13 +8,13 @@ namespace py::cpp::Windows::Devices
8
8
 
9
9
  static PyObject* _new_LowLevelDevicesAggregateProvider(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
10
10
  {
11
- if (kwds != nullptr)
11
+ if (kwds)
12
12
  {
13
13
  py::set_invalid_kwd_args_error();
14
14
  return nullptr;
15
15
  }
16
16
 
17
- auto arg_count = PyTuple_Size(args);
17
+ auto arg_count = PyTuple_GET_SIZE(args);
18
18
  if (arg_count == 5)
19
19
  {
20
20
  try
@@ -66,7 +66,11 @@ namespace py::cpp::Windows::Devices
66
66
  return nullptr;
67
67
  }
68
68
 
69
- return py::convert(self->obj.AdcControllerProvider());
69
+ return py::convert([&]()
70
+ {
71
+ auto _gil = release_gil();
72
+ return self->obj.AdcControllerProvider();
73
+ }());
70
74
  }
71
75
  catch (...)
72
76
  {
@@ -92,7 +96,11 @@ namespace py::cpp::Windows::Devices
92
96
  return nullptr;
93
97
  }
94
98
 
95
- return py::convert(self->obj.GpioControllerProvider());
99
+ return py::convert([&]()
100
+ {
101
+ auto _gil = release_gil();
102
+ return self->obj.GpioControllerProvider();
103
+ }());
96
104
  }
97
105
  catch (...)
98
106
  {
@@ -118,7 +126,11 @@ namespace py::cpp::Windows::Devices
118
126
  return nullptr;
119
127
  }
120
128
 
121
- return py::convert(self->obj.I2cControllerProvider());
129
+ return py::convert([&]()
130
+ {
131
+ auto _gil = release_gil();
132
+ return self->obj.I2cControllerProvider();
133
+ }());
122
134
  }
123
135
  catch (...)
124
136
  {
@@ -144,7 +156,11 @@ namespace py::cpp::Windows::Devices
144
156
  return nullptr;
145
157
  }
146
158
 
147
- return py::convert(self->obj.PwmControllerProvider());
159
+ return py::convert([&]()
160
+ {
161
+ auto _gil = release_gil();
162
+ return self->obj.PwmControllerProvider();
163
+ }());
148
164
  }
149
165
  catch (...)
150
166
  {
@@ -170,7 +186,11 @@ namespace py::cpp::Windows::Devices
170
186
  return nullptr;
171
187
  }
172
188
 
173
- return py::convert(self->obj.SpiControllerProvider());
189
+ return py::convert([&]()
190
+ {
191
+ auto _gil = release_gil();
192
+ return self->obj.SpiControllerProvider();
193
+ }());
174
194
  }
175
195
  catch (...)
176
196
  {
@@ -206,8 +226,7 @@ namespace py::cpp::Windows::Devices
206
226
  static PyMethodDef _methods_LowLevelDevicesAggregateProvider[] = {
207
227
  { "_assign_array_", _assign_array_LowLevelDevicesAggregateProvider, METH_O | METH_STATIC, nullptr },
208
228
  { "_from", reinterpret_cast<PyCFunction>(_from_LowLevelDevicesAggregateProvider), METH_O | METH_STATIC, nullptr },
209
- { }
210
- };
229
+ { }};
211
230
 
212
231
  static PyGetSetDef _getset_LowLevelDevicesAggregateProvider[] = {
213
232
  { "adc_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_AdcControllerProvider), nullptr, nullptr, nullptr },
@@ -215,16 +234,14 @@ namespace py::cpp::Windows::Devices
215
234
  { "i2c_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_I2cControllerProvider), nullptr, nullptr, nullptr },
216
235
  { "pwm_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_PwmControllerProvider), nullptr, nullptr, nullptr },
217
236
  { "spi_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_SpiControllerProvider), nullptr, nullptr, nullptr },
218
- { }
219
- };
237
+ { }};
220
238
 
221
239
  static PyType_Slot _type_slots_LowLevelDevicesAggregateProvider[] = {
222
240
  { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesAggregateProvider) },
223
241
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesAggregateProvider) },
224
242
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesAggregateProvider) },
225
243
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesAggregateProvider) },
226
- { }
227
- };
244
+ { }};
228
245
 
229
246
  static PyType_Spec type_spec_LowLevelDevicesAggregateProvider = {
230
247
  "winrt._winrt_windows_devices.LowLevelDevicesAggregateProvider",
@@ -267,7 +284,11 @@ namespace py::cpp::Windows::Devices
267
284
  return nullptr;
268
285
  }
269
286
 
270
- return py::convert(winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider());
287
+ return py::convert([&]()
288
+ {
289
+ auto _gil = release_gil();
290
+ return winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider();
291
+ }());
271
292
  }
272
293
  catch (...)
273
294
  {
@@ -278,7 +299,7 @@ namespace py::cpp::Windows::Devices
278
299
 
279
300
  static int LowLevelDevicesController_put_DefaultProvider(PyObject* /*unused*/, PyObject* arg, void* /*unused*/) noexcept
280
301
  {
281
- if (arg == nullptr)
302
+ if (!arg)
282
303
  {
283
304
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
284
305
  return -1;
@@ -301,7 +322,11 @@ namespace py::cpp::Windows::Devices
301
322
 
302
323
  auto param0 = py::convert_to<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>(arg);
303
324
 
304
- winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider(param0);
325
+ {
326
+ auto _gil = release_gil();
327
+ winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider(param0);
328
+ }
329
+
305
330
  return 0;
306
331
  }
307
332
  catch (...)
@@ -338,20 +363,17 @@ namespace py::cpp::Windows::Devices
338
363
  static PyMethodDef _methods_LowLevelDevicesController[] = {
339
364
  { "_assign_array_", _assign_array_LowLevelDevicesController, METH_O | METH_STATIC, nullptr },
340
365
  { "_from", reinterpret_cast<PyCFunction>(_from_LowLevelDevicesController), METH_O | METH_STATIC, nullptr },
341
- { }
342
- };
366
+ { }};
343
367
 
344
368
  static PyGetSetDef _getset_LowLevelDevicesController[] = {
345
- { }
346
- };
369
+ { }};
347
370
 
348
371
  static PyType_Slot _type_slots_LowLevelDevicesController[] = {
349
372
  { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesController) },
350
373
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesController) },
351
374
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesController) },
352
375
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesController) },
353
- { }
354
- };
376
+ { }};
355
377
 
356
378
  static PyType_Spec type_spec_LowLevelDevicesController = {
357
379
  "winrt._winrt_windows_devices.LowLevelDevicesController",
@@ -362,12 +384,10 @@ namespace py::cpp::Windows::Devices
362
384
 
363
385
  static PyGetSetDef getset_LowLevelDevicesController_Static[] = {
364
386
  { "default_provider", reinterpret_cast<getter>(LowLevelDevicesController_get_DefaultProvider), reinterpret_cast<setter>(LowLevelDevicesController_put_DefaultProvider), nullptr, nullptr },
365
- { }
366
- };
387
+ { }};
367
388
 
368
389
  static PyMethodDef methods_LowLevelDevicesController_Static[] = {
369
- { }
370
- };
390
+ { }};
371
391
 
372
392
  static PyType_Slot type_slots_LowLevelDevicesController_Static[] =
373
393
  {
@@ -377,23 +397,23 @@ namespace py::cpp::Windows::Devices
377
397
  { }
378
398
  };
379
399
 
380
- static PyType_Spec type_spec_LowLevelDevicesController_Static =
381
- {
400
+ static PyType_Spec type_spec_LowLevelDevicesController_Static = {
382
401
  "winrt._winrt_windows_devices.LowLevelDevicesController_Static",
383
402
  static_cast<int>(PyType_Type.tp_basicsize),
384
403
  static_cast<int>(PyType_Type.tp_itemsize),
385
404
  Py_TPFLAGS_DEFAULT,
386
- type_slots_LowLevelDevicesController_Static
387
- };
405
+ type_slots_LowLevelDevicesController_Static};
388
406
 
389
407
  // ----- ILowLevelDevicesAggregateProvider interface --------------------
390
408
 
409
+ #if PY_VERSION_HEX < 0x030A0000
391
410
  static PyObject* _new_ILowLevelDevicesAggregateProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
392
411
  {
393
412
  static_assert(py::py_type<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>::type_name);
394
413
  py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>::type_name);
395
414
  return nullptr;
396
415
  }
416
+ #endif
397
417
 
398
418
  static void _dealloc_ILowLevelDevicesAggregateProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self) noexcept
399
419
  {
@@ -420,7 +440,11 @@ namespace py::cpp::Windows::Devices
420
440
  return nullptr;
421
441
  }
422
442
 
423
- return py::convert(self->obj.AdcControllerProvider());
443
+ return py::convert([&]()
444
+ {
445
+ auto _gil = release_gil();
446
+ return self->obj.AdcControllerProvider();
447
+ }());
424
448
  }
425
449
  catch (...)
426
450
  {
@@ -446,7 +470,11 @@ namespace py::cpp::Windows::Devices
446
470
  return nullptr;
447
471
  }
448
472
 
449
- return py::convert(self->obj.GpioControllerProvider());
473
+ return py::convert([&]()
474
+ {
475
+ auto _gil = release_gil();
476
+ return self->obj.GpioControllerProvider();
477
+ }());
450
478
  }
451
479
  catch (...)
452
480
  {
@@ -472,7 +500,11 @@ namespace py::cpp::Windows::Devices
472
500
  return nullptr;
473
501
  }
474
502
 
475
- return py::convert(self->obj.I2cControllerProvider());
503
+ return py::convert([&]()
504
+ {
505
+ auto _gil = release_gil();
506
+ return self->obj.I2cControllerProvider();
507
+ }());
476
508
  }
477
509
  catch (...)
478
510
  {
@@ -498,7 +530,11 @@ namespace py::cpp::Windows::Devices
498
530
  return nullptr;
499
531
  }
500
532
 
501
- return py::convert(self->obj.PwmControllerProvider());
533
+ return py::convert([&]()
534
+ {
535
+ auto _gil = release_gil();
536
+ return self->obj.PwmControllerProvider();
537
+ }());
502
538
  }
503
539
  catch (...)
504
540
  {
@@ -524,7 +560,11 @@ namespace py::cpp::Windows::Devices
524
560
  return nullptr;
525
561
  }
526
562
 
527
- return py::convert(self->obj.SpiControllerProvider());
563
+ return py::convert([&]()
564
+ {
565
+ auto _gil = release_gil();
566
+ return self->obj.SpiControllerProvider();
567
+ }());
528
568
  }
529
569
  catch (...)
530
570
  {
@@ -533,6 +573,145 @@ namespace py::cpp::Windows::Devices
533
573
  }
534
574
  }
535
575
 
576
+ static PyMethodDef _methods_ILowLevelDevicesAggregateProvider[] = {
577
+ { }};
578
+
579
+ static PyGetSetDef _getset_ILowLevelDevicesAggregateProvider[] = {
580
+ { "adc_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_AdcControllerProvider), nullptr, nullptr, nullptr },
581
+ { "gpio_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_GpioControllerProvider), nullptr, nullptr, nullptr },
582
+ { "i2c_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_I2cControllerProvider), nullptr, nullptr, nullptr },
583
+ { "pwm_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_PwmControllerProvider), nullptr, nullptr, nullptr },
584
+ { "spi_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_SpiControllerProvider), nullptr, nullptr, nullptr },
585
+ { }};
586
+
587
+ static PyType_Slot _type_slots_ILowLevelDevicesAggregateProvider[] = {
588
+ #if PY_VERSION_HEX < 0x030A0000
589
+ { Py_tp_new, reinterpret_cast<void*>(_new_ILowLevelDevicesAggregateProvider) },
590
+ #endif
591
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ILowLevelDevicesAggregateProvider) },
592
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_ILowLevelDevicesAggregateProvider) },
593
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_ILowLevelDevicesAggregateProvider) },
594
+ { }};
595
+
596
+ static PyType_Spec type_spec_ILowLevelDevicesAggregateProvider = {
597
+ "winrt._winrt_windows_devices._ILowLevelDevicesAggregateProvider",
598
+ sizeof(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider),
599
+ 0,
600
+ Py_TPFLAGS_DEFAULT
601
+ #if PY_VERSION_HEX >= 0x030A0000
602
+ | Py_TPFLAGS_DISALLOW_INSTANTIATION
603
+ #endif
604
+ ,
605
+ _type_slots_ILowLevelDevicesAggregateProvider};
606
+
607
+ struct ImplementsILowLevelDevicesAggregateProvider : py::ImplementsInterfaceT<ImplementsILowLevelDevicesAggregateProvider, winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>
608
+ {
609
+ ImplementsILowLevelDevicesAggregateProvider() = delete;
610
+ ImplementsILowLevelDevicesAggregateProvider(PyObject* py_obj, winrt::impl::inspectable_abi* runtime_class) : py::ImplementsInterfaceT<ImplementsILowLevelDevicesAggregateProvider, winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>(py_obj, runtime_class)
611
+ {
612
+ }
613
+
614
+ auto AdcControllerProvider()
615
+ {
616
+ try
617
+ {
618
+ py::pyobj_handle self{this->get_py_obj()};
619
+
620
+ py::pyobj_handle value{PyObject_GetAttrString(self.get(), "adc_controller_provider")};
621
+ if (!value)
622
+ {
623
+ throw python_exception();
624
+ }
625
+
626
+ return py::convert_to<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>(value.get());
627
+ }
628
+ catch (python_exception)
629
+ {
630
+ py::write_unraisable_and_throw();
631
+ }
632
+ }
633
+
634
+ auto GpioControllerProvider()
635
+ {
636
+ try
637
+ {
638
+ py::pyobj_handle self{this->get_py_obj()};
639
+
640
+ py::pyobj_handle value{PyObject_GetAttrString(self.get(), "gpio_controller_provider")};
641
+ if (!value)
642
+ {
643
+ throw python_exception();
644
+ }
645
+
646
+ return py::convert_to<winrt::Windows::Devices::Gpio::Provider::IGpioControllerProvider>(value.get());
647
+ }
648
+ catch (python_exception)
649
+ {
650
+ py::write_unraisable_and_throw();
651
+ }
652
+ }
653
+
654
+ auto I2cControllerProvider()
655
+ {
656
+ try
657
+ {
658
+ py::pyobj_handle self{this->get_py_obj()};
659
+
660
+ py::pyobj_handle value{PyObject_GetAttrString(self.get(), "i2c_controller_provider")};
661
+ if (!value)
662
+ {
663
+ throw python_exception();
664
+ }
665
+
666
+ return py::convert_to<winrt::Windows::Devices::I2c::Provider::II2cControllerProvider>(value.get());
667
+ }
668
+ catch (python_exception)
669
+ {
670
+ py::write_unraisable_and_throw();
671
+ }
672
+ }
673
+
674
+ auto PwmControllerProvider()
675
+ {
676
+ try
677
+ {
678
+ py::pyobj_handle self{this->get_py_obj()};
679
+
680
+ py::pyobj_handle value{PyObject_GetAttrString(self.get(), "pwm_controller_provider")};
681
+ if (!value)
682
+ {
683
+ throw python_exception();
684
+ }
685
+
686
+ return py::convert_to<winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider>(value.get());
687
+ }
688
+ catch (python_exception)
689
+ {
690
+ py::write_unraisable_and_throw();
691
+ }
692
+ }
693
+
694
+ auto SpiControllerProvider()
695
+ {
696
+ try
697
+ {
698
+ py::pyobj_handle self{this->get_py_obj()};
699
+
700
+ py::pyobj_handle value{PyObject_GetAttrString(self.get(), "spi_controller_provider")};
701
+ if (!value)
702
+ {
703
+ throw python_exception();
704
+ }
705
+
706
+ return py::convert_to<winrt::Windows::Devices::Spi::Provider::ISpiControllerProvider>(value.get());
707
+ }
708
+ catch (python_exception)
709
+ {
710
+ py::write_unraisable_and_throw();
711
+ }
712
+ }
713
+ };
714
+
536
715
  static PyObject* _assign_array_ILowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* arg) noexcept
537
716
  {
538
717
  auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>>();
@@ -557,35 +736,63 @@ namespace py::cpp::Windows::Devices
557
736
  }
558
737
  }
559
738
 
560
- static PyMethodDef _methods_ILowLevelDevicesAggregateProvider[] = {
739
+ static PyObject* _guid_ImplementsILowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* /*unused*/) noexcept
740
+ {
741
+ try
742
+ {
743
+ return py::convert(winrt::guid_of<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>());
744
+ }
745
+ catch (...)
746
+ {
747
+ py::to_PyErr();
748
+ return nullptr;
749
+ }
750
+ }
751
+
752
+ static PyObject* _make_ImplementsILowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* args) noexcept
753
+ {
754
+ try
755
+ {
756
+ PyObject* py_obj;
757
+ winrt::impl::inspectable_abi* runtime_class;
758
+
759
+ if (!PyArg_ParseTuple(args, "On", &py_obj, &runtime_class))
760
+ {
761
+ return nullptr;
762
+ }
763
+
764
+ auto iface{std::make_unique<ImplementsILowLevelDevicesAggregateProvider>(py_obj, runtime_class)};
765
+
766
+ return PyLong_FromVoidPtr(iface.release());
767
+ }
768
+ catch (...)
769
+ {
770
+ py::to_PyErr();
771
+ return nullptr;
772
+ }
773
+ }
774
+
775
+ static PyMethodDef methods_ImplementsILowLevelDevicesAggregateProvider[] = {
561
776
  { "_assign_array_", _assign_array_ILowLevelDevicesAggregateProvider, METH_O | METH_STATIC, nullptr },
562
777
  { "_from", reinterpret_cast<PyCFunction>(_from_ILowLevelDevicesAggregateProvider), METH_O | METH_STATIC, nullptr },
563
- { }
564
- };
565
-
566
- static PyGetSetDef _getset_ILowLevelDevicesAggregateProvider[] = {
567
- { "adc_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_AdcControllerProvider), nullptr, nullptr, nullptr },
568
- { "gpio_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_GpioControllerProvider), nullptr, nullptr, nullptr },
569
- { "i2c_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_I2cControllerProvider), nullptr, nullptr, nullptr },
570
- { "pwm_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_PwmControllerProvider), nullptr, nullptr, nullptr },
571
- { "spi_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_SpiControllerProvider), nullptr, nullptr, nullptr },
572
- { }
573
- };
778
+ { "_guid_", reinterpret_cast<PyCFunction>(_guid_ImplementsILowLevelDevicesAggregateProvider), METH_NOARGS | METH_STATIC, nullptr },
779
+ { "_make_", reinterpret_cast<PyCFunction>(_make_ImplementsILowLevelDevicesAggregateProvider), METH_VARARGS | METH_STATIC, nullptr },
780
+ { }};
574
781
 
575
- static PyType_Slot _type_slots_ILowLevelDevicesAggregateProvider[] = {
576
- { Py_tp_new, reinterpret_cast<void*>(_new_ILowLevelDevicesAggregateProvider) },
577
- { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ILowLevelDevicesAggregateProvider) },
578
- { Py_tp_methods, reinterpret_cast<void*>(_methods_ILowLevelDevicesAggregateProvider) },
579
- { Py_tp_getset, reinterpret_cast<void*>(_getset_ILowLevelDevicesAggregateProvider) },
580
- { }
581
- };
782
+ static PyType_Slot type_slots_ImplementsILowLevelDevicesAggregateProvider[] = {
783
+ { Py_tp_methods, reinterpret_cast<void*>(methods_ImplementsILowLevelDevicesAggregateProvider) },
784
+ { }};
582
785
 
583
- static PyType_Spec type_spec_ILowLevelDevicesAggregateProvider = {
786
+ static PyType_Spec type_spec_ImplementsILowLevelDevicesAggregateProvider = {
584
787
  "winrt._winrt_windows_devices.ILowLevelDevicesAggregateProvider",
585
- sizeof(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider),
586
788
  0,
587
- Py_TPFLAGS_DEFAULT,
588
- _type_slots_ILowLevelDevicesAggregateProvider};
789
+ 0,
790
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
791
+ #if PY_VERSION_HEX >= 0x030A0000
792
+ | Py_TPFLAGS_DISALLOW_INSTANTIATION
793
+ #endif
794
+ ,
795
+ type_slots_ImplementsILowLevelDevicesAggregateProvider};
589
796
 
590
797
  // ----- Windows.Devices Initialization --------------------
591
798
 
@@ -619,6 +826,12 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
619
826
  return nullptr;
620
827
  }
621
828
 
829
+ auto inspectable_meta_type = py::get_inspectable_meta_type();
830
+ if (!inspectable_meta_type)
831
+ {
832
+ return nullptr;
833
+ }
834
+
622
835
  auto object_type = py::get_object_type();
623
836
  if (!object_type)
624
837
  {
@@ -632,13 +845,19 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
632
845
  return nullptr;
633
846
  }
634
847
 
635
- py::pytype_handle LowLevelDevicesAggregateProvider_type{py::register_python_type(module.get(), &type_spec_LowLevelDevicesAggregateProvider, object_bases.get(), nullptr)};
848
+ py::pytype_handle LowLevelDevicesAggregateProvider_type{py::register_python_type(module.get(), &type_spec_LowLevelDevicesAggregateProvider, object_bases.get(), inspectable_meta_type)};
636
849
  if (!LowLevelDevicesAggregateProvider_type)
637
850
  {
638
851
  return nullptr;
639
852
  }
640
853
 
641
- py::pyobj_handle type_LowLevelDevicesController_Static{PyType_FromSpec(&type_spec_LowLevelDevicesController_Static)};
854
+ py::pyobj_handle LowLevelDevicesController_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
855
+ if (!LowLevelDevicesController_Static_bases)
856
+ {
857
+ return nullptr;
858
+ }
859
+
860
+ py::pyobj_handle type_LowLevelDevicesController_Static{PyType_FromSpecWithBases(&type_spec_LowLevelDevicesController_Static, LowLevelDevicesController_Static_bases.get())};
642
861
  if (!type_LowLevelDevicesController_Static)
643
862
  {
644
863
  return nullptr;
@@ -656,6 +875,17 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
656
875
  return nullptr;
657
876
  }
658
877
 
878
+ py::pytype_handle ImplementsILowLevelDevicesAggregateProvider_type{py::register_python_type(module.get(), &type_spec_ImplementsILowLevelDevicesAggregateProvider, nullptr, inspectable_meta_type)};
879
+ if (!ImplementsILowLevelDevicesAggregateProvider_type)
880
+ {
881
+ return nullptr;
882
+ }
883
+
884
+ if (PyModule_AddType(module.get(), ImplementsILowLevelDevicesAggregateProvider_type.get()) == -1)
885
+ {
886
+ return nullptr;
887
+ }
888
+
659
889
 
660
890
  return module.detach();
661
891
  }
@@ -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.14"
19
+ requires-python = ">=3.9"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -34,7 +34,7 @@ optional-dependencies.all = { file = "all-requirements.txt" }
34
34
 
35
35
  [tool.cibuildwheel]
36
36
  # use local winrt-sdk build dependency
37
- environment = { PYTHONPATH="../winrt-sdk/src" }
37
+ environment = { PYTHONPATH="../../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
39
  build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
40
  before-build = "uv pip install setuptools"
@@ -0,0 +1 @@
1
+ 3.0.0
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
2
2
 
3
- winrt-runtime==2.2.0
3
+ winrt-runtime==3.0.0
@@ -19,7 +19,7 @@ class build_ext_ex(build_ext):
19
19
 
20
20
 
21
21
  setup(
22
- cmdclass = {'build_ext': build_ext_ex},
22
+ cmdclass={"build_ext": build_ext_ex},
23
23
  ext_modules=[
24
24
  Extension(
25
25
  "winrt._winrt_windows_devices",
@@ -0,0 +1,77 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.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
+ from abc import abstractmethod
10
+
11
+ import winrt._winrt
12
+ import winrt.system
13
+ import winrt.windows.devices.adc.provider as windows_devices_adc_provider
14
+ import winrt.windows.devices.gpio.provider as windows_devices_gpio_provider
15
+ import winrt.windows.devices.i2c.provider as windows_devices_i2c_provider
16
+ import winrt.windows.devices.pwm.provider as windows_devices_pwm_provider
17
+ import winrt.windows.devices.spi.provider as windows_devices_spi_provider
18
+
19
+ Self = typing.TypeVar('Self')
20
+
21
+ @typing.final
22
+ class LowLevelDevicesAggregateProvider(winrt.system.Object, ILowLevelDevicesAggregateProvider):
23
+ def __new__(cls: typing.Type[Self], adc: windows_devices_adc_provider.IAdcControllerProvider, pwm: windows_devices_pwm_provider.IPwmControllerProvider, gpio: windows_devices_gpio_provider.IGpioControllerProvider, i2c: windows_devices_i2c_provider.II2cControllerProvider, spi: windows_devices_spi_provider.ISpiControllerProvider) -> Self: ...
24
+ # Windows.Devices.Adc.Provider.IAdcControllerProvider Windows.Devices.LowLevelDevicesAggregateProvider::get_AdcControllerProvider()
25
+ @_property
26
+ def adc_controller_provider(self) -> windows_devices_adc_provider.IAdcControllerProvider: ...
27
+ # Windows.Devices.Gpio.Provider.IGpioControllerProvider Windows.Devices.LowLevelDevicesAggregateProvider::get_GpioControllerProvider()
28
+ @_property
29
+ def gpio_controller_provider(self) -> windows_devices_gpio_provider.IGpioControllerProvider: ...
30
+ # Windows.Devices.I2c.Provider.II2cControllerProvider Windows.Devices.LowLevelDevicesAggregateProvider::get_I2cControllerProvider()
31
+ @_property
32
+ def i2c_controller_provider(self) -> windows_devices_i2c_provider.II2cControllerProvider: ...
33
+ # Windows.Devices.Pwm.Provider.IPwmControllerProvider Windows.Devices.LowLevelDevicesAggregateProvider::get_PwmControllerProvider()
34
+ @_property
35
+ def pwm_controller_provider(self) -> windows_devices_pwm_provider.IPwmControllerProvider: ...
36
+ # Windows.Devices.Spi.Provider.ISpiControllerProvider Windows.Devices.LowLevelDevicesAggregateProvider::get_SpiControllerProvider()
37
+ @_property
38
+ def spi_controller_provider(self) -> windows_devices_spi_provider.ISpiControllerProvider: ...
39
+
40
+ @typing.final
41
+ class LowLevelDevicesController_Static(winrt._winrt.IInspectable_Static):
42
+ # Windows.Devices.ILowLevelDevicesAggregateProvider Windows.Devices.LowLevelDevicesController::get_DefaultProvider()
43
+ @_property
44
+ def default_provider(cls) -> ILowLevelDevicesAggregateProvider: ...
45
+ # System.Void Windows.Devices.LowLevelDevicesController::put_DefaultProvider(Windows.Devices.ILowLevelDevicesAggregateProvider)
46
+ @default_provider.setter
47
+ def default_provider(cls, value: ILowLevelDevicesAggregateProvider) -> None: ...
48
+
49
+ @typing.final
50
+ class LowLevelDevicesController(winrt.system.Object, metaclass=LowLevelDevicesController_Static):
51
+ pass
52
+
53
+ @typing.final
54
+ class _ILowLevelDevicesAggregateProvider: ...
55
+
56
+ class ILowLevelDevicesAggregateProvider(winrt._winrt.IInspectable):
57
+ # Windows.Devices.Adc.Provider.IAdcControllerProvider Windows.Devices.ILowLevelDevicesAggregateProvider::get_AdcControllerProvider()
58
+ @_property
59
+ @abstractmethod
60
+ def adc_controller_provider(self) -> windows_devices_adc_provider.IAdcControllerProvider: ...
61
+ # Windows.Devices.Gpio.Provider.IGpioControllerProvider Windows.Devices.ILowLevelDevicesAggregateProvider::get_GpioControllerProvider()
62
+ @_property
63
+ @abstractmethod
64
+ def gpio_controller_provider(self) -> windows_devices_gpio_provider.IGpioControllerProvider: ...
65
+ # Windows.Devices.I2c.Provider.II2cControllerProvider Windows.Devices.ILowLevelDevicesAggregateProvider::get_I2cControllerProvider()
66
+ @_property
67
+ @abstractmethod
68
+ def i2c_controller_provider(self) -> windows_devices_i2c_provider.II2cControllerProvider: ...
69
+ # Windows.Devices.Pwm.Provider.IPwmControllerProvider Windows.Devices.ILowLevelDevicesAggregateProvider::get_PwmControllerProvider()
70
+ @_property
71
+ @abstractmethod
72
+ def pwm_controller_provider(self) -> windows_devices_pwm_provider.IPwmControllerProvider: ...
73
+ # Windows.Devices.Spi.Provider.ISpiControllerProvider Windows.Devices.ILowLevelDevicesAggregateProvider::get_SpiControllerProvider()
74
+ @_property
75
+ @abstractmethod
76
+ def spi_controller_provider(self) -> windows_devices_spi_provider.ISpiControllerProvider: ...
77
+
@@ -0,0 +1,16 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
2
+
3
+ import winrt.system
4
+ from winrt._winrt_windows_devices import (
5
+ LowLevelDevicesAggregateProvider,
6
+ LowLevelDevicesController,
7
+ _ILowLevelDevicesAggregateProvider,
8
+ ILowLevelDevicesAggregateProvider,
9
+ )
10
+
11
+ __all__ = [
12
+ "LowLevelDevicesAggregateProvider",
13
+ "LowLevelDevicesController",
14
+ "ILowLevelDevicesAggregateProvider",
15
+ ]
16
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Devices
3
- Version: 2.2.0
3
+ Version: 3.0.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.14,>=3.9
13
+ Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.2.0
15
+ Requires-Dist: winrt-runtime==3.0.0
16
16
  Provides-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"
17
+ Requires-Dist: winrt-Windows.Devices.Adc.Provider[all]==3.0.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Devices.Gpio.Provider[all]==3.0.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Devices.I2c.Provider[all]==3.0.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Devices.Pwm.Provider[all]==3.0.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Devices.Spi.Provider[all]==3.0.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==3.0.0
2
+
3
+ [all]
4
+ winrt-Windows.Devices.Adc.Provider[all]==3.0.0
5
+ winrt-Windows.Devices.Gpio.Provider[all]==3.0.0
6
+ winrt-Windows.Devices.I2c.Provider[all]==3.0.0
7
+ winrt-Windows.Devices.Pwm.Provider[all]==3.0.0
8
+ winrt-Windows.Devices.Spi.Provider[all]==3.0.0
@@ -1,7 +0,0 @@
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 +0,0 @@
1
- 2.2.0
@@ -1,62 +0,0 @@
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,14 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
-
3
- import winrt.system
4
- from winrt import _winrt_windows_devices
5
-
6
- __all__ = [
7
- "LowLevelDevicesAggregateProvider",
8
- "LowLevelDevicesController",
9
- "ILowLevelDevicesAggregateProvider",
10
- ]
11
-
12
- LowLevelDevicesAggregateProvider = _winrt_windows_devices.LowLevelDevicesAggregateProvider
13
- LowLevelDevicesController = _winrt_windows_devices.LowLevelDevicesController
14
- ILowLevelDevicesAggregateProvider = _winrt_windows_devices.ILowLevelDevicesAggregateProvider
@@ -1,8 +0,0 @@
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