winrt-Windows.Security.Authentication.Identity.Core 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 (20) hide show
  1. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/PKG-INFO +5 -5
  2. winrt_windows_security_authentication_identity_core-2.2.0/all-requirements.txt +4 -0
  3. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/py.Windows.Security.Authentication.Identity.Core.cpp +393 -216
  4. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_security_authentication_identity_core-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt/_winrt_windows_security_authentication_identity_core.pyi +16 -16
  8. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt/windows/security/authentication/identity/core/__init__.py +1 -1
  9. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt_Windows.Security.Authentication.Identity.Core.egg-info/PKG-INFO +5 -5
  10. winrt_windows_security_authentication_identity_core-2.2.0/winrt_Windows.Security.Authentication.Identity.Core.egg-info/requires.txt +5 -0
  11. winrt_windows_security_authentication_identity_core-2.0.1/all-requirements.txt +0 -4
  12. winrt_windows_security_authentication_identity_core-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_security_authentication_identity_core-2.0.1/winrt_Windows.Security.Authentication.Identity.Core.egg-info/requires.txt +0 -5
  14. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/README.md +0 -0
  15. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/setup.py +0 -0
  17. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt/windows/security/authentication/identity/core/py.typed +0 -0
  18. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt_Windows.Security.Authentication.Identity.Core.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt_Windows.Security.Authentication.Identity.Core.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_security_authentication_identity_core-2.0.1 → winrt_windows_security_authentication_identity_core-2.2.0}/winrt_Windows.Security.Authentication.Identity.Core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Security.Authentication.Identity.Core
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,12 +10,12 @@ 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[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
19
19
 
20
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
21
21
 
@@ -0,0 +1,4 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
+
3
+ winrt-Windows.Foundation[all]==2.2.0
4
+ 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.Security.Authentication.Identity.Core.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Security::Authentication::Identity::Core
7
6
  {
8
7
  // ----- MicrosoftAccountMultiFactorAuthenticationManager class --------------------
@@ -28,14 +27,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
28
27
 
29
28
  if (arg_count == 3)
30
29
  {
31
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"AddDeviceAsync", 3))
32
- {
33
- py::set_arg_count_version_error(3);
34
- return nullptr;
35
- }
36
-
37
30
  try
38
31
  {
32
+ static std::optional<bool> is_overload_present{};
33
+
34
+ if (!is_overload_present.has_value())
35
+ {
36
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"AddDeviceAsync", 3);
37
+ }
38
+
39
+ if (!is_overload_present.value())
40
+ {
41
+ py::set_arg_count_version_error(3);
42
+ return nullptr;
43
+ }
44
+
39
45
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
40
46
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
41
47
  auto param2 = py::convert_to<winrt::hstring>(args, 2);
@@ -61,14 +67,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
61
67
 
62
68
  if (arg_count == 2)
63
69
  {
64
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"ApproveSessionAsync", 2))
65
- {
66
- py::set_arg_count_version_error(2);
67
- return nullptr;
68
- }
69
-
70
70
  try
71
71
  {
72
+ static std::optional<bool> is_overload_present{};
73
+
74
+ if (!is_overload_present.has_value())
75
+ {
76
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"ApproveSessionAsync", 2);
77
+ }
78
+
79
+ if (!is_overload_present.value())
80
+ {
81
+ py::set_arg_count_version_error(2);
82
+ return nullptr;
83
+ }
84
+
72
85
  auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus>(args, 0);
73
86
  auto param1 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo>(args, 1);
74
87
 
@@ -82,14 +95,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
82
95
  }
83
96
  else if (arg_count == 4)
84
97
  {
85
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"ApproveSessionAsync", 4))
86
- {
87
- py::set_arg_count_version_error(4);
88
- return nullptr;
89
- }
90
-
91
98
  try
92
99
  {
100
+ static std::optional<bool> is_overload_present{};
101
+
102
+ if (!is_overload_present.has_value())
103
+ {
104
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"ApproveSessionAsync", 4);
105
+ }
106
+
107
+ if (!is_overload_present.value())
108
+ {
109
+ py::set_arg_count_version_error(4);
110
+ return nullptr;
111
+ }
112
+
93
113
  auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionAuthenticationStatus>(args, 0);
94
114
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
95
115
  auto param2 = py::convert_to<winrt::hstring>(args, 2);
@@ -116,14 +136,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
116
136
 
117
137
  if (arg_count == 1)
118
138
  {
119
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"DenySessionAsync", 1))
120
- {
121
- py::set_arg_count_version_error(1);
122
- return nullptr;
123
- }
124
-
125
139
  try
126
140
  {
141
+ static std::optional<bool> is_overload_present{};
142
+
143
+ if (!is_overload_present.has_value())
144
+ {
145
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"DenySessionAsync", 1);
146
+ }
147
+
148
+ if (!is_overload_present.value())
149
+ {
150
+ py::set_arg_count_version_error(1);
151
+ return nullptr;
152
+ }
153
+
127
154
  auto param0 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo>(args, 0);
128
155
 
129
156
  return py::convert(self->obj.DenySessionAsync(param0));
@@ -136,14 +163,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
136
163
  }
137
164
  else if (arg_count == 3)
138
165
  {
139
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"DenySessionAsync", 3))
140
- {
141
- py::set_arg_count_version_error(3);
142
- return nullptr;
143
- }
144
-
145
166
  try
146
167
  {
168
+ static std::optional<bool> is_overload_present{};
169
+
170
+ if (!is_overload_present.has_value())
171
+ {
172
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"DenySessionAsync", 3);
173
+ }
174
+
175
+ if (!is_overload_present.value())
176
+ {
177
+ py::set_arg_count_version_error(3);
178
+ return nullptr;
179
+ }
180
+
147
181
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
148
182
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
149
183
  auto param2 = py::convert_to<winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationType>(args, 2);
@@ -169,14 +203,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
169
203
 
170
204
  if (arg_count == 2)
171
205
  {
172
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetOneTimePassCodeAsync", 2))
173
- {
174
- py::set_arg_count_version_error(2);
175
- return nullptr;
176
- }
177
-
178
206
  try
179
207
  {
208
+ static std::optional<bool> is_overload_present{};
209
+
210
+ if (!is_overload_present.has_value())
211
+ {
212
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetOneTimePassCodeAsync", 2);
213
+ }
214
+
215
+ if (!is_overload_present.value())
216
+ {
217
+ py::set_arg_count_version_error(2);
218
+ return nullptr;
219
+ }
220
+
180
221
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
181
222
  auto param1 = py::convert_to<uint32_t>(args, 1);
182
223
 
@@ -201,14 +242,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
201
242
 
202
243
  if (arg_count == 1)
203
244
  {
204
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetSessionsAndUnregisteredAccountsAsync", 1))
205
- {
206
- py::set_arg_count_version_error(1);
207
- return nullptr;
208
- }
209
-
210
245
  try
211
246
  {
247
+ static std::optional<bool> is_overload_present{};
248
+
249
+ if (!is_overload_present.has_value())
250
+ {
251
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetSessionsAndUnregisteredAccountsAsync", 1);
252
+ }
253
+
254
+ if (!is_overload_present.value())
255
+ {
256
+ py::set_arg_count_version_error(1);
257
+ return nullptr;
258
+ }
259
+
212
260
  auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);
213
261
 
214
262
  return py::convert(self->obj.GetSessionsAndUnregisteredAccountsAsync(param0));
@@ -232,14 +280,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
232
280
 
233
281
  if (arg_count == 1)
234
282
  {
235
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetSessionsAsync", 1))
236
- {
237
- py::set_arg_count_version_error(1);
238
- return nullptr;
239
- }
240
-
241
283
  try
242
284
  {
285
+ static std::optional<bool> is_overload_present{};
286
+
287
+ if (!is_overload_present.has_value())
288
+ {
289
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"GetSessionsAsync", 1);
290
+ }
291
+
292
+ if (!is_overload_present.value())
293
+ {
294
+ py::set_arg_count_version_error(1);
295
+ return nullptr;
296
+ }
297
+
243
298
  auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);
244
299
 
245
300
  return py::convert(self->obj.GetSessionsAsync(param0));
@@ -263,14 +318,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
263
318
 
264
319
  if (arg_count == 1)
265
320
  {
266
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"RemoveDeviceAsync", 1))
267
- {
268
- py::set_arg_count_version_error(1);
269
- return nullptr;
270
- }
271
-
272
321
  try
273
322
  {
323
+ static std::optional<bool> is_overload_present{};
324
+
325
+ if (!is_overload_present.has_value())
326
+ {
327
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"RemoveDeviceAsync", 1);
328
+ }
329
+
330
+ if (!is_overload_present.value())
331
+ {
332
+ py::set_arg_count_version_error(1);
333
+ return nullptr;
334
+ }
335
+
274
336
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
275
337
 
276
338
  return py::convert(self->obj.RemoveDeviceAsync(param0));
@@ -294,14 +356,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
294
356
 
295
357
  if (arg_count == 2)
296
358
  {
297
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"UpdateWnsChannelAsync", 2))
298
- {
299
- py::set_arg_count_version_error(2);
300
- return nullptr;
301
- }
302
-
303
359
  try
304
360
  {
361
+ static std::optional<bool> is_overload_present{};
362
+
363
+ if (!is_overload_present.has_value())
364
+ {
365
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"UpdateWnsChannelAsync", 2);
366
+ }
367
+
368
+ if (!is_overload_present.value())
369
+ {
370
+ py::set_arg_count_version_error(2);
371
+ return nullptr;
372
+ }
373
+
305
374
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
306
375
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
307
376
 
@@ -322,14 +391,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
322
391
 
323
392
  static PyObject* MicrosoftAccountMultiFactorAuthenticationManager_get_Current(PyObject* /*unused*/, void* /*unused*/) noexcept
324
393
  {
325
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"Current"))
326
- {
327
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
328
- return nullptr;
329
- }
330
-
331
394
  try
332
395
  {
396
+ static std::optional<bool> is_property_present{};
397
+
398
+ if (!is_property_present.has_value())
399
+ {
400
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorAuthenticationManager", L"Current");
401
+ }
402
+
403
+ if (!is_property_present.value())
404
+ {
405
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
406
+ return nullptr;
407
+ }
408
+
333
409
  return py::convert(winrt::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager::Current());
334
410
  }
335
411
  catch (...)
@@ -381,23 +457,20 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
381
457
  { }
382
458
  };
383
459
 
384
- static PyType_Slot _type_slots_MicrosoftAccountMultiFactorAuthenticationManager[] =
385
- {
460
+ static PyType_Slot _type_slots_MicrosoftAccountMultiFactorAuthenticationManager[] = {
386
461
  { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorAuthenticationManager) },
387
462
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorAuthenticationManager) },
388
463
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorAuthenticationManager) },
389
464
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorAuthenticationManager) },
390
- { },
465
+ { }
391
466
  };
392
467
 
393
- static PyType_Spec type_spec_MicrosoftAccountMultiFactorAuthenticationManager =
394
- {
468
+ static PyType_Spec type_spec_MicrosoftAccountMultiFactorAuthenticationManager = {
395
469
  "winrt._winrt_windows_security_authentication_identity_core.MicrosoftAccountMultiFactorAuthenticationManager",
396
470
  sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorAuthenticationManager),
397
471
  0,
398
472
  Py_TPFLAGS_DEFAULT,
399
- _type_slots_MicrosoftAccountMultiFactorAuthenticationManager
400
- };
473
+ _type_slots_MicrosoftAccountMultiFactorAuthenticationManager};
401
474
 
402
475
  static PyGetSetDef getset_MicrosoftAccountMultiFactorAuthenticationManager_Static[] = {
403
476
  { "current", reinterpret_cast<getter>(MicrosoftAccountMultiFactorAuthenticationManager_get_Current), nullptr, nullptr, nullptr },
@@ -444,14 +517,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
444
517
 
445
518
  static PyObject* MicrosoftAccountMultiFactorGetSessionsResult_get_ServiceResponse(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult* self, void* /*unused*/) noexcept
446
519
  {
447
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorGetSessionsResult", L"ServiceResponse"))
448
- {
449
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
450
- return nullptr;
451
- }
452
-
453
520
  try
454
521
  {
522
+ static std::optional<bool> is_property_present{};
523
+
524
+ if (!is_property_present.has_value())
525
+ {
526
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorGetSessionsResult", L"ServiceResponse");
527
+ }
528
+
529
+ if (!is_property_present.value())
530
+ {
531
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
532
+ return nullptr;
533
+ }
534
+
455
535
  return py::convert(self->obj.ServiceResponse());
456
536
  }
457
537
  catch (...)
@@ -463,14 +543,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
463
543
 
464
544
  static PyObject* MicrosoftAccountMultiFactorGetSessionsResult_get_Sessions(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult* self, void* /*unused*/) noexcept
465
545
  {
466
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorGetSessionsResult", L"Sessions"))
467
- {
468
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
469
- return nullptr;
470
- }
471
-
472
546
  try
473
547
  {
548
+ static std::optional<bool> is_property_present{};
549
+
550
+ if (!is_property_present.has_value())
551
+ {
552
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorGetSessionsResult", L"Sessions");
553
+ }
554
+
555
+ if (!is_property_present.value())
556
+ {
557
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
558
+ return nullptr;
559
+ }
560
+
474
561
  return py::convert(self->obj.Sessions());
475
562
  }
476
563
  catch (...)
@@ -516,23 +603,20 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
516
603
  { }
517
604
  };
518
605
 
519
- static PyType_Slot _type_slots_MicrosoftAccountMultiFactorGetSessionsResult[] =
520
- {
606
+ static PyType_Slot _type_slots_MicrosoftAccountMultiFactorGetSessionsResult[] = {
521
607
  { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorGetSessionsResult) },
522
608
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorGetSessionsResult) },
523
609
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorGetSessionsResult) },
524
610
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorGetSessionsResult) },
525
- { },
611
+ { }
526
612
  };
527
613
 
528
- static PyType_Spec type_spec_MicrosoftAccountMultiFactorGetSessionsResult =
529
- {
614
+ static PyType_Spec type_spec_MicrosoftAccountMultiFactorGetSessionsResult = {
530
615
  "winrt._winrt_windows_security_authentication_identity_core.MicrosoftAccountMultiFactorGetSessionsResult",
531
616
  sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorGetSessionsResult),
532
617
  0,
533
618
  Py_TPFLAGS_DEFAULT,
534
- _type_slots_MicrosoftAccountMultiFactorGetSessionsResult
535
- };
619
+ _type_slots_MicrosoftAccountMultiFactorGetSessionsResult};
536
620
 
537
621
  // ----- MicrosoftAccountMultiFactorOneTimeCodedInfo class --------------------
538
622
 
@@ -553,14 +637,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
553
637
 
554
638
  static PyObject* MicrosoftAccountMultiFactorOneTimeCodedInfo_get_Code(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* self, void* /*unused*/) noexcept
555
639
  {
556
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"Code"))
557
- {
558
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
559
- return nullptr;
560
- }
561
-
562
640
  try
563
641
  {
642
+ static std::optional<bool> is_property_present{};
643
+
644
+ if (!is_property_present.has_value())
645
+ {
646
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"Code");
647
+ }
648
+
649
+ if (!is_property_present.value())
650
+ {
651
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
652
+ return nullptr;
653
+ }
654
+
564
655
  return py::convert(self->obj.Code());
565
656
  }
566
657
  catch (...)
@@ -572,14 +663,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
572
663
 
573
664
  static PyObject* MicrosoftAccountMultiFactorOneTimeCodedInfo_get_ServiceResponse(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* self, void* /*unused*/) noexcept
574
665
  {
575
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"ServiceResponse"))
576
- {
577
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
578
- return nullptr;
579
- }
580
-
581
666
  try
582
667
  {
668
+ static std::optional<bool> is_property_present{};
669
+
670
+ if (!is_property_present.has_value())
671
+ {
672
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"ServiceResponse");
673
+ }
674
+
675
+ if (!is_property_present.value())
676
+ {
677
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
678
+ return nullptr;
679
+ }
680
+
583
681
  return py::convert(self->obj.ServiceResponse());
584
682
  }
585
683
  catch (...)
@@ -591,14 +689,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
591
689
 
592
690
  static PyObject* MicrosoftAccountMultiFactorOneTimeCodedInfo_get_TimeInterval(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* self, void* /*unused*/) noexcept
593
691
  {
594
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"TimeInterval"))
595
- {
596
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
597
- return nullptr;
598
- }
599
-
600
692
  try
601
693
  {
694
+ static std::optional<bool> is_property_present{};
695
+
696
+ if (!is_property_present.has_value())
697
+ {
698
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"TimeInterval");
699
+ }
700
+
701
+ if (!is_property_present.value())
702
+ {
703
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
704
+ return nullptr;
705
+ }
706
+
602
707
  return py::convert(self->obj.TimeInterval());
603
708
  }
604
709
  catch (...)
@@ -610,14 +715,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
610
715
 
611
716
  static PyObject* MicrosoftAccountMultiFactorOneTimeCodedInfo_get_TimeToLive(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo* self, void* /*unused*/) noexcept
612
717
  {
613
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"TimeToLive"))
614
- {
615
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
616
- return nullptr;
617
- }
618
-
619
718
  try
620
719
  {
720
+ static std::optional<bool> is_property_present{};
721
+
722
+ if (!is_property_present.has_value())
723
+ {
724
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorOneTimeCodedInfo", L"TimeToLive");
725
+ }
726
+
727
+ if (!is_property_present.value())
728
+ {
729
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
730
+ return nullptr;
731
+ }
732
+
621
733
  return py::convert(self->obj.TimeToLive());
622
734
  }
623
735
  catch (...)
@@ -665,23 +777,20 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
665
777
  { }
666
778
  };
667
779
 
668
- static PyType_Slot _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo[] =
669
- {
780
+ static PyType_Slot _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo[] = {
670
781
  { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
671
782
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
672
783
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
673
784
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorOneTimeCodedInfo) },
674
- { },
785
+ { }
675
786
  };
676
787
 
677
- static PyType_Spec type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo =
678
- {
788
+ static PyType_Spec type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo = {
679
789
  "winrt._winrt_windows_security_authentication_identity_core.MicrosoftAccountMultiFactorOneTimeCodedInfo",
680
790
  sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorOneTimeCodedInfo),
681
791
  0,
682
792
  Py_TPFLAGS_DEFAULT,
683
- _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo
684
- };
793
+ _type_slots_MicrosoftAccountMultiFactorOneTimeCodedInfo};
685
794
 
686
795
  // ----- MicrosoftAccountMultiFactorSessionInfo class --------------------
687
796
 
@@ -702,14 +811,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
702
811
 
703
812
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_ApprovalStatus(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
704
813
  {
705
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"ApprovalStatus"))
706
- {
707
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
708
- return nullptr;
709
- }
710
-
711
814
  try
712
815
  {
816
+ static std::optional<bool> is_property_present{};
817
+
818
+ if (!is_property_present.has_value())
819
+ {
820
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"ApprovalStatus");
821
+ }
822
+
823
+ if (!is_property_present.value())
824
+ {
825
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
826
+ return nullptr;
827
+ }
828
+
713
829
  return py::convert(self->obj.ApprovalStatus());
714
830
  }
715
831
  catch (...)
@@ -721,14 +837,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
721
837
 
722
838
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_AuthenticationType(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
723
839
  {
724
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"AuthenticationType"))
725
- {
726
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
727
- return nullptr;
728
- }
729
-
730
840
  try
731
841
  {
842
+ static std::optional<bool> is_property_present{};
843
+
844
+ if (!is_property_present.has_value())
845
+ {
846
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"AuthenticationType");
847
+ }
848
+
849
+ if (!is_property_present.value())
850
+ {
851
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
852
+ return nullptr;
853
+ }
854
+
732
855
  return py::convert(self->obj.AuthenticationType());
733
856
  }
734
857
  catch (...)
@@ -740,14 +863,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
740
863
 
741
864
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_DisplaySessionId(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
742
865
  {
743
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"DisplaySessionId"))
744
- {
745
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
746
- return nullptr;
747
- }
748
-
749
866
  try
750
867
  {
868
+ static std::optional<bool> is_property_present{};
869
+
870
+ if (!is_property_present.has_value())
871
+ {
872
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"DisplaySessionId");
873
+ }
874
+
875
+ if (!is_property_present.value())
876
+ {
877
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
878
+ return nullptr;
879
+ }
880
+
751
881
  return py::convert(self->obj.DisplaySessionId());
752
882
  }
753
883
  catch (...)
@@ -759,14 +889,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
759
889
 
760
890
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_ExpirationTime(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
761
891
  {
762
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"ExpirationTime"))
763
- {
764
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
765
- return nullptr;
766
- }
767
-
768
892
  try
769
893
  {
894
+ static std::optional<bool> is_property_present{};
895
+
896
+ if (!is_property_present.has_value())
897
+ {
898
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"ExpirationTime");
899
+ }
900
+
901
+ if (!is_property_present.value())
902
+ {
903
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
904
+ return nullptr;
905
+ }
906
+
770
907
  return py::convert(self->obj.ExpirationTime());
771
908
  }
772
909
  catch (...)
@@ -778,14 +915,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
778
915
 
779
916
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_RequestTime(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
780
917
  {
781
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"RequestTime"))
782
- {
783
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
784
- return nullptr;
785
- }
786
-
787
918
  try
788
919
  {
920
+ static std::optional<bool> is_property_present{};
921
+
922
+ if (!is_property_present.has_value())
923
+ {
924
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"RequestTime");
925
+ }
926
+
927
+ if (!is_property_present.value())
928
+ {
929
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
930
+ return nullptr;
931
+ }
932
+
789
933
  return py::convert(self->obj.RequestTime());
790
934
  }
791
935
  catch (...)
@@ -797,14 +941,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
797
941
 
798
942
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_SessionId(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
799
943
  {
800
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"SessionId"))
801
- {
802
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
803
- return nullptr;
804
- }
805
-
806
944
  try
807
945
  {
946
+ static std::optional<bool> is_property_present{};
947
+
948
+ if (!is_property_present.has_value())
949
+ {
950
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"SessionId");
951
+ }
952
+
953
+ if (!is_property_present.value())
954
+ {
955
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
956
+ return nullptr;
957
+ }
958
+
808
959
  return py::convert(self->obj.SessionId());
809
960
  }
810
961
  catch (...)
@@ -816,14 +967,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
816
967
 
817
968
  static PyObject* MicrosoftAccountMultiFactorSessionInfo_get_UserAccountId(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo* self, void* /*unused*/) noexcept
818
969
  {
819
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"UserAccountId"))
820
- {
821
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
822
- return nullptr;
823
- }
824
-
825
970
  try
826
971
  {
972
+ static std::optional<bool> is_property_present{};
973
+
974
+ if (!is_property_present.has_value())
975
+ {
976
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorSessionInfo", L"UserAccountId");
977
+ }
978
+
979
+ if (!is_property_present.value())
980
+ {
981
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
982
+ return nullptr;
983
+ }
984
+
827
985
  return py::convert(self->obj.UserAccountId());
828
986
  }
829
987
  catch (...)
@@ -874,23 +1032,20 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
874
1032
  { }
875
1033
  };
876
1034
 
877
- static PyType_Slot _type_slots_MicrosoftAccountMultiFactorSessionInfo[] =
878
- {
1035
+ static PyType_Slot _type_slots_MicrosoftAccountMultiFactorSessionInfo[] = {
879
1036
  { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorSessionInfo) },
880
1037
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorSessionInfo) },
881
1038
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorSessionInfo) },
882
1039
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorSessionInfo) },
883
- { },
1040
+ { }
884
1041
  };
885
1042
 
886
- static PyType_Spec type_spec_MicrosoftAccountMultiFactorSessionInfo =
887
- {
1043
+ static PyType_Spec type_spec_MicrosoftAccountMultiFactorSessionInfo = {
888
1044
  "winrt._winrt_windows_security_authentication_identity_core.MicrosoftAccountMultiFactorSessionInfo",
889
1045
  sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorSessionInfo),
890
1046
  0,
891
1047
  Py_TPFLAGS_DEFAULT,
892
- _type_slots_MicrosoftAccountMultiFactorSessionInfo
893
- };
1048
+ _type_slots_MicrosoftAccountMultiFactorSessionInfo};
894
1049
 
895
1050
  // ----- MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo class --------------------
896
1051
 
@@ -911,14 +1066,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
911
1066
 
912
1067
  static PyObject* MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_ServiceResponse(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo* self, void* /*unused*/) noexcept
913
1068
  {
914
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"ServiceResponse"))
915
- {
916
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
917
- return nullptr;
918
- }
919
-
920
1069
  try
921
1070
  {
1071
+ static std::optional<bool> is_property_present{};
1072
+
1073
+ if (!is_property_present.has_value())
1074
+ {
1075
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"ServiceResponse");
1076
+ }
1077
+
1078
+ if (!is_property_present.value())
1079
+ {
1080
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1081
+ return nullptr;
1082
+ }
1083
+
922
1084
  return py::convert(self->obj.ServiceResponse());
923
1085
  }
924
1086
  catch (...)
@@ -930,14 +1092,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
930
1092
 
931
1093
  static PyObject* MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_Sessions(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo* self, void* /*unused*/) noexcept
932
1094
  {
933
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"Sessions"))
934
- {
935
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
936
- return nullptr;
937
- }
938
-
939
1095
  try
940
1096
  {
1097
+ static std::optional<bool> is_property_present{};
1098
+
1099
+ if (!is_property_present.has_value())
1100
+ {
1101
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"Sessions");
1102
+ }
1103
+
1104
+ if (!is_property_present.value())
1105
+ {
1106
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1107
+ return nullptr;
1108
+ }
1109
+
941
1110
  return py::convert(self->obj.Sessions());
942
1111
  }
943
1112
  catch (...)
@@ -949,14 +1118,21 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
949
1118
 
950
1119
  static PyObject* MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_get_UnregisteredAccounts(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo* self, void* /*unused*/) noexcept
951
1120
  {
952
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"UnregisteredAccounts"))
953
- {
954
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
955
- return nullptr;
956
- }
957
-
958
1121
  try
959
1122
  {
1123
+ static std::optional<bool> is_property_present{};
1124
+
1125
+ if (!is_property_present.has_value())
1126
+ {
1127
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Authentication.Identity.Core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo", L"UnregisteredAccounts");
1128
+ }
1129
+
1130
+ if (!is_property_present.value())
1131
+ {
1132
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1133
+ return nullptr;
1134
+ }
1135
+
960
1136
  return py::convert(self->obj.UnregisteredAccounts());
961
1137
  }
962
1138
  catch (...)
@@ -1003,39 +1179,35 @@ namespace py::cpp::Windows::Security::Authentication::Identity::Core
1003
1179
  { }
1004
1180
  };
1005
1181
 
1006
- static PyType_Slot _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo[] =
1007
- {
1182
+ static PyType_Slot _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo[] = {
1008
1183
  { Py_tp_new, reinterpret_cast<void*>(_new_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
1009
1184
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
1010
1185
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
1011
1186
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo) },
1012
- { },
1187
+ { }
1013
1188
  };
1014
1189
 
1015
- static PyType_Spec type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo =
1016
- {
1190
+ static PyType_Spec type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo = {
1017
1191
  "winrt._winrt_windows_security_authentication_identity_core.MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo",
1018
1192
  sizeof(py::wrapper::Windows::Security::Authentication::Identity::Core::MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo),
1019
1193
  0,
1020
1194
  Py_TPFLAGS_DEFAULT,
1021
- _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo
1022
- };
1195
+ _type_slots_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo};
1023
1196
 
1024
1197
  // ----- Windows.Security.Authentication.Identity.Core Initialization --------------------
1025
- PyDoc_STRVAR(module_doc, "Windows::Security::Authentication::Identity::Core");
1026
1198
 
1199
+ PyDoc_STRVAR(module_doc, "Windows.Security.Authentication.Identity.Core");
1027
1200
 
1028
- static PyModuleDef module_def
1029
- = {PyModuleDef_HEAD_INIT,
1030
- "_winrt_windows_security_authentication_identity_core",
1031
- module_doc,
1032
- 0,
1033
- nullptr,
1034
- nullptr,
1035
- nullptr,
1036
- nullptr,
1037
- nullptr};
1038
-
1201
+ static PyModuleDef module_def = {
1202
+ PyModuleDef_HEAD_INIT,
1203
+ "_winrt_windows_security_authentication_identity_core",
1204
+ module_doc,
1205
+ 0,
1206
+ nullptr,
1207
+ nullptr,
1208
+ nullptr,
1209
+ nullptr,
1210
+ nullptr};
1039
1211
  } // py::cpp::Windows::Security::Authentication::Identity::Core
1040
1212
 
1041
1213
  PyMODINIT_FUNC PyInit__winrt_windows_security_authentication_identity_core(void) noexcept
@@ -1073,27 +1245,32 @@ PyMODINIT_FUNC PyInit__winrt_windows_security_authentication_identity_core(void)
1073
1245
  return nullptr;
1074
1246
  }
1075
1247
 
1076
- if (py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorAuthenticationManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_MicrosoftAccountMultiFactorAuthenticationManager_Static.get())) == -1)
1248
+ py::pytype_handle MicrosoftAccountMultiFactorAuthenticationManager_type{py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorAuthenticationManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_MicrosoftAccountMultiFactorAuthenticationManager_Static.get()))};
1249
+ if (!MicrosoftAccountMultiFactorAuthenticationManager_type)
1077
1250
  {
1078
1251
  return nullptr;
1079
1252
  }
1080
1253
 
1081
- if (py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorGetSessionsResult, object_bases.get(), nullptr) == -1)
1254
+ py::pytype_handle MicrosoftAccountMultiFactorGetSessionsResult_type{py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorGetSessionsResult, object_bases.get(), nullptr)};
1255
+ if (!MicrosoftAccountMultiFactorGetSessionsResult_type)
1082
1256
  {
1083
1257
  return nullptr;
1084
1258
  }
1085
1259
 
1086
- if (py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo, object_bases.get(), nullptr) == -1)
1260
+ py::pytype_handle MicrosoftAccountMultiFactorOneTimeCodedInfo_type{py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorOneTimeCodedInfo, object_bases.get(), nullptr)};
1261
+ if (!MicrosoftAccountMultiFactorOneTimeCodedInfo_type)
1087
1262
  {
1088
1263
  return nullptr;
1089
1264
  }
1090
1265
 
1091
- if (py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorSessionInfo, object_bases.get(), nullptr) == -1)
1266
+ py::pytype_handle MicrosoftAccountMultiFactorSessionInfo_type{py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorSessionInfo, object_bases.get(), nullptr)};
1267
+ if (!MicrosoftAccountMultiFactorSessionInfo_type)
1092
1268
  {
1093
1269
  return nullptr;
1094
1270
  }
1095
1271
 
1096
- if (py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, object_bases.get(), nullptr) == -1)
1272
+ py::pytype_handle MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_type{py::register_python_type(module.get(), &type_spec_MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo, object_bases.get(), nullptr)};
1273
+ if (!MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo_type)
1097
1274
  {
1098
1275
  return nullptr;
1099
1276
  }
@@ -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,8 +9,8 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
13
- import winrt.windows.foundation.collections
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.foundation.collections as windows_foundation_collections
14
14
 
15
15
  from winrt.windows.security.authentication.identity.core import MicrosoftAccountMultiFactorAuthenticationType, MicrosoftAccountMultiFactorServiceResponse, MicrosoftAccountMultiFactorSessionApprovalStatus, MicrosoftAccountMultiFactorSessionAuthenticationStatus
16
16
 
@@ -25,20 +25,20 @@ class MicrosoftAccountMultiFactorAuthenticationManager_Static(type):
25
25
  class MicrosoftAccountMultiFactorAuthenticationManager(winrt.system.Object, metaclass=MicrosoftAccountMultiFactorAuthenticationManager_Static):
26
26
  @staticmethod
27
27
  def _from(obj: winrt.system.Object, /) -> MicrosoftAccountMultiFactorAuthenticationManager: ...
28
- def add_device_async(self, user_account_id: str, authentication_token: str, wns_channel_id: str, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
28
+ def add_device_async(self, user_account_id: str, authentication_token: str, wns_channel_id: str, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
29
29
  @typing.overload
30
- def approve_session_async(self, session_authentiction_status: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authentication_session_info: typing.Optional[MicrosoftAccountMultiFactorSessionInfo], /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
30
+ def approve_session_async(self, session_authentiction_status: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authentication_session_info: typing.Optional[MicrosoftAccountMultiFactorSessionInfo], /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
31
31
  @typing.overload
32
- def approve_session_async(self, session_authentiction_status: MicrosoftAccountMultiFactorSessionAuthenticationStatus, user_account_id: str, session_id: str, session_authentication_type: MicrosoftAccountMultiFactorAuthenticationType, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
32
+ def approve_session_async(self, session_authentiction_status: MicrosoftAccountMultiFactorSessionAuthenticationStatus, user_account_id: str, session_id: str, session_authentication_type: MicrosoftAccountMultiFactorAuthenticationType, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
33
33
  @typing.overload
34
- def deny_session_async(self, authentication_session_info: typing.Optional[MicrosoftAccountMultiFactorSessionInfo], /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
34
+ def deny_session_async(self, authentication_session_info: typing.Optional[MicrosoftAccountMultiFactorSessionInfo], /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
35
35
  @typing.overload
36
- def deny_session_async(self, user_account_id: str, session_id: str, session_authentication_type: MicrosoftAccountMultiFactorAuthenticationType, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
37
- def get_one_time_pass_code_async(self, user_account_id: str, code_length: winrt.system.UInt32, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorOneTimeCodedInfo]: ...
38
- def get_sessions_and_unregistered_accounts_async(self, user_account_id_list: typing.Iterable[str], /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo]: ...
39
- def get_sessions_async(self, user_account_id_list: typing.Iterable[str], /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorGetSessionsResult]: ...
40
- def remove_device_async(self, user_account_id: str, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
41
- def update_wns_channel_async(self, user_account_id: str, channel_uri: str, /) -> winrt.windows.foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
36
+ def deny_session_async(self, user_account_id: str, session_id: str, session_authentication_type: MicrosoftAccountMultiFactorAuthenticationType, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
37
+ def get_one_time_pass_code_async(self, user_account_id: str, code_length: winrt.system.UInt32, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorOneTimeCodedInfo]: ...
38
+ def get_sessions_and_unregistered_accounts_async(self, user_account_id_list: typing.Iterable[str], /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo]: ...
39
+ def get_sessions_async(self, user_account_id_list: typing.Iterable[str], /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorGetSessionsResult]: ...
40
+ def remove_device_async(self, user_account_id: str, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
41
+ def update_wns_channel_async(self, user_account_id: str, channel_uri: str, /) -> windows_foundation.IAsyncOperation[MicrosoftAccountMultiFactorServiceResponse]: ...
42
42
 
43
43
  @typing.final
44
44
  class MicrosoftAccountMultiFactorGetSessionsResult(winrt.system.Object):
@@ -47,7 +47,7 @@ class MicrosoftAccountMultiFactorGetSessionsResult(winrt.system.Object):
47
47
  @_property
48
48
  def service_response(self) -> MicrosoftAccountMultiFactorServiceResponse: ...
49
49
  @_property
50
- def sessions(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[MicrosoftAccountMultiFactorSessionInfo]]: ...
50
+ def sessions(self) -> typing.Optional[windows_foundation_collections.IVectorView[MicrosoftAccountMultiFactorSessionInfo]]: ...
51
51
 
52
52
  @typing.final
53
53
  class MicrosoftAccountMultiFactorOneTimeCodedInfo(winrt.system.Object):
@@ -88,7 +88,7 @@ class MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo(winrt.system
88
88
  @_property
89
89
  def service_response(self) -> MicrosoftAccountMultiFactorServiceResponse: ...
90
90
  @_property
91
- def sessions(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[MicrosoftAccountMultiFactorSessionInfo]]: ...
91
+ def sessions(self) -> typing.Optional[windows_foundation_collections.IVectorView[MicrosoftAccountMultiFactorSessionInfo]]: ...
92
92
  @_property
93
- def unregistered_accounts(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[str]]: ...
93
+ def unregistered_accounts(self) -> typing.Optional[windows_foundation_collections.IVectorView[str]]: ...
94
94
 
@@ -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.Security.Authentication.Identity.Core
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,12 +10,12 @@ 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[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
19
19
 
20
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
21
21
 
@@ -0,0 +1,5 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
5
+ winrt-Windows.Foundation.Collections[all]==2.2.0
@@ -1,4 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Foundation[all]==2.0.1
4
- winrt-Windows.Foundation.Collections[all]==2.0.1
@@ -1,5 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1
5
- winrt-Windows.Foundation.Collections[all]==2.0.1