winrt-Windows.System.Diagnostics.TraceReporting 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 (19) hide show
  1. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/PKG-INFO +4 -4
  2. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/all-requirements.txt +2 -2
  3. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/py.Windows.System.Diagnostics.TraceReporting.cpp +238 -134
  4. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_system_diagnostics_tracereporting-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt/_winrt_windows_system_diagnostics_tracereporting.pyi +6 -7
  8. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt/windows/system/diagnostics/tracereporting/__init__.py +1 -1
  9. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/PKG-INFO +4 -4
  10. winrt_windows_system_diagnostics_tracereporting-2.2.0/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/requires.txt +4 -0
  11. winrt_windows_system_diagnostics_tracereporting-2.0.1/pywinrt-version.txt +0 -1
  12. winrt_windows_system_diagnostics_tracereporting-2.0.1/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/requires.txt +0 -4
  13. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/README.md +0 -0
  14. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/setup.cfg +0 -0
  15. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/setup.py +0 -0
  16. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt/windows/system/diagnostics/tracereporting/py.typed +0 -0
  17. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/SOURCES.txt +0 -0
  18. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/dependency_links.txt +0 -0
  19. {winrt_windows_system_diagnostics_tracereporting-2.0.1 → winrt_windows_system_diagnostics_tracereporting-2.2.0}/winrt_Windows.System.Diagnostics.TraceReporting.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Diagnostics.TraceReporting
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,11 +10,11 @@ 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.Foundation.Collections[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -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-Windows.Foundation.Collections[all]==2.0.1
3
+ winrt-Windows.Foundation.Collections[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.System.Diagnostics.TraceReporting.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Diagnostics::TraceReporting
7
6
  {
8
7
  // ----- PlatformDiagnosticActions class --------------------
@@ -20,14 +19,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
20
19
 
21
20
  if (arg_count == 5)
22
21
  {
23
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"DownloadLatestSettingsForNamespace", 5))
24
- {
25
- py::set_arg_count_version_error(5);
26
- return nullptr;
27
- }
28
-
29
22
  try
30
23
  {
24
+ static std::optional<bool> is_overload_present{};
25
+
26
+ if (!is_overload_present.has_value())
27
+ {
28
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"DownloadLatestSettingsForNamespace", 5);
29
+ }
30
+
31
+ if (!is_overload_present.value())
32
+ {
33
+ py::set_arg_count_version_error(5);
34
+ return nullptr;
35
+ }
36
+
31
37
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
32
38
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
33
39
  auto param2 = py::convert_to<bool>(args, 2);
@@ -55,14 +61,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
55
61
 
56
62
  if (arg_count == 3)
57
63
  {
58
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"ForceUpload", 3))
59
- {
60
- py::set_arg_count_version_error(3);
61
- return nullptr;
62
- }
63
-
64
64
  try
65
65
  {
66
+ static std::optional<bool> is_overload_present{};
67
+
68
+ if (!is_overload_present.has_value())
69
+ {
70
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"ForceUpload", 3);
71
+ }
72
+
73
+ if (!is_overload_present.value())
74
+ {
75
+ py::set_arg_count_version_error(3);
76
+ return nullptr;
77
+ }
78
+
66
79
  auto param0 = py::convert_to<winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticEventBufferLatencies>(args, 0);
67
80
  auto param1 = py::convert_to<bool>(args, 1);
68
81
  auto param2 = py::convert_to<bool>(args, 2);
@@ -88,14 +101,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
88
101
 
89
102
  if (arg_count == 0)
90
103
  {
91
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetActiveScenarioList", 0))
92
- {
93
- py::set_arg_count_version_error(0);
94
- return nullptr;
95
- }
96
-
97
104
  try
98
105
  {
106
+ static std::optional<bool> is_overload_present{};
107
+
108
+ if (!is_overload_present.has_value())
109
+ {
110
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetActiveScenarioList", 0);
111
+ }
112
+
113
+ if (!is_overload_present.value())
114
+ {
115
+ py::set_arg_count_version_error(0);
116
+ return nullptr;
117
+ }
118
+
99
119
  return py::convert(winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticActions::GetActiveScenarioList());
100
120
  }
101
121
  catch (...)
@@ -117,14 +137,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
117
137
 
118
138
  if (arg_count == 1)
119
139
  {
120
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetActiveTraceRuntime", 1))
121
- {
122
- py::set_arg_count_version_error(1);
123
- return nullptr;
124
- }
125
-
126
140
  try
127
141
  {
142
+ static std::optional<bool> is_overload_present{};
143
+
144
+ if (!is_overload_present.has_value())
145
+ {
146
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetActiveTraceRuntime", 1);
147
+ }
148
+
149
+ if (!is_overload_present.value())
150
+ {
151
+ py::set_arg_count_version_error(1);
152
+ return nullptr;
153
+ }
154
+
128
155
  auto param0 = py::convert_to<winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceSlotType>(args, 0);
129
156
 
130
157
  return py::convert(winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticActions::GetActiveTraceRuntime(param0));
@@ -148,14 +175,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
148
175
 
149
176
  if (arg_count == 1)
150
177
  {
151
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetKnownTraceList", 1))
152
- {
153
- py::set_arg_count_version_error(1);
154
- return nullptr;
155
- }
156
-
157
178
  try
158
179
  {
180
+ static std::optional<bool> is_overload_present{};
181
+
182
+ if (!is_overload_present.has_value())
183
+ {
184
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"GetKnownTraceList", 1);
185
+ }
186
+
187
+ if (!is_overload_present.value())
188
+ {
189
+ py::set_arg_count_version_error(1);
190
+ return nullptr;
191
+ }
192
+
159
193
  auto param0 = py::convert_to<winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceSlotType>(args, 0);
160
194
 
161
195
  return py::convert(winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticActions::GetKnownTraceList(param0));
@@ -179,14 +213,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
179
213
 
180
214
  if (arg_count == 1)
181
215
  {
182
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"IsScenarioEnabled", 1))
183
- {
184
- py::set_arg_count_version_error(1);
185
- return nullptr;
186
- }
187
-
188
216
  try
189
217
  {
218
+ static std::optional<bool> is_overload_present{};
219
+
220
+ if (!is_overload_present.has_value())
221
+ {
222
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"IsScenarioEnabled", 1);
223
+ }
224
+
225
+ if (!is_overload_present.value())
226
+ {
227
+ py::set_arg_count_version_error(1);
228
+ return nullptr;
229
+ }
230
+
190
231
  auto param0 = py::convert_to<winrt::guid>(args, 0);
191
232
 
192
233
  return py::convert(winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticActions::IsScenarioEnabled(param0));
@@ -210,14 +251,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
210
251
 
211
252
  if (arg_count == 3)
212
253
  {
213
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"IsTraceRunning", 3))
214
- {
215
- py::set_arg_count_version_error(3);
216
- return nullptr;
217
- }
218
-
219
254
  try
220
255
  {
256
+ static std::optional<bool> is_overload_present{};
257
+
258
+ if (!is_overload_present.has_value())
259
+ {
260
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"IsTraceRunning", 3);
261
+ }
262
+
263
+ if (!is_overload_present.value())
264
+ {
265
+ py::set_arg_count_version_error(3);
266
+ return nullptr;
267
+ }
268
+
221
269
  auto param0 = py::convert_to<winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceSlotType>(args, 0);
222
270
  auto param1 = py::convert_to<winrt::guid>(args, 1);
223
271
  auto param2 = py::convert_to<uint64_t>(args, 2);
@@ -243,14 +291,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
243
291
 
244
292
  if (arg_count == 6)
245
293
  {
246
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"TryEscalateScenario", 6))
247
- {
248
- py::set_arg_count_version_error(6);
249
- return nullptr;
250
- }
251
-
252
294
  try
253
295
  {
296
+ static std::optional<bool> is_overload_present{};
297
+
298
+ if (!is_overload_present.has_value())
299
+ {
300
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticActions", L"TryEscalateScenario", 6);
301
+ }
302
+
303
+ if (!is_overload_present.value())
304
+ {
305
+ py::set_arg_count_version_error(6);
306
+ return nullptr;
307
+ }
308
+
254
309
  auto param0 = py::convert_to<winrt::guid>(args, 0);
255
310
  auto param1 = py::convert_to<winrt::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticEscalationType>(args, 1);
256
311
  auto param2 = py::convert_to<winrt::hstring>(args, 2);
@@ -281,22 +336,19 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
281
336
  { }
282
337
  };
283
338
 
284
- static PyType_Slot _type_slots_PlatformDiagnosticActions[] =
285
- {
339
+ static PyType_Slot _type_slots_PlatformDiagnosticActions[] = {
286
340
  { Py_tp_new, reinterpret_cast<void*>(_new_PlatformDiagnosticActions) },
287
341
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PlatformDiagnosticActions) },
288
342
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PlatformDiagnosticActions) },
289
- { },
343
+ { }
290
344
  };
291
345
 
292
- static PyType_Spec type_spec_PlatformDiagnosticActions =
293
- {
346
+ static PyType_Spec type_spec_PlatformDiagnosticActions = {
294
347
  "winrt._winrt_windows_system_diagnostics_tracereporting.PlatformDiagnosticActions",
295
348
  0,
296
349
  0,
297
350
  Py_TPFLAGS_DEFAULT,
298
- _type_slots_PlatformDiagnosticActions
299
- };
351
+ _type_slots_PlatformDiagnosticActions};
300
352
 
301
353
  static PyGetSetDef getset_PlatformDiagnosticActions_Static[] = {
302
354
  { }
@@ -350,14 +402,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
350
402
 
351
403
  static PyObject* PlatformDiagnosticTraceInfo_get_IsAutoLogger(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
352
404
  {
353
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"IsAutoLogger"))
354
- {
355
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
356
- return nullptr;
357
- }
358
-
359
405
  try
360
406
  {
407
+ static std::optional<bool> is_property_present{};
408
+
409
+ if (!is_property_present.has_value())
410
+ {
411
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"IsAutoLogger");
412
+ }
413
+
414
+ if (!is_property_present.value())
415
+ {
416
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
417
+ return nullptr;
418
+ }
419
+
361
420
  return py::convert(self->obj.IsAutoLogger());
362
421
  }
363
422
  catch (...)
@@ -369,14 +428,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
369
428
 
370
429
  static PyObject* PlatformDiagnosticTraceInfo_get_IsExclusive(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
371
430
  {
372
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"IsExclusive"))
373
- {
374
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
375
- return nullptr;
376
- }
377
-
378
431
  try
379
432
  {
433
+ static std::optional<bool> is_property_present{};
434
+
435
+ if (!is_property_present.has_value())
436
+ {
437
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"IsExclusive");
438
+ }
439
+
440
+ if (!is_property_present.value())
441
+ {
442
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
443
+ return nullptr;
444
+ }
445
+
380
446
  return py::convert(self->obj.IsExclusive());
381
447
  }
382
448
  catch (...)
@@ -388,14 +454,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
388
454
 
389
455
  static PyObject* PlatformDiagnosticTraceInfo_get_MaxTraceDurationFileTime(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
390
456
  {
391
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"MaxTraceDurationFileTime"))
392
- {
393
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
394
- return nullptr;
395
- }
396
-
397
457
  try
398
458
  {
459
+ static std::optional<bool> is_property_present{};
460
+
461
+ if (!is_property_present.has_value())
462
+ {
463
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"MaxTraceDurationFileTime");
464
+ }
465
+
466
+ if (!is_property_present.value())
467
+ {
468
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
469
+ return nullptr;
470
+ }
471
+
399
472
  return py::convert(self->obj.MaxTraceDurationFileTime());
400
473
  }
401
474
  catch (...)
@@ -407,14 +480,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
407
480
 
408
481
  static PyObject* PlatformDiagnosticTraceInfo_get_Priority(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
409
482
  {
410
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"Priority"))
411
- {
412
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
413
- return nullptr;
414
- }
415
-
416
483
  try
417
484
  {
485
+ static std::optional<bool> is_property_present{};
486
+
487
+ if (!is_property_present.has_value())
488
+ {
489
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"Priority");
490
+ }
491
+
492
+ if (!is_property_present.value())
493
+ {
494
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
495
+ return nullptr;
496
+ }
497
+
418
498
  return py::convert(self->obj.Priority());
419
499
  }
420
500
  catch (...)
@@ -426,14 +506,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
426
506
 
427
507
  static PyObject* PlatformDiagnosticTraceInfo_get_ProfileHash(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
428
508
  {
429
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"ProfileHash"))
430
- {
431
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
432
- return nullptr;
433
- }
434
-
435
509
  try
436
510
  {
511
+ static std::optional<bool> is_property_present{};
512
+
513
+ if (!is_property_present.has_value())
514
+ {
515
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"ProfileHash");
516
+ }
517
+
518
+ if (!is_property_present.value())
519
+ {
520
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
521
+ return nullptr;
522
+ }
523
+
437
524
  return py::convert(self->obj.ProfileHash());
438
525
  }
439
526
  catch (...)
@@ -445,14 +532,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
445
532
 
446
533
  static PyObject* PlatformDiagnosticTraceInfo_get_ScenarioId(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo* self, void* /*unused*/) noexcept
447
534
  {
448
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"ScenarioId"))
449
- {
450
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
451
- return nullptr;
452
- }
453
-
454
535
  try
455
536
  {
537
+ static std::optional<bool> is_property_present{};
538
+
539
+ if (!is_property_present.has_value())
540
+ {
541
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceInfo", L"ScenarioId");
542
+ }
543
+
544
+ if (!is_property_present.value())
545
+ {
546
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
547
+ return nullptr;
548
+ }
549
+
456
550
  return py::convert(self->obj.ScenarioId());
457
551
  }
458
552
  catch (...)
@@ -502,23 +596,20 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
502
596
  { }
503
597
  };
504
598
 
505
- static PyType_Slot _type_slots_PlatformDiagnosticTraceInfo[] =
506
- {
599
+ static PyType_Slot _type_slots_PlatformDiagnosticTraceInfo[] = {
507
600
  { Py_tp_new, reinterpret_cast<void*>(_new_PlatformDiagnosticTraceInfo) },
508
601
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PlatformDiagnosticTraceInfo) },
509
602
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PlatformDiagnosticTraceInfo) },
510
603
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PlatformDiagnosticTraceInfo) },
511
- { },
604
+ { }
512
605
  };
513
606
 
514
- static PyType_Spec type_spec_PlatformDiagnosticTraceInfo =
515
- {
607
+ static PyType_Spec type_spec_PlatformDiagnosticTraceInfo = {
516
608
  "winrt._winrt_windows_system_diagnostics_tracereporting.PlatformDiagnosticTraceInfo",
517
609
  sizeof(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceInfo),
518
610
  0,
519
611
  Py_TPFLAGS_DEFAULT,
520
- _type_slots_PlatformDiagnosticTraceInfo
521
- };
612
+ _type_slots_PlatformDiagnosticTraceInfo};
522
613
 
523
614
  // ----- PlatformDiagnosticTraceRuntimeInfo class --------------------
524
615
 
@@ -539,14 +630,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
539
630
 
540
631
  static PyObject* PlatformDiagnosticTraceRuntimeInfo_get_EtwRuntimeFileTime(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceRuntimeInfo* self, void* /*unused*/) noexcept
541
632
  {
542
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceRuntimeInfo", L"EtwRuntimeFileTime"))
543
- {
544
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
545
- return nullptr;
546
- }
547
-
548
633
  try
549
634
  {
635
+ static std::optional<bool> is_property_present{};
636
+
637
+ if (!is_property_present.has_value())
638
+ {
639
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceRuntimeInfo", L"EtwRuntimeFileTime");
640
+ }
641
+
642
+ if (!is_property_present.value())
643
+ {
644
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
645
+ return nullptr;
646
+ }
647
+
550
648
  return py::convert(self->obj.EtwRuntimeFileTime());
551
649
  }
552
650
  catch (...)
@@ -558,14 +656,21 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
558
656
 
559
657
  static PyObject* PlatformDiagnosticTraceRuntimeInfo_get_RuntimeFileTime(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceRuntimeInfo* self, void* /*unused*/) noexcept
560
658
  {
561
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceRuntimeInfo", L"RuntimeFileTime"))
562
- {
563
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
564
- return nullptr;
565
- }
566
-
567
659
  try
568
660
  {
661
+ static std::optional<bool> is_property_present{};
662
+
663
+ if (!is_property_present.has_value())
664
+ {
665
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Diagnostics.TraceReporting.PlatformDiagnosticTraceRuntimeInfo", L"RuntimeFileTime");
666
+ }
667
+
668
+ if (!is_property_present.value())
669
+ {
670
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
671
+ return nullptr;
672
+ }
673
+
569
674
  return py::convert(self->obj.RuntimeFileTime());
570
675
  }
571
676
  catch (...)
@@ -611,39 +716,35 @@ namespace py::cpp::Windows::System::Diagnostics::TraceReporting
611
716
  { }
612
717
  };
613
718
 
614
- static PyType_Slot _type_slots_PlatformDiagnosticTraceRuntimeInfo[] =
615
- {
719
+ static PyType_Slot _type_slots_PlatformDiagnosticTraceRuntimeInfo[] = {
616
720
  { Py_tp_new, reinterpret_cast<void*>(_new_PlatformDiagnosticTraceRuntimeInfo) },
617
721
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PlatformDiagnosticTraceRuntimeInfo) },
618
722
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PlatformDiagnosticTraceRuntimeInfo) },
619
723
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PlatformDiagnosticTraceRuntimeInfo) },
620
- { },
724
+ { }
621
725
  };
622
726
 
623
- static PyType_Spec type_spec_PlatformDiagnosticTraceRuntimeInfo =
624
- {
727
+ static PyType_Spec type_spec_PlatformDiagnosticTraceRuntimeInfo = {
625
728
  "winrt._winrt_windows_system_diagnostics_tracereporting.PlatformDiagnosticTraceRuntimeInfo",
626
729
  sizeof(py::wrapper::Windows::System::Diagnostics::TraceReporting::PlatformDiagnosticTraceRuntimeInfo),
627
730
  0,
628
731
  Py_TPFLAGS_DEFAULT,
629
- _type_slots_PlatformDiagnosticTraceRuntimeInfo
630
- };
732
+ _type_slots_PlatformDiagnosticTraceRuntimeInfo};
631
733
 
632
734
  // ----- Windows.System.Diagnostics.TraceReporting Initialization --------------------
633
- PyDoc_STRVAR(module_doc, "Windows::System::Diagnostics::TraceReporting");
634
735
 
736
+ PyDoc_STRVAR(module_doc, "Windows.System.Diagnostics.TraceReporting");
635
737
 
636
- static PyModuleDef module_def
637
- = {PyModuleDef_HEAD_INIT,
638
- "_winrt_windows_system_diagnostics_tracereporting",
639
- module_doc,
640
- 0,
641
- nullptr,
642
- nullptr,
643
- nullptr,
644
- nullptr,
645
- nullptr};
646
-
738
+ static PyModuleDef module_def = {
739
+ PyModuleDef_HEAD_INIT,
740
+ "_winrt_windows_system_diagnostics_tracereporting",
741
+ module_doc,
742
+ 0,
743
+ nullptr,
744
+ nullptr,
745
+ nullptr,
746
+ nullptr,
747
+ nullptr};
647
748
  } // py::cpp::Windows::System::Diagnostics::TraceReporting
648
749
 
649
750
  PyMODINIT_FUNC PyInit__winrt_windows_system_diagnostics_tracereporting(void) noexcept
@@ -681,17 +782,20 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_diagnostics_tracereporting(void) noe
681
782
  return nullptr;
682
783
  }
683
784
 
684
- if (py::register_python_type(module.get(), &type_spec_PlatformDiagnosticActions, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PlatformDiagnosticActions_Static.get())) == -1)
785
+ py::pytype_handle PlatformDiagnosticActions_type{py::register_python_type(module.get(), &type_spec_PlatformDiagnosticActions, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PlatformDiagnosticActions_Static.get()))};
786
+ if (!PlatformDiagnosticActions_type)
685
787
  {
686
788
  return nullptr;
687
789
  }
688
790
 
689
- if (py::register_python_type(module.get(), &type_spec_PlatformDiagnosticTraceInfo, object_bases.get(), nullptr) == -1)
791
+ py::pytype_handle PlatformDiagnosticTraceInfo_type{py::register_python_type(module.get(), &type_spec_PlatformDiagnosticTraceInfo, object_bases.get(), nullptr)};
792
+ if (!PlatformDiagnosticTraceInfo_type)
690
793
  {
691
794
  return nullptr;
692
795
  }
693
796
 
694
- if (py::register_python_type(module.get(), &type_spec_PlatformDiagnosticTraceRuntimeInfo, object_bases.get(), nullptr) == -1)
797
+ py::pytype_handle PlatformDiagnosticTraceRuntimeInfo_type{py::register_python_type(module.get(), &type_spec_PlatformDiagnosticTraceRuntimeInfo, object_bases.get(), nullptr)};
798
+ if (!PlatformDiagnosticTraceRuntimeInfo_type)
695
799
  {
696
800
  return nullptr;
697
801
  }
@@ -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
@@ -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
@@ -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 datetime
4
4
  import sys
@@ -9,7 +9,7 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation.collections
12
+ import winrt.windows.foundation.collections as windows_foundation_collections
13
13
 
14
14
  from winrt.windows.system.diagnostics.tracereporting import PlatformDiagnosticActionState, PlatformDiagnosticEscalationType, PlatformDiagnosticEventBufferLatencies, PlatformDiagnosticTracePriority, PlatformDiagnosticTraceSlotState, PlatformDiagnosticTraceSlotType
15
15
 
@@ -19,17 +19,16 @@ Self = typing.TypeVar('Self')
19
19
  class PlatformDiagnosticActions_Static(type):
20
20
  def download_latest_settings_for_namespace(cls, partner: str, feature: str, is_scenario_namespace: bool, download_over_costed_network: bool, download_over_battery: bool, /) -> PlatformDiagnosticActionState: ...
21
21
  def force_upload(cls, latency: PlatformDiagnosticEventBufferLatencies, upload_over_costed_network: bool, upload_over_battery: bool, /) -> PlatformDiagnosticActionState: ...
22
- def get_active_scenario_list(cls) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[_uuid.UUID]]: ...
22
+ def get_active_scenario_list(cls) -> typing.Optional[windows_foundation_collections.IVectorView[_uuid.UUID]]: ...
23
23
  def get_active_trace_runtime(cls, slot_type: PlatformDiagnosticTraceSlotType, /) -> typing.Optional[PlatformDiagnosticTraceRuntimeInfo]: ...
24
- def get_known_trace_list(cls, slot_type: PlatformDiagnosticTraceSlotType, /) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[PlatformDiagnosticTraceInfo]]: ...
24
+ def get_known_trace_list(cls, slot_type: PlatformDiagnosticTraceSlotType, /) -> typing.Optional[windows_foundation_collections.IVectorView[PlatformDiagnosticTraceInfo]]: ...
25
25
  def is_scenario_enabled(cls, scenario_id: _uuid.UUID, /) -> bool: ...
26
26
  def is_trace_running(cls, slot_type: PlatformDiagnosticTraceSlotType, scenario_id: _uuid.UUID, trace_profile_hash: winrt.system.UInt64, /) -> PlatformDiagnosticTraceSlotState: ...
27
- def try_escalate_scenario(cls, scenario_id: _uuid.UUID, escalation_type: PlatformDiagnosticEscalationType, output_directory: str, timestamp_output_directory: bool, force_escalation_upload: bool, triggers: winrt.windows.foundation.collections.IMapView[str, str], /) -> bool: ...
27
+ def try_escalate_scenario(cls, scenario_id: _uuid.UUID, escalation_type: PlatformDiagnosticEscalationType, output_directory: str, timestamp_output_directory: bool, force_escalation_upload: bool, triggers: windows_foundation_collections.IMapView[str, str], /) -> bool: ...
28
28
 
29
29
  @typing.final
30
30
  class PlatformDiagnosticActions(winrt.system.Object, metaclass=PlatformDiagnosticActions_Static):
31
- @staticmethod
32
- def _from(obj: winrt.system.Object, /) -> PlatformDiagnosticActions: ...
31
+ pass
33
32
 
34
33
  @typing.final
35
34
  class PlatformDiagnosticTraceInfo(winrt.system.Object):
@@ -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 enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Diagnostics.TraceReporting
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,11 +10,11 @@ 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.Foundation.Collections[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation.Collections[all]==2.2.0
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation.Collections[all]==2.0.1