winrt-Windows.Security.Credentials 2.1.0__tar.gz → 2.3.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_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/PKG-INFO +8 -8
  2. winrt_windows_security_credentials-2.3.0/all-requirements.txt +7 -0
  3. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/py.Windows.Security.Credentials.cpp +501 -77
  4. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/pyproject.toml +3 -2
  5. winrt_windows_security_credentials-2.3.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/requirements.txt +2 -2
  7. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt/_winrt_windows_security_credentials.pyi +1 -1
  8. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt/windows/security/credentials/__init__.py +1 -1
  9. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt_Windows.Security.Credentials.egg-info/PKG-INFO +8 -8
  10. winrt_windows_security_credentials-2.3.0/winrt_Windows.Security.Credentials.egg-info/requires.txt +8 -0
  11. winrt_windows_security_credentials-2.1.0/all-requirements.txt +0 -7
  12. winrt_windows_security_credentials-2.1.0/pywinrt-version.txt +0 -1
  13. winrt_windows_security_credentials-2.1.0/winrt_Windows.Security.Credentials.egg-info/requires.txt +0 -8
  14. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/README.md +0 -0
  15. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/setup.cfg +0 -0
  16. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/setup.py +0 -0
  17. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt/windows/security/credentials/py.typed +0 -0
  18. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt_Windows.Security.Credentials.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt_Windows.Security.Credentials.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_security_credentials-2.1.0 → winrt_windows_security_credentials-2.3.0}/winrt_Windows.Security.Credentials.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Security.Credentials
3
- Version: 2.1.0
3
+ Version: 2.3.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,15 +10,15 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.3.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
- Requires-Dist: winrt-Windows.Security.Cryptography.Core[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
21
- Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.3.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.3.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Security.Cryptography.Core[all]==2.3.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.3.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.System[all]==2.3.0; extra == "all"
22
22
 
23
23
  <!-- warning: Please don't edit this file. It was automatically generated. -->
24
24
 
@@ -0,0 +1,7 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
+
3
+ winrt-Windows.Foundation[all]==2.3.0
4
+ winrt-Windows.Foundation.Collections[all]==2.3.0
5
+ winrt-Windows.Security.Cryptography.Core[all]==2.3.0
6
+ winrt-Windows.Storage.Streams[all]==2.3.0
7
+ winrt-Windows.System[all]==2.3.0
@@ -1,4 +1,4 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
3
  #include "py.Windows.Security.Credentials.h"
4
4
 
@@ -29,7 +29,14 @@ namespace py::cpp::Windows::Security::Credentials
29
29
  {
30
30
  try
31
31
  {
32
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"GetAttestationAsync", 0))
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.Credentials.KeyCredential", L"GetAttestationAsync", 0);
37
+ }
38
+
39
+ if (!is_overload_present.value())
33
40
  {
34
41
  py::set_arg_count_version_error(0);
35
42
  return nullptr;
@@ -58,7 +65,14 @@ namespace py::cpp::Windows::Security::Credentials
58
65
  {
59
66
  try
60
67
  {
61
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"RequestSignAsync", 1))
68
+ static std::optional<bool> is_overload_present{};
69
+
70
+ if (!is_overload_present.has_value())
71
+ {
72
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"RequestSignAsync", 1);
73
+ }
74
+
75
+ if (!is_overload_present.value())
62
76
  {
63
77
  py::set_arg_count_version_error(1);
64
78
  return nullptr;
@@ -89,7 +103,14 @@ namespace py::cpp::Windows::Security::Credentials
89
103
  {
90
104
  try
91
105
  {
92
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"RetrievePublicKey", 0))
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.Security.Credentials.KeyCredential", L"RetrievePublicKey", 0);
111
+ }
112
+
113
+ if (!is_overload_present.value())
93
114
  {
94
115
  py::set_arg_count_version_error(0);
95
116
  return nullptr;
@@ -107,7 +128,14 @@ namespace py::cpp::Windows::Security::Credentials
107
128
  {
108
129
  try
109
130
  {
110
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"RetrievePublicKey", 1))
131
+ static std::optional<bool> is_overload_present{};
132
+
133
+ if (!is_overload_present.has_value())
134
+ {
135
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredential", L"RetrievePublicKey", 1);
136
+ }
137
+
138
+ if (!is_overload_present.value())
111
139
  {
112
140
  py::set_arg_count_version_error(1);
113
141
  return nullptr;
@@ -134,7 +162,14 @@ namespace py::cpp::Windows::Security::Credentials
134
162
  {
135
163
  try
136
164
  {
137
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredential", L"Name"))
165
+ static std::optional<bool> is_property_present{};
166
+
167
+ if (!is_property_present.has_value())
168
+ {
169
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredential", L"Name");
170
+ }
171
+
172
+ if (!is_property_present.value())
138
173
  {
139
174
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
140
175
  return nullptr;
@@ -223,7 +258,14 @@ namespace py::cpp::Windows::Security::Credentials
223
258
  {
224
259
  try
225
260
  {
226
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"AttestationBuffer"))
261
+ static std::optional<bool> is_property_present{};
262
+
263
+ if (!is_property_present.has_value())
264
+ {
265
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"AttestationBuffer");
266
+ }
267
+
268
+ if (!is_property_present.value())
227
269
  {
228
270
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
229
271
  return nullptr;
@@ -242,7 +284,14 @@ namespace py::cpp::Windows::Security::Credentials
242
284
  {
243
285
  try
244
286
  {
245
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"CertificateChainBuffer"))
287
+ static std::optional<bool> is_property_present{};
288
+
289
+ if (!is_property_present.has_value())
290
+ {
291
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"CertificateChainBuffer");
292
+ }
293
+
294
+ if (!is_property_present.value())
246
295
  {
247
296
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
248
297
  return nullptr;
@@ -261,7 +310,14 @@ namespace py::cpp::Windows::Security::Credentials
261
310
  {
262
311
  try
263
312
  {
264
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"Status"))
313
+ static std::optional<bool> is_property_present{};
314
+
315
+ if (!is_property_present.has_value())
316
+ {
317
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialAttestationResult", L"Status");
318
+ }
319
+
320
+ if (!is_property_present.value())
265
321
  {
266
322
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
267
323
  return nullptr;
@@ -345,7 +401,14 @@ namespace py::cpp::Windows::Security::Credentials
345
401
  {
346
402
  try
347
403
  {
348
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"DeleteAsync", 1))
404
+ static std::optional<bool> is_overload_present{};
405
+
406
+ if (!is_overload_present.has_value())
407
+ {
408
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"DeleteAsync", 1);
409
+ }
410
+
411
+ if (!is_overload_present.value())
349
412
  {
350
413
  py::set_arg_count_version_error(1);
351
414
  return nullptr;
@@ -376,7 +439,14 @@ namespace py::cpp::Windows::Security::Credentials
376
439
  {
377
440
  try
378
441
  {
379
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"IsSupportedAsync", 0))
442
+ static std::optional<bool> is_overload_present{};
443
+
444
+ if (!is_overload_present.has_value())
445
+ {
446
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"IsSupportedAsync", 0);
447
+ }
448
+
449
+ if (!is_overload_present.value())
380
450
  {
381
451
  py::set_arg_count_version_error(0);
382
452
  return nullptr;
@@ -405,7 +475,14 @@ namespace py::cpp::Windows::Security::Credentials
405
475
  {
406
476
  try
407
477
  {
408
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"OpenAsync", 1))
478
+ static std::optional<bool> is_overload_present{};
479
+
480
+ if (!is_overload_present.has_value())
481
+ {
482
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"OpenAsync", 1);
483
+ }
484
+
485
+ if (!is_overload_present.value())
409
486
  {
410
487
  py::set_arg_count_version_error(1);
411
488
  return nullptr;
@@ -436,7 +513,14 @@ namespace py::cpp::Windows::Security::Credentials
436
513
  {
437
514
  try
438
515
  {
439
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"RenewAttestationAsync", 0))
516
+ static std::optional<bool> is_overload_present{};
517
+
518
+ if (!is_overload_present.has_value())
519
+ {
520
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"RenewAttestationAsync", 0);
521
+ }
522
+
523
+ if (!is_overload_present.value())
440
524
  {
441
525
  py::set_arg_count_version_error(0);
442
526
  return nullptr;
@@ -465,7 +549,14 @@ namespace py::cpp::Windows::Security::Credentials
465
549
  {
466
550
  try
467
551
  {
468
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"RequestCreateAsync", 2))
552
+ static std::optional<bool> is_overload_present{};
553
+
554
+ if (!is_overload_present.has_value())
555
+ {
556
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.KeyCredentialManager", L"RequestCreateAsync", 2);
557
+ }
558
+
559
+ if (!is_overload_present.value())
469
560
  {
470
561
  py::set_arg_count_version_error(2);
471
562
  return nullptr;
@@ -562,7 +653,14 @@ namespace py::cpp::Windows::Security::Credentials
562
653
  {
563
654
  try
564
655
  {
565
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialOperationResult", L"Result"))
656
+ static std::optional<bool> is_property_present{};
657
+
658
+ if (!is_property_present.has_value())
659
+ {
660
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialOperationResult", L"Result");
661
+ }
662
+
663
+ if (!is_property_present.value())
566
664
  {
567
665
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
568
666
  return nullptr;
@@ -581,7 +679,14 @@ namespace py::cpp::Windows::Security::Credentials
581
679
  {
582
680
  try
583
681
  {
584
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialOperationResult", L"Status"))
682
+ static std::optional<bool> is_property_present{};
683
+
684
+ if (!is_property_present.has_value())
685
+ {
686
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialOperationResult", L"Status");
687
+ }
688
+
689
+ if (!is_property_present.value())
585
690
  {
586
691
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
587
692
  return nullptr;
@@ -668,7 +773,14 @@ namespace py::cpp::Windows::Security::Credentials
668
773
  {
669
774
  try
670
775
  {
671
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialRetrievalResult", L"Credential"))
776
+ static std::optional<bool> is_property_present{};
777
+
778
+ if (!is_property_present.has_value())
779
+ {
780
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialRetrievalResult", L"Credential");
781
+ }
782
+
783
+ if (!is_property_present.value())
672
784
  {
673
785
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
674
786
  return nullptr;
@@ -687,7 +799,14 @@ namespace py::cpp::Windows::Security::Credentials
687
799
  {
688
800
  try
689
801
  {
690
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialRetrievalResult", L"Status"))
802
+ static std::optional<bool> is_property_present{};
803
+
804
+ if (!is_property_present.has_value())
805
+ {
806
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.KeyCredentialRetrievalResult", L"Status");
807
+ }
808
+
809
+ if (!is_property_present.value())
691
810
  {
692
811
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
693
812
  return nullptr;
@@ -772,7 +891,7 @@ namespace py::cpp::Windows::Security::Credentials
772
891
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
773
892
  auto param2 = py::convert_to<winrt::hstring>(args, 2);
774
893
 
775
- winrt::Windows::Security::Credentials::PasswordCredential instance{ param0, param1, param2 };
894
+ winrt::Windows::Security::Credentials::PasswordCredential instance{param0, param1, param2};
776
895
  return py::wrap(instance, type);
777
896
  }
778
897
  catch (...)
@@ -785,7 +904,7 @@ namespace py::cpp::Windows::Security::Credentials
785
904
  {
786
905
  try
787
906
  {
788
- winrt::Windows::Security::Credentials::PasswordCredential instance{ };
907
+ winrt::Windows::Security::Credentials::PasswordCredential instance{};
789
908
  return py::wrap(instance, type);
790
909
  }
791
910
  catch (...)
@@ -817,7 +936,14 @@ namespace py::cpp::Windows::Security::Credentials
817
936
  {
818
937
  try
819
938
  {
820
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredential", L"RetrievePassword", 0))
939
+ static std::optional<bool> is_overload_present{};
940
+
941
+ if (!is_overload_present.has_value())
942
+ {
943
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredential", L"RetrievePassword", 0);
944
+ }
945
+
946
+ if (!is_overload_present.value())
821
947
  {
822
948
  py::set_arg_count_version_error(0);
823
949
  return nullptr;
@@ -843,7 +969,14 @@ namespace py::cpp::Windows::Security::Credentials
843
969
  {
844
970
  try
845
971
  {
846
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"UserName"))
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.Credentials.PasswordCredential", L"UserName");
977
+ }
978
+
979
+ if (!is_property_present.value())
847
980
  {
848
981
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
849
982
  return nullptr;
@@ -868,7 +1001,14 @@ namespace py::cpp::Windows::Security::Credentials
868
1001
 
869
1002
  try
870
1003
  {
871
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"UserName"))
1004
+ static std::optional<bool> is_property_present{};
1005
+
1006
+ if (!is_property_present.has_value())
1007
+ {
1008
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"UserName");
1009
+ }
1010
+
1011
+ if (!is_property_present.value())
872
1012
  {
873
1013
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
874
1014
  return -1;
@@ -890,7 +1030,14 @@ namespace py::cpp::Windows::Security::Credentials
890
1030
  {
891
1031
  try
892
1032
  {
893
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Resource"))
1033
+ static std::optional<bool> is_property_present{};
1034
+
1035
+ if (!is_property_present.has_value())
1036
+ {
1037
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Resource");
1038
+ }
1039
+
1040
+ if (!is_property_present.value())
894
1041
  {
895
1042
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
896
1043
  return nullptr;
@@ -915,7 +1062,14 @@ namespace py::cpp::Windows::Security::Credentials
915
1062
 
916
1063
  try
917
1064
  {
918
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Resource"))
1065
+ static std::optional<bool> is_property_present{};
1066
+
1067
+ if (!is_property_present.has_value())
1068
+ {
1069
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Resource");
1070
+ }
1071
+
1072
+ if (!is_property_present.value())
919
1073
  {
920
1074
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
921
1075
  return -1;
@@ -937,7 +1091,14 @@ namespace py::cpp::Windows::Security::Credentials
937
1091
  {
938
1092
  try
939
1093
  {
940
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Password"))
1094
+ static std::optional<bool> is_property_present{};
1095
+
1096
+ if (!is_property_present.has_value())
1097
+ {
1098
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Password");
1099
+ }
1100
+
1101
+ if (!is_property_present.value())
941
1102
  {
942
1103
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
943
1104
  return nullptr;
@@ -962,7 +1123,14 @@ namespace py::cpp::Windows::Security::Credentials
962
1123
 
963
1124
  try
964
1125
  {
965
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Password"))
1126
+ static std::optional<bool> is_property_present{};
1127
+
1128
+ if (!is_property_present.has_value())
1129
+ {
1130
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Password");
1131
+ }
1132
+
1133
+ if (!is_property_present.value())
966
1134
  {
967
1135
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
968
1136
  return -1;
@@ -984,7 +1152,14 @@ namespace py::cpp::Windows::Security::Credentials
984
1152
  {
985
1153
  try
986
1154
  {
987
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Properties"))
1155
+ static std::optional<bool> is_property_present{};
1156
+
1157
+ if (!is_property_present.has_value())
1158
+ {
1159
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredential", L"Properties");
1160
+ }
1161
+
1162
+ if (!is_property_present.value())
988
1163
  {
989
1164
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
990
1165
  return nullptr;
@@ -1068,7 +1243,7 @@ namespace py::cpp::Windows::Security::Credentials
1068
1243
  {
1069
1244
  try
1070
1245
  {
1071
- winrt::Windows::Security::Credentials::PasswordCredentialPropertyStore instance{ };
1246
+ winrt::Windows::Security::Credentials::PasswordCredentialPropertyStore instance{};
1072
1247
  return py::wrap(instance, type);
1073
1248
  }
1074
1249
  catch (...)
@@ -1100,7 +1275,14 @@ namespace py::cpp::Windows::Security::Credentials
1100
1275
  {
1101
1276
  try
1102
1277
  {
1103
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Clear", 0))
1278
+ static std::optional<bool> is_overload_present{};
1279
+
1280
+ if (!is_overload_present.has_value())
1281
+ {
1282
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Clear", 0);
1283
+ }
1284
+
1285
+ if (!is_overload_present.value())
1104
1286
  {
1105
1287
  py::set_arg_count_version_error(0);
1106
1288
  return nullptr;
@@ -1130,7 +1312,14 @@ namespace py::cpp::Windows::Security::Credentials
1130
1312
  {
1131
1313
  try
1132
1314
  {
1133
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"First", 0))
1315
+ static std::optional<bool> is_overload_present{};
1316
+
1317
+ if (!is_overload_present.has_value())
1318
+ {
1319
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"First", 0);
1320
+ }
1321
+
1322
+ if (!is_overload_present.value())
1134
1323
  {
1135
1324
  py::set_arg_count_version_error(0);
1136
1325
  return nullptr;
@@ -1159,7 +1348,14 @@ namespace py::cpp::Windows::Security::Credentials
1159
1348
  {
1160
1349
  try
1161
1350
  {
1162
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"GetView", 0))
1351
+ static std::optional<bool> is_overload_present{};
1352
+
1353
+ if (!is_overload_present.has_value())
1354
+ {
1355
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"GetView", 0);
1356
+ }
1357
+
1358
+ if (!is_overload_present.value())
1163
1359
  {
1164
1360
  py::set_arg_count_version_error(0);
1165
1361
  return nullptr;
@@ -1188,7 +1384,14 @@ namespace py::cpp::Windows::Security::Credentials
1188
1384
  {
1189
1385
  try
1190
1386
  {
1191
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"HasKey", 1))
1387
+ static std::optional<bool> is_overload_present{};
1388
+
1389
+ if (!is_overload_present.has_value())
1390
+ {
1391
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"HasKey", 1);
1392
+ }
1393
+
1394
+ if (!is_overload_present.value())
1192
1395
  {
1193
1396
  py::set_arg_count_version_error(1);
1194
1397
  return nullptr;
@@ -1219,7 +1422,14 @@ namespace py::cpp::Windows::Security::Credentials
1219
1422
  {
1220
1423
  try
1221
1424
  {
1222
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Insert", 2))
1425
+ static std::optional<bool> is_overload_present{};
1426
+
1427
+ if (!is_overload_present.has_value())
1428
+ {
1429
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Insert", 2);
1430
+ }
1431
+
1432
+ if (!is_overload_present.value())
1223
1433
  {
1224
1434
  py::set_arg_count_version_error(2);
1225
1435
  return nullptr;
@@ -1251,7 +1461,14 @@ namespace py::cpp::Windows::Security::Credentials
1251
1461
  {
1252
1462
  try
1253
1463
  {
1254
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Lookup", 1))
1464
+ static std::optional<bool> is_overload_present{};
1465
+
1466
+ if (!is_overload_present.has_value())
1467
+ {
1468
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Lookup", 1);
1469
+ }
1470
+
1471
+ if (!is_overload_present.value())
1255
1472
  {
1256
1473
  py::set_arg_count_version_error(1);
1257
1474
  return nullptr;
@@ -1282,7 +1499,14 @@ namespace py::cpp::Windows::Security::Credentials
1282
1499
  {
1283
1500
  try
1284
1501
  {
1285
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Remove", 1))
1502
+ static std::optional<bool> is_overload_present{};
1503
+
1504
+ if (!is_overload_present.has_value())
1505
+ {
1506
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Remove", 1);
1507
+ }
1508
+
1509
+ if (!is_overload_present.value())
1286
1510
  {
1287
1511
  py::set_arg_count_version_error(1);
1288
1512
  return nullptr;
@@ -1310,7 +1534,14 @@ namespace py::cpp::Windows::Security::Credentials
1310
1534
  {
1311
1535
  try
1312
1536
  {
1313
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Size"))
1537
+ static std::optional<bool> is_property_present{};
1538
+
1539
+ if (!is_property_present.has_value())
1540
+ {
1541
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"Size");
1542
+ }
1543
+
1544
+ if (!is_property_present.value())
1314
1545
  {
1315
1546
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1316
1547
  return nullptr;
@@ -1329,7 +1560,14 @@ namespace py::cpp::Windows::Security::Credentials
1329
1560
  {
1330
1561
  try
1331
1562
  {
1332
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"MapChanged"))
1563
+ static std::optional<bool> is_event_present{};
1564
+
1565
+ if (!is_event_present.has_value())
1566
+ {
1567
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"MapChanged");
1568
+ }
1569
+
1570
+ if (!is_event_present.value())
1333
1571
  {
1334
1572
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
1335
1573
  return nullptr;
@@ -1350,7 +1588,14 @@ namespace py::cpp::Windows::Security::Credentials
1350
1588
  {
1351
1589
  try
1352
1590
  {
1353
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"MapChanged"))
1591
+ static std::optional<bool> is_event_present{};
1592
+
1593
+ if (!is_event_present.has_value())
1594
+ {
1595
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.Security.Credentials.PasswordCredentialPropertyStore", L"MapChanged");
1596
+ }
1597
+
1598
+ if (!is_event_present.value())
1354
1599
  {
1355
1600
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
1356
1601
  return nullptr;
@@ -1548,7 +1793,7 @@ namespace py::cpp::Windows::Security::Credentials
1548
1793
  {
1549
1794
  try
1550
1795
  {
1551
- winrt::Windows::Security::Credentials::PasswordVault instance{ };
1796
+ winrt::Windows::Security::Credentials::PasswordVault instance{};
1552
1797
  return py::wrap(instance, type);
1553
1798
  }
1554
1799
  catch (...)
@@ -1580,7 +1825,14 @@ namespace py::cpp::Windows::Security::Credentials
1580
1825
  {
1581
1826
  try
1582
1827
  {
1583
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Add", 1))
1828
+ static std::optional<bool> is_overload_present{};
1829
+
1830
+ if (!is_overload_present.has_value())
1831
+ {
1832
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Add", 1);
1833
+ }
1834
+
1835
+ if (!is_overload_present.value())
1584
1836
  {
1585
1837
  py::set_arg_count_version_error(1);
1586
1838
  return nullptr;
@@ -1612,7 +1864,14 @@ namespace py::cpp::Windows::Security::Credentials
1612
1864
  {
1613
1865
  try
1614
1866
  {
1615
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"FindAllByResource", 1))
1867
+ static std::optional<bool> is_overload_present{};
1868
+
1869
+ if (!is_overload_present.has_value())
1870
+ {
1871
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"FindAllByResource", 1);
1872
+ }
1873
+
1874
+ if (!is_overload_present.value())
1616
1875
  {
1617
1876
  py::set_arg_count_version_error(1);
1618
1877
  return nullptr;
@@ -1643,7 +1902,14 @@ namespace py::cpp::Windows::Security::Credentials
1643
1902
  {
1644
1903
  try
1645
1904
  {
1646
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"FindAllByUserName", 1))
1905
+ static std::optional<bool> is_overload_present{};
1906
+
1907
+ if (!is_overload_present.has_value())
1908
+ {
1909
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"FindAllByUserName", 1);
1910
+ }
1911
+
1912
+ if (!is_overload_present.value())
1647
1913
  {
1648
1914
  py::set_arg_count_version_error(1);
1649
1915
  return nullptr;
@@ -1674,7 +1940,14 @@ namespace py::cpp::Windows::Security::Credentials
1674
1940
  {
1675
1941
  try
1676
1942
  {
1677
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Remove", 1))
1943
+ static std::optional<bool> is_overload_present{};
1944
+
1945
+ if (!is_overload_present.has_value())
1946
+ {
1947
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Remove", 1);
1948
+ }
1949
+
1950
+ if (!is_overload_present.value())
1678
1951
  {
1679
1952
  py::set_arg_count_version_error(1);
1680
1953
  return nullptr;
@@ -1706,7 +1979,14 @@ namespace py::cpp::Windows::Security::Credentials
1706
1979
  {
1707
1980
  try
1708
1981
  {
1709
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Retrieve", 2))
1982
+ static std::optional<bool> is_overload_present{};
1983
+
1984
+ if (!is_overload_present.has_value())
1985
+ {
1986
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"Retrieve", 2);
1987
+ }
1988
+
1989
+ if (!is_overload_present.value())
1710
1990
  {
1711
1991
  py::set_arg_count_version_error(2);
1712
1992
  return nullptr;
@@ -1738,7 +2018,14 @@ namespace py::cpp::Windows::Security::Credentials
1738
2018
  {
1739
2019
  try
1740
2020
  {
1741
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"RetrieveAll", 0))
2021
+ static std::optional<bool> is_overload_present{};
2022
+
2023
+ if (!is_overload_present.has_value())
2024
+ {
2025
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.PasswordVault", L"RetrieveAll", 0);
2026
+ }
2027
+
2028
+ if (!is_overload_present.value())
1742
2029
  {
1743
2030
  py::set_arg_count_version_error(0);
1744
2031
  return nullptr;
@@ -1833,7 +2120,7 @@ namespace py::cpp::Windows::Security::Credentials
1833
2120
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
1834
2121
  auto param2 = py::convert_to<winrt::Windows::Security::Credentials::WebAccountState>(args, 2);
1835
2122
 
1836
- winrt::Windows::Security::Credentials::WebAccount instance{ param0, param1, param2 };
2123
+ winrt::Windows::Security::Credentials::WebAccount instance{param0, param1, param2};
1837
2124
  return py::wrap(instance, type);
1838
2125
  }
1839
2126
  catch (...)
@@ -1865,7 +2152,14 @@ namespace py::cpp::Windows::Security::Credentials
1865
2152
  {
1866
2153
  try
1867
2154
  {
1868
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"GetPictureAsync", 1))
2155
+ static std::optional<bool> is_overload_present{};
2156
+
2157
+ if (!is_overload_present.has_value())
2158
+ {
2159
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"GetPictureAsync", 1);
2160
+ }
2161
+
2162
+ if (!is_overload_present.value())
1869
2163
  {
1870
2164
  py::set_arg_count_version_error(1);
1871
2165
  return nullptr;
@@ -1896,7 +2190,14 @@ namespace py::cpp::Windows::Security::Credentials
1896
2190
  {
1897
2191
  try
1898
2192
  {
1899
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"SignOutAsync", 0))
2193
+ static std::optional<bool> is_overload_present{};
2194
+
2195
+ if (!is_overload_present.has_value())
2196
+ {
2197
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"SignOutAsync", 0);
2198
+ }
2199
+
2200
+ if (!is_overload_present.value())
1900
2201
  {
1901
2202
  py::set_arg_count_version_error(0);
1902
2203
  return nullptr;
@@ -1914,7 +2215,14 @@ namespace py::cpp::Windows::Security::Credentials
1914
2215
  {
1915
2216
  try
1916
2217
  {
1917
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"SignOutAsync", 1))
2218
+ static std::optional<bool> is_overload_present{};
2219
+
2220
+ if (!is_overload_present.has_value())
2221
+ {
2222
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Security.Credentials.WebAccount", L"SignOutAsync", 1);
2223
+ }
2224
+
2225
+ if (!is_overload_present.value())
1918
2226
  {
1919
2227
  py::set_arg_count_version_error(1);
1920
2228
  return nullptr;
@@ -1941,7 +2249,14 @@ namespace py::cpp::Windows::Security::Credentials
1941
2249
  {
1942
2250
  try
1943
2251
  {
1944
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"State"))
2252
+ static std::optional<bool> is_property_present{};
2253
+
2254
+ if (!is_property_present.has_value())
2255
+ {
2256
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"State");
2257
+ }
2258
+
2259
+ if (!is_property_present.value())
1945
2260
  {
1946
2261
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1947
2262
  return nullptr;
@@ -1960,7 +2275,14 @@ namespace py::cpp::Windows::Security::Credentials
1960
2275
  {
1961
2276
  try
1962
2277
  {
1963
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"UserName"))
2278
+ static std::optional<bool> is_property_present{};
2279
+
2280
+ if (!is_property_present.has_value())
2281
+ {
2282
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"UserName");
2283
+ }
2284
+
2285
+ if (!is_property_present.value())
1964
2286
  {
1965
2287
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1966
2288
  return nullptr;
@@ -1979,7 +2301,14 @@ namespace py::cpp::Windows::Security::Credentials
1979
2301
  {
1980
2302
  try
1981
2303
  {
1982
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"WebAccountProvider"))
2304
+ static std::optional<bool> is_property_present{};
2305
+
2306
+ if (!is_property_present.has_value())
2307
+ {
2308
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"WebAccountProvider");
2309
+ }
2310
+
2311
+ if (!is_property_present.value())
1983
2312
  {
1984
2313
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1985
2314
  return nullptr;
@@ -1998,7 +2327,14 @@ namespace py::cpp::Windows::Security::Credentials
1998
2327
  {
1999
2328
  try
2000
2329
  {
2001
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"Id"))
2330
+ static std::optional<bool> is_property_present{};
2331
+
2332
+ if (!is_property_present.has_value())
2333
+ {
2334
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"Id");
2335
+ }
2336
+
2337
+ if (!is_property_present.value())
2002
2338
  {
2003
2339
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2004
2340
  return nullptr;
@@ -2017,7 +2353,14 @@ namespace py::cpp::Windows::Security::Credentials
2017
2353
  {
2018
2354
  try
2019
2355
  {
2020
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"Properties"))
2356
+ static std::optional<bool> is_property_present{};
2357
+
2358
+ if (!is_property_present.has_value())
2359
+ {
2360
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccount", L"Properties");
2361
+ }
2362
+
2363
+ if (!is_property_present.value())
2021
2364
  {
2022
2365
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2023
2366
  return nullptr;
@@ -2107,7 +2450,7 @@ namespace py::cpp::Windows::Security::Credentials
2107
2450
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
2108
2451
  auto param2 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 2);
2109
2452
 
2110
- winrt::Windows::Security::Credentials::WebAccountProvider instance{ param0, param1, param2 };
2453
+ winrt::Windows::Security::Credentials::WebAccountProvider instance{param0, param1, param2};
2111
2454
  return py::wrap(instance, type);
2112
2455
  }
2113
2456
  catch (...)
@@ -2135,7 +2478,14 @@ namespace py::cpp::Windows::Security::Credentials
2135
2478
  {
2136
2479
  try
2137
2480
  {
2138
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"DisplayName"))
2481
+ static std::optional<bool> is_property_present{};
2482
+
2483
+ if (!is_property_present.has_value())
2484
+ {
2485
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"DisplayName");
2486
+ }
2487
+
2488
+ if (!is_property_present.value())
2139
2489
  {
2140
2490
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2141
2491
  return nullptr;
@@ -2154,7 +2504,14 @@ namespace py::cpp::Windows::Security::Credentials
2154
2504
  {
2155
2505
  try
2156
2506
  {
2157
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"IconUri"))
2507
+ static std::optional<bool> is_property_present{};
2508
+
2509
+ if (!is_property_present.has_value())
2510
+ {
2511
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"IconUri");
2512
+ }
2513
+
2514
+ if (!is_property_present.value())
2158
2515
  {
2159
2516
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2160
2517
  return nullptr;
@@ -2173,7 +2530,14 @@ namespace py::cpp::Windows::Security::Credentials
2173
2530
  {
2174
2531
  try
2175
2532
  {
2176
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"Id"))
2533
+ static std::optional<bool> is_property_present{};
2534
+
2535
+ if (!is_property_present.has_value())
2536
+ {
2537
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"Id");
2538
+ }
2539
+
2540
+ if (!is_property_present.value())
2177
2541
  {
2178
2542
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2179
2543
  return nullptr;
@@ -2192,7 +2556,14 @@ namespace py::cpp::Windows::Security::Credentials
2192
2556
  {
2193
2557
  try
2194
2558
  {
2195
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"Authority"))
2559
+ static std::optional<bool> is_property_present{};
2560
+
2561
+ if (!is_property_present.has_value())
2562
+ {
2563
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"Authority");
2564
+ }
2565
+
2566
+ if (!is_property_present.value())
2196
2567
  {
2197
2568
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2198
2569
  return nullptr;
@@ -2211,7 +2582,14 @@ namespace py::cpp::Windows::Security::Credentials
2211
2582
  {
2212
2583
  try
2213
2584
  {
2214
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"DisplayPurpose"))
2585
+ static std::optional<bool> is_property_present{};
2586
+
2587
+ if (!is_property_present.has_value())
2588
+ {
2589
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"DisplayPurpose");
2590
+ }
2591
+
2592
+ if (!is_property_present.value())
2215
2593
  {
2216
2594
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2217
2595
  return nullptr;
@@ -2230,7 +2608,14 @@ namespace py::cpp::Windows::Security::Credentials
2230
2608
  {
2231
2609
  try
2232
2610
  {
2233
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"User"))
2611
+ static std::optional<bool> is_property_present{};
2612
+
2613
+ if (!is_property_present.has_value())
2614
+ {
2615
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"User");
2616
+ }
2617
+
2618
+ if (!is_property_present.value())
2234
2619
  {
2235
2620
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2236
2621
  return nullptr;
@@ -2249,7 +2634,14 @@ namespace py::cpp::Windows::Security::Credentials
2249
2634
  {
2250
2635
  try
2251
2636
  {
2252
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"IsSystemProvider"))
2637
+ static std::optional<bool> is_property_present{};
2638
+
2639
+ if (!is_property_present.has_value())
2640
+ {
2641
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.WebAccountProvider", L"IsSystemProvider");
2642
+ }
2643
+
2644
+ if (!is_property_present.value())
2253
2645
  {
2254
2646
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2255
2647
  return nullptr;
@@ -2341,7 +2733,14 @@ namespace py::cpp::Windows::Security::Credentials
2341
2733
  {
2342
2734
  try
2343
2735
  {
2344
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"State"))
2736
+ static std::optional<bool> is_property_present{};
2737
+
2738
+ if (!is_property_present.has_value())
2739
+ {
2740
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"State");
2741
+ }
2742
+
2743
+ if (!is_property_present.value())
2345
2744
  {
2346
2745
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2347
2746
  return nullptr;
@@ -2360,7 +2759,14 @@ namespace py::cpp::Windows::Security::Credentials
2360
2759
  {
2361
2760
  try
2362
2761
  {
2363
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"UserName"))
2762
+ static std::optional<bool> is_property_present{};
2763
+
2764
+ if (!is_property_present.has_value())
2765
+ {
2766
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"UserName");
2767
+ }
2768
+
2769
+ if (!is_property_present.value())
2364
2770
  {
2365
2771
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2366
2772
  return nullptr;
@@ -2379,7 +2785,14 @@ namespace py::cpp::Windows::Security::Credentials
2379
2785
  {
2380
2786
  try
2381
2787
  {
2382
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"WebAccountProvider"))
2788
+ static std::optional<bool> is_property_present{};
2789
+
2790
+ if (!is_property_present.has_value())
2791
+ {
2792
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Security.Credentials.IWebAccount", L"WebAccountProvider");
2793
+ }
2794
+
2795
+ if (!is_property_present.value())
2383
2796
  {
2384
2797
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2385
2798
  return nullptr;
@@ -2491,12 +2904,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_security_credentials(void) noexcept
2491
2904
  return nullptr;
2492
2905
  }
2493
2906
 
2494
- if (py::register_python_type(module.get(), &type_spec_KeyCredential, object_bases.get(), nullptr) == -1)
2907
+ py::pytype_handle KeyCredential_type{py::register_python_type(module.get(), &type_spec_KeyCredential, object_bases.get(), nullptr)};
2908
+ if (!KeyCredential_type)
2495
2909
  {
2496
2910
  return nullptr;
2497
2911
  }
2498
2912
 
2499
- if (py::register_python_type(module.get(), &type_spec_KeyCredentialAttestationResult, object_bases.get(), nullptr) == -1)
2913
+ py::pytype_handle KeyCredentialAttestationResult_type{py::register_python_type(module.get(), &type_spec_KeyCredentialAttestationResult, object_bases.get(), nullptr)};
2914
+ if (!KeyCredentialAttestationResult_type)
2500
2915
  {
2501
2916
  return nullptr;
2502
2917
  }
@@ -2507,47 +2922,56 @@ PyMODINIT_FUNC PyInit__winrt_windows_security_credentials(void) noexcept
2507
2922
  return nullptr;
2508
2923
  }
2509
2924
 
2510
- if (py::register_python_type(module.get(), &type_spec_KeyCredentialManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_KeyCredentialManager_Static.get())) == -1)
2925
+ py::pytype_handle KeyCredentialManager_type{py::register_python_type(module.get(), &type_spec_KeyCredentialManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_KeyCredentialManager_Static.get()))};
2926
+ if (!KeyCredentialManager_type)
2511
2927
  {
2512
2928
  return nullptr;
2513
2929
  }
2514
2930
 
2515
- if (py::register_python_type(module.get(), &type_spec_KeyCredentialOperationResult, object_bases.get(), nullptr) == -1)
2931
+ py::pytype_handle KeyCredentialOperationResult_type{py::register_python_type(module.get(), &type_spec_KeyCredentialOperationResult, object_bases.get(), nullptr)};
2932
+ if (!KeyCredentialOperationResult_type)
2516
2933
  {
2517
2934
  return nullptr;
2518
2935
  }
2519
2936
 
2520
- if (py::register_python_type(module.get(), &type_spec_KeyCredentialRetrievalResult, object_bases.get(), nullptr) == -1)
2937
+ py::pytype_handle KeyCredentialRetrievalResult_type{py::register_python_type(module.get(), &type_spec_KeyCredentialRetrievalResult, object_bases.get(), nullptr)};
2938
+ if (!KeyCredentialRetrievalResult_type)
2521
2939
  {
2522
2940
  return nullptr;
2523
2941
  }
2524
2942
 
2525
- if (py::register_python_type(module.get(), &type_spec_PasswordCredential, object_bases.get(), nullptr) == -1)
2943
+ py::pytype_handle PasswordCredential_type{py::register_python_type(module.get(), &type_spec_PasswordCredential, object_bases.get(), nullptr)};
2944
+ if (!PasswordCredential_type)
2526
2945
  {
2527
2946
  return nullptr;
2528
2947
  }
2529
2948
 
2530
- if (py::register_python_type(module.get(), &type_spec_PasswordCredentialPropertyStore, object_bases.get(), nullptr) == -1)
2949
+ py::pytype_handle PasswordCredentialPropertyStore_type{py::register_python_type(module.get(), &type_spec_PasswordCredentialPropertyStore, object_bases.get(), nullptr)};
2950
+ if (!PasswordCredentialPropertyStore_type)
2531
2951
  {
2532
2952
  return nullptr;
2533
2953
  }
2534
2954
 
2535
- if (py::register_python_type(module.get(), &type_spec_PasswordVault, object_bases.get(), nullptr) == -1)
2955
+ py::pytype_handle PasswordVault_type{py::register_python_type(module.get(), &type_spec_PasswordVault, object_bases.get(), nullptr)};
2956
+ if (!PasswordVault_type)
2536
2957
  {
2537
2958
  return nullptr;
2538
2959
  }
2539
2960
 
2540
- if (py::register_python_type(module.get(), &type_spec_WebAccount, object_bases.get(), nullptr) == -1)
2961
+ py::pytype_handle WebAccount_type{py::register_python_type(module.get(), &type_spec_WebAccount, object_bases.get(), nullptr)};
2962
+ if (!WebAccount_type)
2541
2963
  {
2542
2964
  return nullptr;
2543
2965
  }
2544
2966
 
2545
- if (py::register_python_type(module.get(), &type_spec_WebAccountProvider, object_bases.get(), nullptr) == -1)
2967
+ py::pytype_handle WebAccountProvider_type{py::register_python_type(module.get(), &type_spec_WebAccountProvider, object_bases.get(), nullptr)};
2968
+ if (!WebAccountProvider_type)
2546
2969
  {
2547
2970
  return nullptr;
2548
2971
  }
2549
2972
 
2550
- if (py::register_python_type(module.get(), &type_spec_IWebAccount, object_bases.get(), nullptr) == -1)
2973
+ py::pytype_handle IWebAccount_type{py::register_python_type(module.get(), &type_spec_IWebAccount, object_bases.get(), nullptr)};
2974
+ if (!IWebAccount_type)
2551
2975
  {
2552
2976
  return nullptr;
2553
2977
  }
@@ -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.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
- winrt-runtime==2.1.0
3
+ winrt-runtime==2.3.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.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.Credentials
3
- Version: 2.1.0
3
+ Version: 2.3.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,15 +10,15 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.3.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
- Requires-Dist: winrt-Windows.Security.Cryptography.Core[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
21
- Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.3.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.3.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Security.Cryptography.Core[all]==2.3.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.3.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.System[all]==2.3.0; extra == "all"
22
22
 
23
23
  <!-- warning: Please don't edit this file. It was automatically generated. -->
24
24
 
@@ -0,0 +1,8 @@
1
+ winrt-runtime==2.3.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.3.0
5
+ winrt-Windows.Foundation.Collections[all]==2.3.0
6
+ winrt-Windows.Security.Cryptography.Core[all]==2.3.0
7
+ winrt-Windows.Storage.Streams[all]==2.3.0
8
+ winrt-Windows.System[all]==2.3.0
@@ -1,7 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
-
3
- winrt-Windows.Foundation[all]==2.1.0
4
- winrt-Windows.Foundation.Collections[all]==2.1.0
5
- winrt-Windows.Security.Cryptography.Core[all]==2.1.0
6
- winrt-Windows.Storage.Streams[all]==2.1.0
7
- winrt-Windows.System[all]==2.1.0
@@ -1,8 +0,0 @@
1
- winrt-runtime==2.1.0
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.1.0
5
- winrt-Windows.Foundation.Collections[all]==2.1.0
6
- winrt-Windows.Security.Cryptography.Core[all]==2.1.0
7
- winrt-Windows.Storage.Streams[all]==2.1.0
8
- winrt-Windows.System[all]==2.1.0