winrt-Windows.System.UserProfile 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_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/PKG-INFO +9 -9
  2. winrt_windows_system_userprofile-2.3.0/all-requirements.txt +8 -0
  3. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/py.Windows.System.UserProfile.cpp +501 -71
  4. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/pyproject.toml +3 -2
  5. winrt_windows_system_userprofile-2.3.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/requirements.txt +2 -2
  7. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt/_winrt_windows_system_userprofile.pyi +1 -1
  8. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt/windows/system/userprofile/__init__.py +1 -1
  9. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt_Windows.System.UserProfile.egg-info/PKG-INFO +9 -9
  10. winrt_windows_system_userprofile-2.3.0/winrt_Windows.System.UserProfile.egg-info/requires.txt +9 -0
  11. winrt_windows_system_userprofile-2.1.0/all-requirements.txt +0 -8
  12. winrt_windows_system_userprofile-2.1.0/pywinrt-version.txt +0 -1
  13. winrt_windows_system_userprofile-2.1.0/winrt_Windows.System.UserProfile.egg-info/requires.txt +0 -9
  14. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/README.md +0 -0
  15. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/setup.cfg +0 -0
  16. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/setup.py +0 -0
  17. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt/windows/system/userprofile/py.typed +0 -0
  18. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt_Windows.System.UserProfile.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt_Windows.System.UserProfile.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_system_userprofile-2.1.0 → winrt_windows_system_userprofile-2.3.0}/winrt_Windows.System.UserProfile.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.UserProfile
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,16 +10,16 @@ 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.Globalization[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
21
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
22
- 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.Globalization[all]==2.3.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage[all]==2.3.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.3.0; extra == "all"
22
+ Requires-Dist: winrt-Windows.System[all]==2.3.0; extra == "all"
23
23
 
24
24
  <!-- warning: Please don't edit this file. It was automatically generated. -->
25
25
 
@@ -0,0 +1,8 @@
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.Globalization[all]==2.3.0
6
+ winrt-Windows.Storage[all]==2.3.0
7
+ winrt-Windows.Storage.Streams[all]==2.3.0
8
+ 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.System.UserProfile.h"
4
4
 
@@ -21,7 +21,14 @@ namespace py::cpp::Windows::System::UserProfile
21
21
  {
22
22
  try
23
23
  {
24
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AdvertisingManager", L"GetForUser", 1))
24
+ static std::optional<bool> is_overload_present{};
25
+
26
+ if (!is_overload_present.has_value())
27
+ {
28
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AdvertisingManager", L"GetForUser", 1);
29
+ }
30
+
31
+ if (!is_overload_present.value())
25
32
  {
26
33
  py::set_arg_count_version_error(1);
27
34
  return nullptr;
@@ -48,7 +55,14 @@ namespace py::cpp::Windows::System::UserProfile
48
55
  {
49
56
  try
50
57
  {
51
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManager", L"AdvertisingId"))
58
+ static std::optional<bool> is_property_present{};
59
+
60
+ if (!is_property_present.has_value())
61
+ {
62
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManager", L"AdvertisingId");
63
+ }
64
+
65
+ if (!is_property_present.value())
52
66
  {
53
67
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
54
68
  return nullptr;
@@ -133,7 +147,14 @@ namespace py::cpp::Windows::System::UserProfile
133
147
  {
134
148
  try
135
149
  {
136
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManagerForUser", L"AdvertisingId"))
150
+ static std::optional<bool> is_property_present{};
151
+
152
+ if (!is_property_present.has_value())
153
+ {
154
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManagerForUser", L"AdvertisingId");
155
+ }
156
+
157
+ if (!is_property_present.value())
137
158
  {
138
159
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
139
160
  return nullptr;
@@ -152,7 +173,14 @@ namespace py::cpp::Windows::System::UserProfile
152
173
  {
153
174
  try
154
175
  {
155
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManagerForUser", L"User"))
176
+ static std::optional<bool> is_property_present{};
177
+
178
+ if (!is_property_present.has_value())
179
+ {
180
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AdvertisingManagerForUser", L"User");
181
+ }
182
+
183
+ if (!is_property_present.value())
156
184
  {
157
185
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
158
186
  return nullptr;
@@ -243,7 +271,14 @@ namespace py::cpp::Windows::System::UserProfile
243
271
  {
244
272
  try
245
273
  {
246
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"GetDefault", 0))
274
+ static std::optional<bool> is_overload_present{};
275
+
276
+ if (!is_overload_present.has_value())
277
+ {
278
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"GetDefault", 0);
279
+ }
280
+
281
+ if (!is_overload_present.value())
247
282
  {
248
283
  py::set_arg_count_version_error(0);
249
284
  return nullptr;
@@ -272,7 +307,14 @@ namespace py::cpp::Windows::System::UserProfile
272
307
  {
273
308
  try
274
309
  {
275
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"GetForUser", 1))
310
+ static std::optional<bool> is_overload_present{};
311
+
312
+ if (!is_overload_present.has_value())
313
+ {
314
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"GetForUser", 1);
315
+ }
316
+
317
+ if (!is_overload_present.value())
276
318
  {
277
319
  py::set_arg_count_version_error(1);
278
320
  return nullptr;
@@ -299,7 +341,14 @@ namespace py::cpp::Windows::System::UserProfile
299
341
  {
300
342
  try
301
343
  {
302
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"IsEnabled"))
344
+ static std::optional<bool> is_property_present{};
345
+
346
+ if (!is_property_present.has_value())
347
+ {
348
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"IsEnabled");
349
+ }
350
+
351
+ if (!is_property_present.value())
303
352
  {
304
353
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
305
354
  return nullptr;
@@ -318,7 +367,14 @@ namespace py::cpp::Windows::System::UserProfile
318
367
  {
319
368
  try
320
369
  {
321
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"IsSingleAppKioskMode"))
370
+ static std::optional<bool> is_property_present{};
371
+
372
+ if (!is_property_present.has_value())
373
+ {
374
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"IsSingleAppKioskMode");
375
+ }
376
+
377
+ if (!is_property_present.value())
322
378
  {
323
379
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
324
380
  return nullptr;
@@ -337,7 +393,14 @@ namespace py::cpp::Windows::System::UserProfile
337
393
  {
338
394
  try
339
395
  {
340
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.AssignedAccessSettings", L"User"))
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.System.UserProfile.AssignedAccessSettings", L"User");
401
+ }
402
+
403
+ if (!is_property_present.value())
341
404
  {
342
405
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
343
406
  return nullptr;
@@ -456,7 +519,14 @@ namespace py::cpp::Windows::System::UserProfile
456
519
  {
457
520
  try
458
521
  {
459
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"GetDefault", 0))
522
+ static std::optional<bool> is_overload_present{};
523
+
524
+ if (!is_overload_present.has_value())
525
+ {
526
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"GetDefault", 0);
527
+ }
528
+
529
+ if (!is_overload_present.value())
460
530
  {
461
531
  py::set_arg_count_version_error(0);
462
532
  return nullptr;
@@ -485,7 +555,14 @@ namespace py::cpp::Windows::System::UserProfile
485
555
  {
486
556
  try
487
557
  {
488
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"GetForUser", 1))
558
+ static std::optional<bool> is_overload_present{};
559
+
560
+ if (!is_overload_present.has_value())
561
+ {
562
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"GetForUser", 1);
563
+ }
564
+
565
+ if (!is_overload_present.value())
489
566
  {
490
567
  py::set_arg_count_version_error(1);
491
568
  return nullptr;
@@ -512,7 +589,14 @@ namespace py::cpp::Windows::System::UserProfile
512
589
  {
513
590
  try
514
591
  {
515
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"CanUseDiagnosticsToTailorExperiences"))
592
+ static std::optional<bool> is_property_present{};
593
+
594
+ if (!is_property_present.has_value())
595
+ {
596
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"CanUseDiagnosticsToTailorExperiences");
597
+ }
598
+
599
+ if (!is_property_present.value())
516
600
  {
517
601
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
518
602
  return nullptr;
@@ -531,7 +615,14 @@ namespace py::cpp::Windows::System::UserProfile
531
615
  {
532
616
  try
533
617
  {
534
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"User"))
618
+ static std::optional<bool> is_property_present{};
619
+
620
+ if (!is_property_present.has_value())
621
+ {
622
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.DiagnosticsSettings", L"User");
623
+ }
624
+
625
+ if (!is_property_present.value())
535
626
  {
536
627
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
537
628
  return nullptr;
@@ -649,7 +740,14 @@ namespace py::cpp::Windows::System::UserProfile
649
740
  {
650
741
  try
651
742
  {
652
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"First", 0))
743
+ static std::optional<bool> is_overload_present{};
744
+
745
+ if (!is_overload_present.has_value())
746
+ {
747
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"First", 0);
748
+ }
749
+
750
+ if (!is_overload_present.value())
653
751
  {
654
752
  py::set_arg_count_version_error(0);
655
753
  return nullptr;
@@ -678,7 +776,14 @@ namespace py::cpp::Windows::System::UserProfile
678
776
  {
679
777
  try
680
778
  {
681
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"GetDefault", 0))
779
+ static std::optional<bool> is_overload_present{};
780
+
781
+ if (!is_overload_present.has_value())
782
+ {
783
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"GetDefault", 0);
784
+ }
785
+
786
+ if (!is_overload_present.value())
682
787
  {
683
788
  py::set_arg_count_version_error(0);
684
789
  return nullptr;
@@ -707,7 +812,14 @@ namespace py::cpp::Windows::System::UserProfile
707
812
  {
708
813
  try
709
814
  {
710
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"HasKey", 1))
815
+ static std::optional<bool> is_overload_present{};
816
+
817
+ if (!is_overload_present.has_value())
818
+ {
819
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"HasKey", 1);
820
+ }
821
+
822
+ if (!is_overload_present.value())
711
823
  {
712
824
  py::set_arg_count_version_error(1);
713
825
  return nullptr;
@@ -738,7 +850,14 @@ namespace py::cpp::Windows::System::UserProfile
738
850
  {
739
851
  try
740
852
  {
741
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Lookup", 1))
853
+ static std::optional<bool> is_overload_present{};
854
+
855
+ if (!is_overload_present.has_value())
856
+ {
857
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Lookup", 1);
858
+ }
859
+
860
+ if (!is_overload_present.value())
742
861
  {
743
862
  py::set_arg_count_version_error(1);
744
863
  return nullptr;
@@ -769,7 +888,14 @@ namespace py::cpp::Windows::System::UserProfile
769
888
  {
770
889
  try
771
890
  {
772
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Split", 0))
891
+ static std::optional<bool> is_overload_present{};
892
+
893
+ if (!is_overload_present.has_value())
894
+ {
895
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Split", 0);
896
+ }
897
+
898
+ if (!is_overload_present.value())
773
899
  {
774
900
  py::set_arg_count_version_error(0);
775
901
  return nullptr;
@@ -809,7 +935,14 @@ namespace py::cpp::Windows::System::UserProfile
809
935
  {
810
936
  try
811
937
  {
812
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Size"))
938
+ static std::optional<bool> is_property_present{};
939
+
940
+ if (!is_property_present.has_value())
941
+ {
942
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.FirstSignInSettings", L"Size");
943
+ }
944
+
945
+ if (!is_property_present.value())
813
946
  {
814
947
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
815
948
  return nullptr;
@@ -1000,7 +1133,14 @@ namespace py::cpp::Windows::System::UserProfile
1000
1133
  {
1001
1134
  try
1002
1135
  {
1003
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"GetForUser", 1))
1136
+ static std::optional<bool> is_overload_present{};
1137
+
1138
+ if (!is_overload_present.has_value())
1139
+ {
1140
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"GetForUser", 1);
1141
+ }
1142
+
1143
+ if (!is_overload_present.value())
1004
1144
  {
1005
1145
  py::set_arg_count_version_error(1);
1006
1146
  return nullptr;
@@ -1031,7 +1171,14 @@ namespace py::cpp::Windows::System::UserProfile
1031
1171
  {
1032
1172
  try
1033
1173
  {
1034
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"TrySetHomeGeographicRegion", 1))
1174
+ static std::optional<bool> is_overload_present{};
1175
+
1176
+ if (!is_overload_present.has_value())
1177
+ {
1178
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"TrySetHomeGeographicRegion", 1);
1179
+ }
1180
+
1181
+ if (!is_overload_present.value())
1035
1182
  {
1036
1183
  py::set_arg_count_version_error(1);
1037
1184
  return nullptr;
@@ -1062,7 +1209,14 @@ namespace py::cpp::Windows::System::UserProfile
1062
1209
  {
1063
1210
  try
1064
1211
  {
1065
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"TrySetLanguages", 1))
1212
+ static std::optional<bool> is_overload_present{};
1213
+
1214
+ if (!is_overload_present.has_value())
1215
+ {
1216
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"TrySetLanguages", 1);
1217
+ }
1218
+
1219
+ if (!is_overload_present.value())
1066
1220
  {
1067
1221
  py::set_arg_count_version_error(1);
1068
1222
  return nullptr;
@@ -1089,7 +1243,14 @@ namespace py::cpp::Windows::System::UserProfile
1089
1243
  {
1090
1244
  try
1091
1245
  {
1092
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Calendars"))
1246
+ static std::optional<bool> is_property_present{};
1247
+
1248
+ if (!is_property_present.has_value())
1249
+ {
1250
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Calendars");
1251
+ }
1252
+
1253
+ if (!is_property_present.value())
1093
1254
  {
1094
1255
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1095
1256
  return nullptr;
@@ -1108,7 +1269,14 @@ namespace py::cpp::Windows::System::UserProfile
1108
1269
  {
1109
1270
  try
1110
1271
  {
1111
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Clocks"))
1272
+ static std::optional<bool> is_property_present{};
1273
+
1274
+ if (!is_property_present.has_value())
1275
+ {
1276
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Clocks");
1277
+ }
1278
+
1279
+ if (!is_property_present.value())
1112
1280
  {
1113
1281
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1114
1282
  return nullptr;
@@ -1127,7 +1295,14 @@ namespace py::cpp::Windows::System::UserProfile
1127
1295
  {
1128
1296
  try
1129
1297
  {
1130
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Currencies"))
1298
+ static std::optional<bool> is_property_present{};
1299
+
1300
+ if (!is_property_present.has_value())
1301
+ {
1302
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Currencies");
1303
+ }
1304
+
1305
+ if (!is_property_present.value())
1131
1306
  {
1132
1307
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1133
1308
  return nullptr;
@@ -1146,7 +1321,14 @@ namespace py::cpp::Windows::System::UserProfile
1146
1321
  {
1147
1322
  try
1148
1323
  {
1149
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"HomeGeographicRegion"))
1324
+ static std::optional<bool> is_property_present{};
1325
+
1326
+ if (!is_property_present.has_value())
1327
+ {
1328
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"HomeGeographicRegion");
1329
+ }
1330
+
1331
+ if (!is_property_present.value())
1150
1332
  {
1151
1333
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1152
1334
  return nullptr;
@@ -1165,7 +1347,14 @@ namespace py::cpp::Windows::System::UserProfile
1165
1347
  {
1166
1348
  try
1167
1349
  {
1168
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Languages"))
1350
+ static std::optional<bool> is_property_present{};
1351
+
1352
+ if (!is_property_present.has_value())
1353
+ {
1354
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"Languages");
1355
+ }
1356
+
1357
+ if (!is_property_present.value())
1169
1358
  {
1170
1359
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1171
1360
  return nullptr;
@@ -1184,7 +1373,14 @@ namespace py::cpp::Windows::System::UserProfile
1184
1373
  {
1185
1374
  try
1186
1375
  {
1187
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"WeekStartsOn"))
1376
+ static std::optional<bool> is_property_present{};
1377
+
1378
+ if (!is_property_present.has_value())
1379
+ {
1380
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferences", L"WeekStartsOn");
1381
+ }
1382
+
1383
+ if (!is_property_present.value())
1188
1384
  {
1189
1385
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1190
1386
  return nullptr;
@@ -1276,7 +1472,14 @@ namespace py::cpp::Windows::System::UserProfile
1276
1472
  {
1277
1473
  try
1278
1474
  {
1279
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Calendars"))
1475
+ static std::optional<bool> is_property_present{};
1476
+
1477
+ if (!is_property_present.has_value())
1478
+ {
1479
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Calendars");
1480
+ }
1481
+
1482
+ if (!is_property_present.value())
1280
1483
  {
1281
1484
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1282
1485
  return nullptr;
@@ -1295,7 +1498,14 @@ namespace py::cpp::Windows::System::UserProfile
1295
1498
  {
1296
1499
  try
1297
1500
  {
1298
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Clocks"))
1501
+ static std::optional<bool> is_property_present{};
1502
+
1503
+ if (!is_property_present.has_value())
1504
+ {
1505
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Clocks");
1506
+ }
1507
+
1508
+ if (!is_property_present.value())
1299
1509
  {
1300
1510
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1301
1511
  return nullptr;
@@ -1314,7 +1524,14 @@ namespace py::cpp::Windows::System::UserProfile
1314
1524
  {
1315
1525
  try
1316
1526
  {
1317
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Currencies"))
1527
+ static std::optional<bool> is_property_present{};
1528
+
1529
+ if (!is_property_present.has_value())
1530
+ {
1531
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Currencies");
1532
+ }
1533
+
1534
+ if (!is_property_present.value())
1318
1535
  {
1319
1536
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1320
1537
  return nullptr;
@@ -1333,7 +1550,14 @@ namespace py::cpp::Windows::System::UserProfile
1333
1550
  {
1334
1551
  try
1335
1552
  {
1336
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"HomeGeographicRegion"))
1553
+ static std::optional<bool> is_property_present{};
1554
+
1555
+ if (!is_property_present.has_value())
1556
+ {
1557
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"HomeGeographicRegion");
1558
+ }
1559
+
1560
+ if (!is_property_present.value())
1337
1561
  {
1338
1562
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1339
1563
  return nullptr;
@@ -1352,7 +1576,14 @@ namespace py::cpp::Windows::System::UserProfile
1352
1576
  {
1353
1577
  try
1354
1578
  {
1355
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Languages"))
1579
+ static std::optional<bool> is_property_present{};
1580
+
1581
+ if (!is_property_present.has_value())
1582
+ {
1583
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"Languages");
1584
+ }
1585
+
1586
+ if (!is_property_present.value())
1356
1587
  {
1357
1588
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1358
1589
  return nullptr;
@@ -1371,7 +1602,14 @@ namespace py::cpp::Windows::System::UserProfile
1371
1602
  {
1372
1603
  try
1373
1604
  {
1374
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"User"))
1605
+ static std::optional<bool> is_property_present{};
1606
+
1607
+ if (!is_property_present.has_value())
1608
+ {
1609
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"User");
1610
+ }
1611
+
1612
+ if (!is_property_present.value())
1375
1613
  {
1376
1614
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1377
1615
  return nullptr;
@@ -1390,7 +1628,14 @@ namespace py::cpp::Windows::System::UserProfile
1390
1628
  {
1391
1629
  try
1392
1630
  {
1393
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"WeekStartsOn"))
1631
+ static std::optional<bool> is_property_present{};
1632
+
1633
+ if (!is_property_present.has_value())
1634
+ {
1635
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.GlobalizationPreferencesForUser", L"WeekStartsOn");
1636
+ }
1637
+
1638
+ if (!is_property_present.value())
1394
1639
  {
1395
1640
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1396
1641
  return nullptr;
@@ -1478,7 +1723,14 @@ namespace py::cpp::Windows::System::UserProfile
1478
1723
  {
1479
1724
  try
1480
1725
  {
1481
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"GetImageStream", 0))
1726
+ static std::optional<bool> is_overload_present{};
1727
+
1728
+ if (!is_overload_present.has_value())
1729
+ {
1730
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"GetImageStream", 0);
1731
+ }
1732
+
1733
+ if (!is_overload_present.value())
1482
1734
  {
1483
1735
  py::set_arg_count_version_error(0);
1484
1736
  return nullptr;
@@ -1507,7 +1759,14 @@ namespace py::cpp::Windows::System::UserProfile
1507
1759
  {
1508
1760
  try
1509
1761
  {
1510
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"RequestSetImageFeedAsync", 1))
1762
+ static std::optional<bool> is_overload_present{};
1763
+
1764
+ if (!is_overload_present.has_value())
1765
+ {
1766
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"RequestSetImageFeedAsync", 1);
1767
+ }
1768
+
1769
+ if (!is_overload_present.value())
1511
1770
  {
1512
1771
  py::set_arg_count_version_error(1);
1513
1772
  return nullptr;
@@ -1538,7 +1797,14 @@ namespace py::cpp::Windows::System::UserProfile
1538
1797
  {
1539
1798
  try
1540
1799
  {
1541
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"SetImageFileAsync", 1))
1800
+ static std::optional<bool> is_overload_present{};
1801
+
1802
+ if (!is_overload_present.has_value())
1803
+ {
1804
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"SetImageFileAsync", 1);
1805
+ }
1806
+
1807
+ if (!is_overload_present.value())
1542
1808
  {
1543
1809
  py::set_arg_count_version_error(1);
1544
1810
  return nullptr;
@@ -1569,7 +1835,14 @@ namespace py::cpp::Windows::System::UserProfile
1569
1835
  {
1570
1836
  try
1571
1837
  {
1572
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"SetImageStreamAsync", 1))
1838
+ static std::optional<bool> is_overload_present{};
1839
+
1840
+ if (!is_overload_present.has_value())
1841
+ {
1842
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"SetImageStreamAsync", 1);
1843
+ }
1844
+
1845
+ if (!is_overload_present.value())
1573
1846
  {
1574
1847
  py::set_arg_count_version_error(1);
1575
1848
  return nullptr;
@@ -1600,7 +1873,14 @@ namespace py::cpp::Windows::System::UserProfile
1600
1873
  {
1601
1874
  try
1602
1875
  {
1603
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"TryRemoveImageFeed", 0))
1876
+ static std::optional<bool> is_overload_present{};
1877
+
1878
+ if (!is_overload_present.has_value())
1879
+ {
1880
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.LockScreen", L"TryRemoveImageFeed", 0);
1881
+ }
1882
+
1883
+ if (!is_overload_present.value())
1604
1884
  {
1605
1885
  py::set_arg_count_version_error(0);
1606
1886
  return nullptr;
@@ -1625,7 +1905,14 @@ namespace py::cpp::Windows::System::UserProfile
1625
1905
  {
1626
1906
  try
1627
1907
  {
1628
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.LockScreen", L"OriginalImageFile"))
1908
+ static std::optional<bool> is_property_present{};
1909
+
1910
+ if (!is_property_present.has_value())
1911
+ {
1912
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.LockScreen", L"OriginalImageFile");
1913
+ }
1914
+
1915
+ if (!is_property_present.value())
1629
1916
  {
1630
1917
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1631
1918
  return nullptr;
@@ -1710,7 +1997,14 @@ namespace py::cpp::Windows::System::UserProfile
1710
1997
  {
1711
1998
  try
1712
1999
  {
1713
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetAccountPicture", 1))
2000
+ static std::optional<bool> is_overload_present{};
2001
+
2002
+ if (!is_overload_present.has_value())
2003
+ {
2004
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetAccountPicture", 1);
2005
+ }
2006
+
2007
+ if (!is_overload_present.value())
1714
2008
  {
1715
2009
  py::set_arg_count_version_error(1);
1716
2010
  return nullptr;
@@ -1741,7 +2035,14 @@ namespace py::cpp::Windows::System::UserProfile
1741
2035
  {
1742
2036
  try
1743
2037
  {
1744
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetDisplayNameAsync", 0))
2038
+ static std::optional<bool> is_overload_present{};
2039
+
2040
+ if (!is_overload_present.has_value())
2041
+ {
2042
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetDisplayNameAsync", 0);
2043
+ }
2044
+
2045
+ if (!is_overload_present.value())
1745
2046
  {
1746
2047
  py::set_arg_count_version_error(0);
1747
2048
  return nullptr;
@@ -1770,7 +2071,14 @@ namespace py::cpp::Windows::System::UserProfile
1770
2071
  {
1771
2072
  try
1772
2073
  {
1773
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetDomainNameAsync", 0))
2074
+ static std::optional<bool> is_overload_present{};
2075
+
2076
+ if (!is_overload_present.has_value())
2077
+ {
2078
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetDomainNameAsync", 0);
2079
+ }
2080
+
2081
+ if (!is_overload_present.value())
1774
2082
  {
1775
2083
  py::set_arg_count_version_error(0);
1776
2084
  return nullptr;
@@ -1799,7 +2107,14 @@ namespace py::cpp::Windows::System::UserProfile
1799
2107
  {
1800
2108
  try
1801
2109
  {
1802
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetFirstNameAsync", 0))
2110
+ static std::optional<bool> is_overload_present{};
2111
+
2112
+ if (!is_overload_present.has_value())
2113
+ {
2114
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetFirstNameAsync", 0);
2115
+ }
2116
+
2117
+ if (!is_overload_present.value())
1803
2118
  {
1804
2119
  py::set_arg_count_version_error(0);
1805
2120
  return nullptr;
@@ -1828,7 +2143,14 @@ namespace py::cpp::Windows::System::UserProfile
1828
2143
  {
1829
2144
  try
1830
2145
  {
1831
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetLastNameAsync", 0))
2146
+ static std::optional<bool> is_overload_present{};
2147
+
2148
+ if (!is_overload_present.has_value())
2149
+ {
2150
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetLastNameAsync", 0);
2151
+ }
2152
+
2153
+ if (!is_overload_present.value())
1832
2154
  {
1833
2155
  py::set_arg_count_version_error(0);
1834
2156
  return nullptr;
@@ -1857,7 +2179,14 @@ namespace py::cpp::Windows::System::UserProfile
1857
2179
  {
1858
2180
  try
1859
2181
  {
1860
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetPrincipalNameAsync", 0))
2182
+ static std::optional<bool> is_overload_present{};
2183
+
2184
+ if (!is_overload_present.has_value())
2185
+ {
2186
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetPrincipalNameAsync", 0);
2187
+ }
2188
+
2189
+ if (!is_overload_present.value())
1861
2190
  {
1862
2191
  py::set_arg_count_version_error(0);
1863
2192
  return nullptr;
@@ -1886,7 +2215,14 @@ namespace py::cpp::Windows::System::UserProfile
1886
2215
  {
1887
2216
  try
1888
2217
  {
1889
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"GetSessionInitiationProtocolUriAsync", 0))
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.System.UserProfile.UserInformation", L"GetSessionInitiationProtocolUriAsync", 0);
2223
+ }
2224
+
2225
+ if (!is_overload_present.value())
1890
2226
  {
1891
2227
  py::set_arg_count_version_error(0);
1892
2228
  return nullptr;
@@ -1915,7 +2251,14 @@ namespace py::cpp::Windows::System::UserProfile
1915
2251
  {
1916
2252
  try
1917
2253
  {
1918
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPictureAsync", 1))
2254
+ static std::optional<bool> is_overload_present{};
2255
+
2256
+ if (!is_overload_present.has_value())
2257
+ {
2258
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPictureAsync", 1);
2259
+ }
2260
+
2261
+ if (!is_overload_present.value())
1919
2262
  {
1920
2263
  py::set_arg_count_version_error(1);
1921
2264
  return nullptr;
@@ -1946,7 +2289,14 @@ namespace py::cpp::Windows::System::UserProfile
1946
2289
  {
1947
2290
  try
1948
2291
  {
1949
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPictureFromStreamAsync", 1))
2292
+ static std::optional<bool> is_overload_present{};
2293
+
2294
+ if (!is_overload_present.has_value())
2295
+ {
2296
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPictureFromStreamAsync", 1);
2297
+ }
2298
+
2299
+ if (!is_overload_present.value())
1950
2300
  {
1951
2301
  py::set_arg_count_version_error(1);
1952
2302
  return nullptr;
@@ -1977,7 +2327,14 @@ namespace py::cpp::Windows::System::UserProfile
1977
2327
  {
1978
2328
  try
1979
2329
  {
1980
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPicturesAsync", 3))
2330
+ static std::optional<bool> is_overload_present{};
2331
+
2332
+ if (!is_overload_present.has_value())
2333
+ {
2334
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPicturesAsync", 3);
2335
+ }
2336
+
2337
+ if (!is_overload_present.value())
1981
2338
  {
1982
2339
  py::set_arg_count_version_error(3);
1983
2340
  return nullptr;
@@ -2010,7 +2367,14 @@ namespace py::cpp::Windows::System::UserProfile
2010
2367
  {
2011
2368
  try
2012
2369
  {
2013
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPicturesFromStreamsAsync", 3))
2370
+ static std::optional<bool> is_overload_present{};
2371
+
2372
+ if (!is_overload_present.has_value())
2373
+ {
2374
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserInformation", L"SetAccountPicturesFromStreamsAsync", 3);
2375
+ }
2376
+
2377
+ if (!is_overload_present.value())
2014
2378
  {
2015
2379
  py::set_arg_count_version_error(3);
2016
2380
  return nullptr;
@@ -2039,7 +2403,14 @@ namespace py::cpp::Windows::System::UserProfile
2039
2403
  {
2040
2404
  try
2041
2405
  {
2042
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChangeEnabled"))
2406
+ static std::optional<bool> is_property_present{};
2407
+
2408
+ if (!is_property_present.has_value())
2409
+ {
2410
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChangeEnabled");
2411
+ }
2412
+
2413
+ if (!is_property_present.value())
2043
2414
  {
2044
2415
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2045
2416
  return nullptr;
@@ -2058,7 +2429,14 @@ namespace py::cpp::Windows::System::UserProfile
2058
2429
  {
2059
2430
  try
2060
2431
  {
2061
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserInformation", L"NameAccessAllowed"))
2432
+ static std::optional<bool> is_property_present{};
2433
+
2434
+ if (!is_property_present.has_value())
2435
+ {
2436
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserInformation", L"NameAccessAllowed");
2437
+ }
2438
+
2439
+ if (!is_property_present.value())
2062
2440
  {
2063
2441
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2064
2442
  return nullptr;
@@ -2077,7 +2455,14 @@ namespace py::cpp::Windows::System::UserProfile
2077
2455
  {
2078
2456
  try
2079
2457
  {
2080
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChanged"))
2458
+ static std::optional<bool> is_event_present{};
2459
+
2460
+ if (!is_event_present.has_value())
2461
+ {
2462
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChanged");
2463
+ }
2464
+
2465
+ if (!is_event_present.value())
2081
2466
  {
2082
2467
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
2083
2468
  return nullptr;
@@ -2098,7 +2483,14 @@ namespace py::cpp::Windows::System::UserProfile
2098
2483
  {
2099
2484
  try
2100
2485
  {
2101
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChanged"))
2486
+ static std::optional<bool> is_event_present{};
2487
+
2488
+ if (!is_event_present.has_value())
2489
+ {
2490
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.UserProfile.UserInformation", L"AccountPictureChanged");
2491
+ }
2492
+
2493
+ if (!is_event_present.value())
2102
2494
  {
2103
2495
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
2104
2496
  return nullptr;
@@ -2203,7 +2595,14 @@ namespace py::cpp::Windows::System::UserProfile
2203
2595
  {
2204
2596
  try
2205
2597
  {
2206
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"IsSupported", 0))
2598
+ static std::optional<bool> is_overload_present{};
2599
+
2600
+ if (!is_overload_present.has_value())
2601
+ {
2602
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"IsSupported", 0);
2603
+ }
2604
+
2605
+ if (!is_overload_present.value())
2207
2606
  {
2208
2607
  py::set_arg_count_version_error(0);
2209
2608
  return nullptr;
@@ -2232,7 +2631,14 @@ namespace py::cpp::Windows::System::UserProfile
2232
2631
  {
2233
2632
  try
2234
2633
  {
2235
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"TrySetLockScreenImageAsync", 1))
2634
+ static std::optional<bool> is_overload_present{};
2635
+
2636
+ if (!is_overload_present.has_value())
2637
+ {
2638
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"TrySetLockScreenImageAsync", 1);
2639
+ }
2640
+
2641
+ if (!is_overload_present.value())
2236
2642
  {
2237
2643
  py::set_arg_count_version_error(1);
2238
2644
  return nullptr;
@@ -2263,7 +2669,14 @@ namespace py::cpp::Windows::System::UserProfile
2263
2669
  {
2264
2670
  try
2265
2671
  {
2266
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"TrySetWallpaperImageAsync", 1))
2672
+ static std::optional<bool> is_overload_present{};
2673
+
2674
+ if (!is_overload_present.has_value())
2675
+ {
2676
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"TrySetWallpaperImageAsync", 1);
2677
+ }
2678
+
2679
+ if (!is_overload_present.value())
2267
2680
  {
2268
2681
  py::set_arg_count_version_error(1);
2269
2682
  return nullptr;
@@ -2290,7 +2703,14 @@ namespace py::cpp::Windows::System::UserProfile
2290
2703
  {
2291
2704
  try
2292
2705
  {
2293
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"Current"))
2706
+ static std::optional<bool> is_property_present{};
2707
+
2708
+ if (!is_property_present.has_value())
2709
+ {
2710
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.UserProfile.UserProfilePersonalizationSettings", L"Current");
2711
+ }
2712
+
2713
+ if (!is_property_present.value())
2294
2714
  {
2295
2715
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
2296
2716
  return nullptr;
@@ -2434,12 +2854,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2434
2854
  return nullptr;
2435
2855
  }
2436
2856
 
2437
- if (py::register_python_type(module.get(), &type_spec_AdvertisingManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_AdvertisingManager_Static.get())) == -1)
2857
+ py::pytype_handle AdvertisingManager_type{py::register_python_type(module.get(), &type_spec_AdvertisingManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_AdvertisingManager_Static.get()))};
2858
+ if (!AdvertisingManager_type)
2438
2859
  {
2439
2860
  return nullptr;
2440
2861
  }
2441
2862
 
2442
- if (py::register_python_type(module.get(), &type_spec_AdvertisingManagerForUser, object_bases.get(), nullptr) == -1)
2863
+ py::pytype_handle AdvertisingManagerForUser_type{py::register_python_type(module.get(), &type_spec_AdvertisingManagerForUser, object_bases.get(), nullptr)};
2864
+ if (!AdvertisingManagerForUser_type)
2443
2865
  {
2444
2866
  return nullptr;
2445
2867
  }
@@ -2450,7 +2872,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2450
2872
  return nullptr;
2451
2873
  }
2452
2874
 
2453
- if (py::register_python_type(module.get(), &type_spec_AssignedAccessSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_AssignedAccessSettings_Static.get())) == -1)
2875
+ py::pytype_handle AssignedAccessSettings_type{py::register_python_type(module.get(), &type_spec_AssignedAccessSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_AssignedAccessSettings_Static.get()))};
2876
+ if (!AssignedAccessSettings_type)
2454
2877
  {
2455
2878
  return nullptr;
2456
2879
  }
@@ -2461,7 +2884,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2461
2884
  return nullptr;
2462
2885
  }
2463
2886
 
2464
- if (py::register_python_type(module.get(), &type_spec_DiagnosticsSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_DiagnosticsSettings_Static.get())) == -1)
2887
+ py::pytype_handle DiagnosticsSettings_type{py::register_python_type(module.get(), &type_spec_DiagnosticsSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_DiagnosticsSettings_Static.get()))};
2888
+ if (!DiagnosticsSettings_type)
2465
2889
  {
2466
2890
  return nullptr;
2467
2891
  }
@@ -2472,7 +2896,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2472
2896
  return nullptr;
2473
2897
  }
2474
2898
 
2475
- if (py::register_python_type(module.get(), &type_spec_FirstSignInSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_FirstSignInSettings_Static.get())) == -1)
2899
+ py::pytype_handle FirstSignInSettings_type{py::register_python_type(module.get(), &type_spec_FirstSignInSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_FirstSignInSettings_Static.get()))};
2900
+ if (!FirstSignInSettings_type)
2476
2901
  {
2477
2902
  return nullptr;
2478
2903
  }
@@ -2483,12 +2908,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2483
2908
  return nullptr;
2484
2909
  }
2485
2910
 
2486
- if (py::register_python_type(module.get(), &type_spec_GlobalizationPreferences, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_GlobalizationPreferences_Static.get())) == -1)
2911
+ py::pytype_handle GlobalizationPreferences_type{py::register_python_type(module.get(), &type_spec_GlobalizationPreferences, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_GlobalizationPreferences_Static.get()))};
2912
+ if (!GlobalizationPreferences_type)
2487
2913
  {
2488
2914
  return nullptr;
2489
2915
  }
2490
2916
 
2491
- if (py::register_python_type(module.get(), &type_spec_GlobalizationPreferencesForUser, object_bases.get(), nullptr) == -1)
2917
+ py::pytype_handle GlobalizationPreferencesForUser_type{py::register_python_type(module.get(), &type_spec_GlobalizationPreferencesForUser, object_bases.get(), nullptr)};
2918
+ if (!GlobalizationPreferencesForUser_type)
2492
2919
  {
2493
2920
  return nullptr;
2494
2921
  }
@@ -2499,7 +2926,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2499
2926
  return nullptr;
2500
2927
  }
2501
2928
 
2502
- if (py::register_python_type(module.get(), &type_spec_LockScreen, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LockScreen_Static.get())) == -1)
2929
+ py::pytype_handle LockScreen_type{py::register_python_type(module.get(), &type_spec_LockScreen, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LockScreen_Static.get()))};
2930
+ if (!LockScreen_type)
2503
2931
  {
2504
2932
  return nullptr;
2505
2933
  }
@@ -2510,7 +2938,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2510
2938
  return nullptr;
2511
2939
  }
2512
2940
 
2513
- if (py::register_python_type(module.get(), &type_spec_UserInformation, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserInformation_Static.get())) == -1)
2941
+ py::pytype_handle UserInformation_type{py::register_python_type(module.get(), &type_spec_UserInformation, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserInformation_Static.get()))};
2942
+ if (!UserInformation_type)
2514
2943
  {
2515
2944
  return nullptr;
2516
2945
  }
@@ -2521,7 +2950,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_userprofile(void) noexcept
2521
2950
  return nullptr;
2522
2951
  }
2523
2952
 
2524
- if (py::register_python_type(module.get(), &type_spec_UserProfilePersonalizationSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserProfilePersonalizationSettings_Static.get())) == -1)
2953
+ py::pytype_handle UserProfilePersonalizationSettings_type{py::register_python_type(module.get(), &type_spec_UserProfilePersonalizationSettings, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserProfilePersonalizationSettings_Static.get()))};
2954
+ if (!UserProfilePersonalizationSettings_type)
2525
2955
  {
2526
2956
  return nullptr;
2527
2957
  }
@@ -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.System.UserProfile
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,16 +10,16 @@ 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.Globalization[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
21
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
22
- 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.Globalization[all]==2.3.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage[all]==2.3.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.3.0; extra == "all"
22
+ Requires-Dist: winrt-Windows.System[all]==2.3.0; extra == "all"
23
23
 
24
24
  <!-- warning: Please don't edit this file. It was automatically generated. -->
25
25
 
@@ -0,0 +1,9 @@
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.Globalization[all]==2.3.0
7
+ winrt-Windows.Storage[all]==2.3.0
8
+ winrt-Windows.Storage.Streams[all]==2.3.0
9
+ winrt-Windows.System[all]==2.3.0
@@ -1,8 +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.Globalization[all]==2.1.0
6
- winrt-Windows.Storage[all]==2.1.0
7
- winrt-Windows.Storage.Streams[all]==2.1.0
8
- winrt-Windows.System[all]==2.1.0
@@ -1,9 +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.Globalization[all]==2.1.0
7
- winrt-Windows.Storage[all]==2.1.0
8
- winrt-Windows.Storage.Streams[all]==2.1.0
9
- winrt-Windows.System[all]==2.1.0