winrt-Windows.Services.Maps.LocalSearch 2.0.1__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/PKG-INFO +8 -8
  2. winrt_windows_services_maps_localsearch-2.2.0/all-requirements.txt +7 -0
  3. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/py.Windows.Services.Maps.LocalSearch.cpp +418 -238
  4. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_services_maps_localsearch-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt/_winrt_windows_services_maps_localsearch.pyi +16 -19
  8. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt/windows/services/maps/localsearch/__init__.py +1 -1
  9. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt_Windows.Services.Maps.LocalSearch.egg-info/PKG-INFO +8 -8
  10. winrt_windows_services_maps_localsearch-2.2.0/winrt_Windows.Services.Maps.LocalSearch.egg-info/requires.txt +8 -0
  11. winrt_windows_services_maps_localsearch-2.0.1/all-requirements.txt +0 -7
  12. winrt_windows_services_maps_localsearch-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_services_maps_localsearch-2.0.1/winrt_Windows.Services.Maps.LocalSearch.egg-info/requires.txt +0 -8
  14. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/README.md +0 -0
  15. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/setup.py +0 -0
  17. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt/windows/services/maps/localsearch/py.typed +0 -0
  18. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt_Windows.Services.Maps.LocalSearch.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt_Windows.Services.Maps.LocalSearch.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_services_maps_localsearch-2.0.1 → winrt_windows_services_maps_localsearch-2.2.0}/winrt_Windows.Services.Maps.LocalSearch.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Services.Maps.LocalSearch
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Geolocation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Globalization[all]==2.0.1; extra == "all"
21
- Requires-Dist: winrt-Windows.Services.Maps[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Geolocation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Globalization[all]==2.2.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Services.Maps[all]==2.2.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.2.0
2
+
3
+ winrt-Windows.Devices.Geolocation[all]==2.2.0
4
+ winrt-Windows.Foundation[all]==2.2.0
5
+ winrt-Windows.Foundation.Collections[all]==2.2.0
6
+ winrt-Windows.Globalization[all]==2.2.0
7
+ winrt-Windows.Services.Maps[all]==2.2.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.Services.Maps.LocalSearch.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Services::Maps::LocalSearch
7
6
  {
8
7
  // ----- LocalCategories class --------------------
@@ -16,14 +15,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
16
15
 
17
16
  static PyObject* LocalCategories_get_All(PyObject* /*unused*/, void* /*unused*/) noexcept
18
17
  {
19
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"All"))
20
- {
21
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
22
- return nullptr;
23
- }
24
-
25
18
  try
26
19
  {
20
+ static std::optional<bool> is_property_present{};
21
+
22
+ if (!is_property_present.has_value())
23
+ {
24
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"All");
25
+ }
26
+
27
+ if (!is_property_present.value())
28
+ {
29
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
30
+ return nullptr;
31
+ }
32
+
27
33
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::All());
28
34
  }
29
35
  catch (...)
@@ -35,14 +41,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
35
41
 
36
42
  static PyObject* LocalCategories_get_BankAndCreditUnions(PyObject* /*unused*/, void* /*unused*/) noexcept
37
43
  {
38
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"BankAndCreditUnions"))
39
- {
40
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
41
- return nullptr;
42
- }
43
-
44
44
  try
45
45
  {
46
+ static std::optional<bool> is_property_present{};
47
+
48
+ if (!is_property_present.has_value())
49
+ {
50
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"BankAndCreditUnions");
51
+ }
52
+
53
+ if (!is_property_present.value())
54
+ {
55
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
56
+ return nullptr;
57
+ }
58
+
46
59
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::BankAndCreditUnions());
47
60
  }
48
61
  catch (...)
@@ -54,14 +67,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
54
67
 
55
68
  static PyObject* LocalCategories_get_EatDrink(PyObject* /*unused*/, void* /*unused*/) noexcept
56
69
  {
57
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"EatDrink"))
58
- {
59
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
60
- return nullptr;
61
- }
62
-
63
70
  try
64
71
  {
72
+ static std::optional<bool> is_property_present{};
73
+
74
+ if (!is_property_present.has_value())
75
+ {
76
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"EatDrink");
77
+ }
78
+
79
+ if (!is_property_present.value())
80
+ {
81
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
82
+ return nullptr;
83
+ }
84
+
65
85
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::EatDrink());
66
86
  }
67
87
  catch (...)
@@ -73,14 +93,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
73
93
 
74
94
  static PyObject* LocalCategories_get_Hospitals(PyObject* /*unused*/, void* /*unused*/) noexcept
75
95
  {
76
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Hospitals"))
77
- {
78
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
79
- return nullptr;
80
- }
81
-
82
96
  try
83
97
  {
98
+ static std::optional<bool> is_property_present{};
99
+
100
+ if (!is_property_present.has_value())
101
+ {
102
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Hospitals");
103
+ }
104
+
105
+ if (!is_property_present.value())
106
+ {
107
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
108
+ return nullptr;
109
+ }
110
+
84
111
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Hospitals());
85
112
  }
86
113
  catch (...)
@@ -92,14 +119,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
92
119
 
93
120
  static PyObject* LocalCategories_get_HotelsAndMotels(PyObject* /*unused*/, void* /*unused*/) noexcept
94
121
  {
95
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"HotelsAndMotels"))
96
- {
97
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
98
- return nullptr;
99
- }
100
-
101
122
  try
102
123
  {
124
+ static std::optional<bool> is_property_present{};
125
+
126
+ if (!is_property_present.has_value())
127
+ {
128
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"HotelsAndMotels");
129
+ }
130
+
131
+ if (!is_property_present.value())
132
+ {
133
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
134
+ return nullptr;
135
+ }
136
+
103
137
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::HotelsAndMotels());
104
138
  }
105
139
  catch (...)
@@ -111,14 +145,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
111
145
 
112
146
  static PyObject* LocalCategories_get_Parking(PyObject* /*unused*/, void* /*unused*/) noexcept
113
147
  {
114
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Parking"))
115
- {
116
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
117
- return nullptr;
118
- }
119
-
120
148
  try
121
149
  {
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.Services.Maps.LocalSearch.LocalCategories", L"Parking");
155
+ }
156
+
157
+ if (!is_property_present.value())
158
+ {
159
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
160
+ return nullptr;
161
+ }
162
+
122
163
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Parking());
123
164
  }
124
165
  catch (...)
@@ -130,14 +171,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
130
171
 
131
172
  static PyObject* LocalCategories_get_SeeDo(PyObject* /*unused*/, void* /*unused*/) noexcept
132
173
  {
133
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"SeeDo"))
134
- {
135
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
136
- return nullptr;
137
- }
138
-
139
174
  try
140
175
  {
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.Services.Maps.LocalSearch.LocalCategories", L"SeeDo");
181
+ }
182
+
183
+ if (!is_property_present.value())
184
+ {
185
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
186
+ return nullptr;
187
+ }
188
+
141
189
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::SeeDo());
142
190
  }
143
191
  catch (...)
@@ -149,14 +197,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
149
197
 
150
198
  static PyObject* LocalCategories_get_Shop(PyObject* /*unused*/, void* /*unused*/) noexcept
151
199
  {
152
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Shop"))
153
- {
154
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
155
- return nullptr;
156
- }
157
-
158
200
  try
159
201
  {
202
+ static std::optional<bool> is_property_present{};
203
+
204
+ if (!is_property_present.has_value())
205
+ {
206
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Shop");
207
+ }
208
+
209
+ if (!is_property_present.value())
210
+ {
211
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
212
+ return nullptr;
213
+ }
214
+
160
215
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Shop());
161
216
  }
162
217
  catch (...)
@@ -174,22 +229,19 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
174
229
  { }
175
230
  };
176
231
 
177
- static PyType_Slot _type_slots_LocalCategories[] =
178
- {
232
+ static PyType_Slot _type_slots_LocalCategories[] = {
179
233
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalCategories) },
180
234
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalCategories) },
181
235
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalCategories) },
182
- { },
236
+ { }
183
237
  };
184
238
 
185
- static PyType_Spec type_spec_LocalCategories =
186
- {
239
+ static PyType_Spec type_spec_LocalCategories = {
187
240
  "winrt._winrt_windows_services_maps_localsearch.LocalCategories",
188
241
  0,
189
242
  0,
190
243
  Py_TPFLAGS_DEFAULT,
191
- _type_slots_LocalCategories
192
- };
244
+ _type_slots_LocalCategories};
193
245
 
194
246
  static PyGetSetDef getset_LocalCategories_Static[] = {
195
247
  { "all", reinterpret_cast<getter>(LocalCategories_get_All), nullptr, nullptr, nullptr },
@@ -243,14 +295,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
243
295
 
244
296
  static PyObject* LocalLocation_get_Address(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
245
297
  {
246
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Address"))
247
- {
248
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
249
- return nullptr;
250
- }
251
-
252
298
  try
253
299
  {
300
+ static std::optional<bool> is_property_present{};
301
+
302
+ if (!is_property_present.has_value())
303
+ {
304
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Address");
305
+ }
306
+
307
+ if (!is_property_present.value())
308
+ {
309
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
310
+ return nullptr;
311
+ }
312
+
254
313
  return py::convert(self->obj.Address());
255
314
  }
256
315
  catch (...)
@@ -262,14 +321,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
262
321
 
263
322
  static PyObject* LocalLocation_get_DataAttribution(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
264
323
  {
265
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DataAttribution"))
266
- {
267
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
268
- return nullptr;
269
- }
270
-
271
324
  try
272
325
  {
326
+ static std::optional<bool> is_property_present{};
327
+
328
+ if (!is_property_present.has_value())
329
+ {
330
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DataAttribution");
331
+ }
332
+
333
+ if (!is_property_present.value())
334
+ {
335
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
336
+ return nullptr;
337
+ }
338
+
273
339
  return py::convert(self->obj.DataAttribution());
274
340
  }
275
341
  catch (...)
@@ -281,14 +347,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
281
347
 
282
348
  static PyObject* LocalLocation_get_Description(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
283
349
  {
284
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Description"))
285
- {
286
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
287
- return nullptr;
288
- }
289
-
290
350
  try
291
351
  {
352
+ static std::optional<bool> is_property_present{};
353
+
354
+ if (!is_property_present.has_value())
355
+ {
356
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Description");
357
+ }
358
+
359
+ if (!is_property_present.value())
360
+ {
361
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
362
+ return nullptr;
363
+ }
364
+
292
365
  return py::convert(self->obj.Description());
293
366
  }
294
367
  catch (...)
@@ -300,14 +373,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
300
373
 
301
374
  static PyObject* LocalLocation_get_DisplayName(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
302
375
  {
303
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DisplayName"))
304
- {
305
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
306
- return nullptr;
307
- }
308
-
309
376
  try
310
377
  {
378
+ static std::optional<bool> is_property_present{};
379
+
380
+ if (!is_property_present.has_value())
381
+ {
382
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DisplayName");
383
+ }
384
+
385
+ if (!is_property_present.value())
386
+ {
387
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
388
+ return nullptr;
389
+ }
390
+
311
391
  return py::convert(self->obj.DisplayName());
312
392
  }
313
393
  catch (...)
@@ -319,14 +399,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
319
399
 
320
400
  static PyObject* LocalLocation_get_Identifier(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
321
401
  {
322
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Identifier"))
323
- {
324
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
325
- return nullptr;
326
- }
327
-
328
402
  try
329
403
  {
404
+ static std::optional<bool> is_property_present{};
405
+
406
+ if (!is_property_present.has_value())
407
+ {
408
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Identifier");
409
+ }
410
+
411
+ if (!is_property_present.value())
412
+ {
413
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
414
+ return nullptr;
415
+ }
416
+
330
417
  return py::convert(self->obj.Identifier());
331
418
  }
332
419
  catch (...)
@@ -338,14 +425,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
338
425
 
339
426
  static PyObject* LocalLocation_get_PhoneNumber(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
340
427
  {
341
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"PhoneNumber"))
342
- {
343
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
344
- return nullptr;
345
- }
346
-
347
428
  try
348
429
  {
430
+ static std::optional<bool> is_property_present{};
431
+
432
+ if (!is_property_present.has_value())
433
+ {
434
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"PhoneNumber");
435
+ }
436
+
437
+ if (!is_property_present.value())
438
+ {
439
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
440
+ return nullptr;
441
+ }
442
+
349
443
  return py::convert(self->obj.PhoneNumber());
350
444
  }
351
445
  catch (...)
@@ -357,14 +451,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
357
451
 
358
452
  static PyObject* LocalLocation_get_Point(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
359
453
  {
360
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Point"))
361
- {
362
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
363
- return nullptr;
364
- }
365
-
366
454
  try
367
455
  {
456
+ static std::optional<bool> is_property_present{};
457
+
458
+ if (!is_property_present.has_value())
459
+ {
460
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Point");
461
+ }
462
+
463
+ if (!is_property_present.value())
464
+ {
465
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
466
+ return nullptr;
467
+ }
468
+
368
469
  return py::convert(self->obj.Point());
369
470
  }
370
471
  catch (...)
@@ -376,14 +477,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
376
477
 
377
478
  static PyObject* LocalLocation_get_Category(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
378
479
  {
379
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Category"))
380
- {
381
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
382
- return nullptr;
383
- }
384
-
385
480
  try
386
481
  {
482
+ static std::optional<bool> is_property_present{};
483
+
484
+ if (!is_property_present.has_value())
485
+ {
486
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Category");
487
+ }
488
+
489
+ if (!is_property_present.value())
490
+ {
491
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
492
+ return nullptr;
493
+ }
494
+
387
495
  return py::convert(self->obj.Category());
388
496
  }
389
497
  catch (...)
@@ -395,14 +503,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
395
503
 
396
504
  static PyObject* LocalLocation_get_HoursOfOperation(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
397
505
  {
398
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"HoursOfOperation"))
399
- {
400
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
401
- return nullptr;
402
- }
403
-
404
506
  try
405
507
  {
508
+ static std::optional<bool> is_property_present{};
509
+
510
+ if (!is_property_present.has_value())
511
+ {
512
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"HoursOfOperation");
513
+ }
514
+
515
+ if (!is_property_present.value())
516
+ {
517
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
518
+ return nullptr;
519
+ }
520
+
406
521
  return py::convert(self->obj.HoursOfOperation());
407
522
  }
408
523
  catch (...)
@@ -414,14 +529,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
414
529
 
415
530
  static PyObject* LocalLocation_get_RatingInfo(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
416
531
  {
417
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"RatingInfo"))
418
- {
419
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
420
- return nullptr;
421
- }
422
-
423
532
  try
424
533
  {
534
+ static std::optional<bool> is_property_present{};
535
+
536
+ if (!is_property_present.has_value())
537
+ {
538
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"RatingInfo");
539
+ }
540
+
541
+ if (!is_property_present.value())
542
+ {
543
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
544
+ return nullptr;
545
+ }
546
+
425
547
  return py::convert(self->obj.RatingInfo());
426
548
  }
427
549
  catch (...)
@@ -475,23 +597,20 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
475
597
  { }
476
598
  };
477
599
 
478
- static PyType_Slot _type_slots_LocalLocation[] =
479
- {
600
+ static PyType_Slot _type_slots_LocalLocation[] = {
480
601
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocation) },
481
602
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocation) },
482
603
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocation) },
483
604
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocation) },
484
- { },
605
+ { }
485
606
  };
486
607
 
487
- static PyType_Spec type_spec_LocalLocation =
488
- {
608
+ static PyType_Spec type_spec_LocalLocation = {
489
609
  "winrt._winrt_windows_services_maps_localsearch.LocalLocation",
490
610
  sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation),
491
611
  0,
492
612
  Py_TPFLAGS_DEFAULT,
493
- _type_slots_LocalLocation
494
- };
613
+ _type_slots_LocalLocation};
495
614
 
496
615
  // ----- LocalLocationFinder class --------------------
497
616
 
@@ -508,14 +627,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
508
627
 
509
628
  if (arg_count == 4)
510
629
  {
511
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinder", L"FindLocalLocationsAsync", 4))
512
- {
513
- py::set_arg_count_version_error(4);
514
- return nullptr;
515
- }
516
-
517
630
  try
518
631
  {
632
+ static std::optional<bool> is_overload_present{};
633
+
634
+ if (!is_overload_present.has_value())
635
+ {
636
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinder", L"FindLocalLocationsAsync", 4);
637
+ }
638
+
639
+ if (!is_overload_present.value())
640
+ {
641
+ py::set_arg_count_version_error(4);
642
+ return nullptr;
643
+ }
644
+
519
645
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
520
646
  auto param1 = py::convert_to<winrt::Windows::Devices::Geolocation::Geocircle>(args, 1);
521
647
  auto param2 = py::convert_to<winrt::hstring>(args, 2);
@@ -544,22 +670,19 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
544
670
  { }
545
671
  };
546
672
 
547
- static PyType_Slot _type_slots_LocalLocationFinder[] =
548
- {
673
+ static PyType_Slot _type_slots_LocalLocationFinder[] = {
549
674
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationFinder) },
550
675
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationFinder) },
551
676
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationFinder) },
552
- { },
677
+ { }
553
678
  };
554
679
 
555
- static PyType_Spec type_spec_LocalLocationFinder =
556
- {
680
+ static PyType_Spec type_spec_LocalLocationFinder = {
557
681
  "winrt._winrt_windows_services_maps_localsearch.LocalLocationFinder",
558
682
  0,
559
683
  0,
560
684
  Py_TPFLAGS_DEFAULT,
561
- _type_slots_LocalLocationFinder
562
- };
685
+ _type_slots_LocalLocationFinder};
563
686
 
564
687
  static PyGetSetDef getset_LocalLocationFinder_Static[] = {
565
688
  { }
@@ -606,14 +729,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
606
729
 
607
730
  static PyObject* LocalLocationFinderResult_get_LocalLocations(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult* self, void* /*unused*/) noexcept
608
731
  {
609
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"LocalLocations"))
610
- {
611
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
612
- return nullptr;
613
- }
614
-
615
732
  try
616
733
  {
734
+ static std::optional<bool> is_property_present{};
735
+
736
+ if (!is_property_present.has_value())
737
+ {
738
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"LocalLocations");
739
+ }
740
+
741
+ if (!is_property_present.value())
742
+ {
743
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
744
+ return nullptr;
745
+ }
746
+
617
747
  return py::convert(self->obj.LocalLocations());
618
748
  }
619
749
  catch (...)
@@ -625,14 +755,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
625
755
 
626
756
  static PyObject* LocalLocationFinderResult_get_Status(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult* self, void* /*unused*/) noexcept
627
757
  {
628
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"Status"))
629
- {
630
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
631
- return nullptr;
632
- }
633
-
634
758
  try
635
759
  {
760
+ static std::optional<bool> is_property_present{};
761
+
762
+ if (!is_property_present.has_value())
763
+ {
764
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"Status");
765
+ }
766
+
767
+ if (!is_property_present.value())
768
+ {
769
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
770
+ return nullptr;
771
+ }
772
+
636
773
  return py::convert(self->obj.Status());
637
774
  }
638
775
  catch (...)
@@ -678,23 +815,20 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
678
815
  { }
679
816
  };
680
817
 
681
- static PyType_Slot _type_slots_LocalLocationFinderResult[] =
682
- {
818
+ static PyType_Slot _type_slots_LocalLocationFinderResult[] = {
683
819
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationFinderResult) },
684
820
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationFinderResult) },
685
821
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationFinderResult) },
686
822
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationFinderResult) },
687
- { },
823
+ { }
688
824
  };
689
825
 
690
- static PyType_Spec type_spec_LocalLocationFinderResult =
691
- {
826
+ static PyType_Spec type_spec_LocalLocationFinderResult = {
692
827
  "winrt._winrt_windows_services_maps_localsearch.LocalLocationFinderResult",
693
828
  sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult),
694
829
  0,
695
830
  Py_TPFLAGS_DEFAULT,
696
- _type_slots_LocalLocationFinderResult
697
- };
831
+ _type_slots_LocalLocationFinderResult};
698
832
 
699
833
  // ----- LocalLocationHoursOfOperationItem class --------------------
700
834
 
@@ -715,14 +849,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
715
849
 
716
850
  static PyObject* LocalLocationHoursOfOperationItem_get_Day(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
717
851
  {
718
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Day"))
719
- {
720
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
721
- return nullptr;
722
- }
723
-
724
852
  try
725
853
  {
854
+ static std::optional<bool> is_property_present{};
855
+
856
+ if (!is_property_present.has_value())
857
+ {
858
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Day");
859
+ }
860
+
861
+ if (!is_property_present.value())
862
+ {
863
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
864
+ return nullptr;
865
+ }
866
+
726
867
  return py::convert(self->obj.Day());
727
868
  }
728
869
  catch (...)
@@ -734,14 +875,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
734
875
 
735
876
  static PyObject* LocalLocationHoursOfOperationItem_get_Span(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
736
877
  {
737
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Span"))
738
- {
739
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
740
- return nullptr;
741
- }
742
-
743
878
  try
744
879
  {
880
+ static std::optional<bool> is_property_present{};
881
+
882
+ if (!is_property_present.has_value())
883
+ {
884
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Span");
885
+ }
886
+
887
+ if (!is_property_present.value())
888
+ {
889
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
890
+ return nullptr;
891
+ }
892
+
745
893
  return py::convert(self->obj.Span());
746
894
  }
747
895
  catch (...)
@@ -753,14 +901,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
753
901
 
754
902
  static PyObject* LocalLocationHoursOfOperationItem_get_Start(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
755
903
  {
756
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Start"))
757
- {
758
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
759
- return nullptr;
760
- }
761
-
762
904
  try
763
905
  {
906
+ static std::optional<bool> is_property_present{};
907
+
908
+ if (!is_property_present.has_value())
909
+ {
910
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Start");
911
+ }
912
+
913
+ if (!is_property_present.value())
914
+ {
915
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
916
+ return nullptr;
917
+ }
918
+
764
919
  return py::convert(self->obj.Start());
765
920
  }
766
921
  catch (...)
@@ -807,23 +962,20 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
807
962
  { }
808
963
  };
809
964
 
810
- static PyType_Slot _type_slots_LocalLocationHoursOfOperationItem[] =
811
- {
965
+ static PyType_Slot _type_slots_LocalLocationHoursOfOperationItem[] = {
812
966
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationHoursOfOperationItem) },
813
967
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationHoursOfOperationItem) },
814
968
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationHoursOfOperationItem) },
815
969
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationHoursOfOperationItem) },
816
- { },
970
+ { }
817
971
  };
818
972
 
819
- static PyType_Spec type_spec_LocalLocationHoursOfOperationItem =
820
- {
973
+ static PyType_Spec type_spec_LocalLocationHoursOfOperationItem = {
821
974
  "winrt._winrt_windows_services_maps_localsearch.LocalLocationHoursOfOperationItem",
822
975
  sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem),
823
976
  0,
824
977
  Py_TPFLAGS_DEFAULT,
825
- _type_slots_LocalLocationHoursOfOperationItem
826
- };
978
+ _type_slots_LocalLocationHoursOfOperationItem};
827
979
 
828
980
  // ----- LocalLocationRatingInfo class --------------------
829
981
 
@@ -844,14 +996,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
844
996
 
845
997
  static PyObject* LocalLocationRatingInfo_get_AggregateRating(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
846
998
  {
847
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"AggregateRating"))
848
- {
849
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
850
- return nullptr;
851
- }
852
-
853
999
  try
854
1000
  {
1001
+ static std::optional<bool> is_property_present{};
1002
+
1003
+ if (!is_property_present.has_value())
1004
+ {
1005
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"AggregateRating");
1006
+ }
1007
+
1008
+ if (!is_property_present.value())
1009
+ {
1010
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1011
+ return nullptr;
1012
+ }
1013
+
855
1014
  return py::convert(self->obj.AggregateRating());
856
1015
  }
857
1016
  catch (...)
@@ -863,14 +1022,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
863
1022
 
864
1023
  static PyObject* LocalLocationRatingInfo_get_ProviderIdentifier(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
865
1024
  {
866
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"ProviderIdentifier"))
867
- {
868
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
869
- return nullptr;
870
- }
871
-
872
1025
  try
873
1026
  {
1027
+ static std::optional<bool> is_property_present{};
1028
+
1029
+ if (!is_property_present.has_value())
1030
+ {
1031
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"ProviderIdentifier");
1032
+ }
1033
+
1034
+ if (!is_property_present.value())
1035
+ {
1036
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1037
+ return nullptr;
1038
+ }
1039
+
874
1040
  return py::convert(self->obj.ProviderIdentifier());
875
1041
  }
876
1042
  catch (...)
@@ -882,14 +1048,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
882
1048
 
883
1049
  static PyObject* LocalLocationRatingInfo_get_RatingCount(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
884
1050
  {
885
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"RatingCount"))
886
- {
887
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
888
- return nullptr;
889
- }
890
-
891
1051
  try
892
1052
  {
1053
+ static std::optional<bool> is_property_present{};
1054
+
1055
+ if (!is_property_present.has_value())
1056
+ {
1057
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"RatingCount");
1058
+ }
1059
+
1060
+ if (!is_property_present.value())
1061
+ {
1062
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1063
+ return nullptr;
1064
+ }
1065
+
893
1066
  return py::convert(self->obj.RatingCount());
894
1067
  }
895
1068
  catch (...)
@@ -936,23 +1109,20 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
936
1109
  { }
937
1110
  };
938
1111
 
939
- static PyType_Slot _type_slots_LocalLocationRatingInfo[] =
940
- {
1112
+ static PyType_Slot _type_slots_LocalLocationRatingInfo[] = {
941
1113
  { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationRatingInfo) },
942
1114
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationRatingInfo) },
943
1115
  { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationRatingInfo) },
944
1116
  { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationRatingInfo) },
945
- { },
1117
+ { }
946
1118
  };
947
1119
 
948
- static PyType_Spec type_spec_LocalLocationRatingInfo =
949
- {
1120
+ static PyType_Spec type_spec_LocalLocationRatingInfo = {
950
1121
  "winrt._winrt_windows_services_maps_localsearch.LocalLocationRatingInfo",
951
1122
  sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo),
952
1123
  0,
953
1124
  Py_TPFLAGS_DEFAULT,
954
- _type_slots_LocalLocationRatingInfo
955
- };
1125
+ _type_slots_LocalLocationRatingInfo};
956
1126
 
957
1127
  // ----- PlaceInfoHelper class --------------------
958
1128
 
@@ -969,14 +1139,21 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
969
1139
 
970
1140
  if (arg_count == 1)
971
1141
  {
972
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.PlaceInfoHelper", L"CreateFromLocalLocation", 1))
973
- {
974
- py::set_arg_count_version_error(1);
975
- return nullptr;
976
- }
977
-
978
1142
  try
979
1143
  {
1144
+ static std::optional<bool> is_overload_present{};
1145
+
1146
+ if (!is_overload_present.has_value())
1147
+ {
1148
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.PlaceInfoHelper", L"CreateFromLocalLocation", 1);
1149
+ }
1150
+
1151
+ if (!is_overload_present.value())
1152
+ {
1153
+ py::set_arg_count_version_error(1);
1154
+ return nullptr;
1155
+ }
1156
+
980
1157
  auto param0 = py::convert_to<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>(args, 0);
981
1158
 
982
1159
  return py::convert(winrt::Windows::Services::Maps::LocalSearch::PlaceInfoHelper::CreateFromLocalLocation(param0));
@@ -1002,22 +1179,19 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
1002
1179
  { }
1003
1180
  };
1004
1181
 
1005
- static PyType_Slot _type_slots_PlaceInfoHelper[] =
1006
- {
1182
+ static PyType_Slot _type_slots_PlaceInfoHelper[] = {
1007
1183
  { Py_tp_new, reinterpret_cast<void*>(_new_PlaceInfoHelper) },
1008
1184
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PlaceInfoHelper) },
1009
1185
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PlaceInfoHelper) },
1010
- { },
1186
+ { }
1011
1187
  };
1012
1188
 
1013
- static PyType_Spec type_spec_PlaceInfoHelper =
1014
- {
1189
+ static PyType_Spec type_spec_PlaceInfoHelper = {
1015
1190
  "winrt._winrt_windows_services_maps_localsearch.PlaceInfoHelper",
1016
1191
  0,
1017
1192
  0,
1018
1193
  Py_TPFLAGS_DEFAULT,
1019
- _type_slots_PlaceInfoHelper
1020
- };
1194
+ _type_slots_PlaceInfoHelper};
1021
1195
 
1022
1196
  static PyGetSetDef getset_PlaceInfoHelper_Static[] = {
1023
1197
  { }
@@ -1046,20 +1220,19 @@ namespace py::cpp::Windows::Services::Maps::LocalSearch
1046
1220
  };
1047
1221
 
1048
1222
  // ----- Windows.Services.Maps.LocalSearch Initialization --------------------
1049
- PyDoc_STRVAR(module_doc, "Windows::Services::Maps::LocalSearch");
1050
1223
 
1224
+ PyDoc_STRVAR(module_doc, "Windows.Services.Maps.LocalSearch");
1051
1225
 
1052
- static PyModuleDef module_def
1053
- = {PyModuleDef_HEAD_INIT,
1054
- "_winrt_windows_services_maps_localsearch",
1055
- module_doc,
1056
- 0,
1057
- nullptr,
1058
- nullptr,
1059
- nullptr,
1060
- nullptr,
1061
- nullptr};
1062
-
1226
+ static PyModuleDef module_def = {
1227
+ PyModuleDef_HEAD_INIT,
1228
+ "_winrt_windows_services_maps_localsearch",
1229
+ module_doc,
1230
+ 0,
1231
+ nullptr,
1232
+ nullptr,
1233
+ nullptr,
1234
+ nullptr,
1235
+ nullptr};
1063
1236
  } // py::cpp::Windows::Services::Maps::LocalSearch
1064
1237
 
1065
1238
  PyMODINIT_FUNC PyInit__winrt_windows_services_maps_localsearch(void) noexcept
@@ -1097,12 +1270,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_services_maps_localsearch(void) noexcept
1097
1270
  return nullptr;
1098
1271
  }
1099
1272
 
1100
- if (py::register_python_type(module.get(), &type_spec_LocalCategories, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalCategories_Static.get())) == -1)
1273
+ py::pytype_handle LocalCategories_type{py::register_python_type(module.get(), &type_spec_LocalCategories, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalCategories_Static.get()))};
1274
+ if (!LocalCategories_type)
1101
1275
  {
1102
1276
  return nullptr;
1103
1277
  }
1104
1278
 
1105
- if (py::register_python_type(module.get(), &type_spec_LocalLocation, object_bases.get(), nullptr) == -1)
1279
+ py::pytype_handle LocalLocation_type{py::register_python_type(module.get(), &type_spec_LocalLocation, object_bases.get(), nullptr)};
1280
+ if (!LocalLocation_type)
1106
1281
  {
1107
1282
  return nullptr;
1108
1283
  }
@@ -1113,22 +1288,26 @@ PyMODINIT_FUNC PyInit__winrt_windows_services_maps_localsearch(void) noexcept
1113
1288
  return nullptr;
1114
1289
  }
1115
1290
 
1116
- if (py::register_python_type(module.get(), &type_spec_LocalLocationFinder, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalLocationFinder_Static.get())) == -1)
1291
+ py::pytype_handle LocalLocationFinder_type{py::register_python_type(module.get(), &type_spec_LocalLocationFinder, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalLocationFinder_Static.get()))};
1292
+ if (!LocalLocationFinder_type)
1117
1293
  {
1118
1294
  return nullptr;
1119
1295
  }
1120
1296
 
1121
- if (py::register_python_type(module.get(), &type_spec_LocalLocationFinderResult, object_bases.get(), nullptr) == -1)
1297
+ py::pytype_handle LocalLocationFinderResult_type{py::register_python_type(module.get(), &type_spec_LocalLocationFinderResult, object_bases.get(), nullptr)};
1298
+ if (!LocalLocationFinderResult_type)
1122
1299
  {
1123
1300
  return nullptr;
1124
1301
  }
1125
1302
 
1126
- if (py::register_python_type(module.get(), &type_spec_LocalLocationHoursOfOperationItem, object_bases.get(), nullptr) == -1)
1303
+ py::pytype_handle LocalLocationHoursOfOperationItem_type{py::register_python_type(module.get(), &type_spec_LocalLocationHoursOfOperationItem, object_bases.get(), nullptr)};
1304
+ if (!LocalLocationHoursOfOperationItem_type)
1127
1305
  {
1128
1306
  return nullptr;
1129
1307
  }
1130
1308
 
1131
- if (py::register_python_type(module.get(), &type_spec_LocalLocationRatingInfo, object_bases.get(), nullptr) == -1)
1309
+ py::pytype_handle LocalLocationRatingInfo_type{py::register_python_type(module.get(), &type_spec_LocalLocationRatingInfo, object_bases.get(), nullptr)};
1310
+ if (!LocalLocationRatingInfo_type)
1132
1311
  {
1133
1312
  return nullptr;
1134
1313
  }
@@ -1139,7 +1318,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_services_maps_localsearch(void) noexcept
1139
1318
  return nullptr;
1140
1319
  }
1141
1320
 
1142
- if (py::register_python_type(module.get(), &type_spec_PlaceInfoHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PlaceInfoHelper_Static.get())) == -1)
1321
+ py::pytype_handle PlaceInfoHelper_type{py::register_python_type(module.get(), &type_spec_PlaceInfoHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PlaceInfoHelper_Static.get()))};
1322
+ if (!PlaceInfoHelper_type)
1143
1323
  {
1144
1324
  return nullptr;
1145
1325
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # suppress warnings about ARM64 testing
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,11 +9,11 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.devices.geolocation
13
- import winrt.windows.foundation
14
- import winrt.windows.foundation.collections
15
- import winrt.windows.globalization
16
- import winrt.windows.services.maps
12
+ import winrt.windows.devices.geolocation as windows_devices_geolocation
13
+ import winrt.windows.foundation as windows_foundation
14
+ import winrt.windows.foundation.collections as windows_foundation_collections
15
+ import winrt.windows.globalization as windows_globalization
16
+ import winrt.windows.services.maps as windows_services_maps
17
17
 
18
18
  from winrt.windows.services.maps.localsearch import LocalLocationFinderStatus
19
19
 
@@ -40,15 +40,14 @@ class LocalCategories_Static(type):
40
40
 
41
41
  @typing.final
42
42
  class LocalCategories(winrt.system.Object, metaclass=LocalCategories_Static):
43
- @staticmethod
44
- def _from(obj: winrt.system.Object, /) -> LocalCategories: ...
43
+ pass
45
44
 
46
45
  @typing.final
47
46
  class LocalLocation(winrt.system.Object):
48
47
  @staticmethod
49
48
  def _from(obj: winrt.system.Object, /) -> LocalLocation: ...
50
49
  @_property
51
- def address(self) -> typing.Optional[winrt.windows.services.maps.MapAddress]: ...
50
+ def address(self) -> typing.Optional[windows_services_maps.MapAddress]: ...
52
51
  @_property
53
52
  def data_attribution(self) -> str: ...
54
53
  @_property
@@ -60,29 +59,28 @@ class LocalLocation(winrt.system.Object):
60
59
  @_property
61
60
  def phone_number(self) -> str: ...
62
61
  @_property
63
- def point(self) -> typing.Optional[winrt.windows.devices.geolocation.Geopoint]: ...
62
+ def point(self) -> typing.Optional[windows_devices_geolocation.Geopoint]: ...
64
63
  @_property
65
64
  def category(self) -> str: ...
66
65
  @_property
67
- def hours_of_operation(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[LocalLocationHoursOfOperationItem]]: ...
66
+ def hours_of_operation(self) -> typing.Optional[windows_foundation_collections.IVectorView[LocalLocationHoursOfOperationItem]]: ...
68
67
  @_property
69
68
  def rating_info(self) -> typing.Optional[LocalLocationRatingInfo]: ...
70
69
 
71
70
  @typing.final
72
71
  class LocalLocationFinder_Static(type):
73
- def find_local_locations_async(cls, search_term: str, search_area: typing.Optional[winrt.windows.devices.geolocation.Geocircle], local_category: str, max_results: winrt.system.UInt32, /) -> winrt.windows.foundation.IAsyncOperation[LocalLocationFinderResult]: ...
72
+ def find_local_locations_async(cls, search_term: str, search_area: typing.Optional[windows_devices_geolocation.Geocircle], local_category: str, max_results: winrt.system.UInt32, /) -> windows_foundation.IAsyncOperation[LocalLocationFinderResult]: ...
74
73
 
75
74
  @typing.final
76
75
  class LocalLocationFinder(winrt.system.Object, metaclass=LocalLocationFinder_Static):
77
- @staticmethod
78
- def _from(obj: winrt.system.Object, /) -> LocalLocationFinder: ...
76
+ pass
79
77
 
80
78
  @typing.final
81
79
  class LocalLocationFinderResult(winrt.system.Object):
82
80
  @staticmethod
83
81
  def _from(obj: winrt.system.Object, /) -> LocalLocationFinderResult: ...
84
82
  @_property
85
- def local_locations(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[LocalLocation]]: ...
83
+ def local_locations(self) -> typing.Optional[windows_foundation_collections.IVectorView[LocalLocation]]: ...
86
84
  @_property
87
85
  def status(self) -> LocalLocationFinderStatus: ...
88
86
 
@@ -91,7 +89,7 @@ class LocalLocationHoursOfOperationItem(winrt.system.Object):
91
89
  @staticmethod
92
90
  def _from(obj: winrt.system.Object, /) -> LocalLocationHoursOfOperationItem: ...
93
91
  @_property
94
- def day(self) -> winrt.windows.globalization.DayOfWeek: ...
92
+ def day(self) -> windows_globalization.DayOfWeek: ...
95
93
  @_property
96
94
  def span(self) -> datetime.timedelta: ...
97
95
  @_property
@@ -110,10 +108,9 @@ class LocalLocationRatingInfo(winrt.system.Object):
110
108
 
111
109
  @typing.final
112
110
  class PlaceInfoHelper_Static(type):
113
- def create_from_local_location(cls, location: typing.Optional[LocalLocation], /) -> typing.Optional[winrt.windows.services.maps.PlaceInfo]: ...
111
+ def create_from_local_location(cls, location: typing.Optional[LocalLocation], /) -> typing.Optional[windows_services_maps.PlaceInfo]: ...
114
112
 
115
113
  @typing.final
116
114
  class PlaceInfoHelper(winrt.system.Object, metaclass=PlaceInfoHelper_Static):
117
- @staticmethod
118
- def _from(obj: winrt.system.Object, /) -> PlaceInfoHelper: ...
115
+ pass
119
116
 
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Services.Maps.LocalSearch
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Geolocation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Globalization[all]==2.0.1; extra == "all"
21
- Requires-Dist: winrt-Windows.Services.Maps[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Geolocation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Globalization[all]==2.2.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Services.Maps[all]==2.2.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.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Devices.Geolocation[all]==2.2.0
5
+ winrt-Windows.Foundation[all]==2.2.0
6
+ winrt-Windows.Foundation.Collections[all]==2.2.0
7
+ winrt-Windows.Globalization[all]==2.2.0
8
+ winrt-Windows.Services.Maps[all]==2.2.0
@@ -1,7 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Devices.Geolocation[all]==2.0.1
4
- winrt-Windows.Foundation[all]==2.0.1
5
- winrt-Windows.Foundation.Collections[all]==2.0.1
6
- winrt-Windows.Globalization[all]==2.0.1
7
- winrt-Windows.Services.Maps[all]==2.0.1
@@ -1,8 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Devices.Geolocation[all]==2.0.1
5
- winrt-Windows.Foundation[all]==2.0.1
6
- winrt-Windows.Foundation.Collections[all]==2.0.1
7
- winrt-Windows.Globalization[all]==2.0.1
8
- winrt-Windows.Services.Maps[all]==2.0.1