winrt-Windows.Perception 2.0.1__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/PKG-INFO +4 -4
  2. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/all-requirements.txt +2 -2
  3. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/py.Windows.Perception.cpp +89 -60
  4. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_perception-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt/_winrt_windows_perception.pyi +3 -4
  8. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt/windows/perception/__init__.py +1 -1
  9. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt_Windows.Perception.egg-info/PKG-INFO +4 -4
  10. winrt_windows_perception-2.2.0/winrt_Windows.Perception.egg-info/requires.txt +4 -0
  11. winrt_windows_perception-2.0.1/pywinrt-version.txt +0 -1
  12. winrt_windows_perception-2.0.1/winrt_Windows.Perception.egg-info/requires.txt +0 -4
  13. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/README.md +0 -0
  14. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/setup.cfg +0 -0
  15. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/setup.py +0 -0
  16. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt/windows/perception/py.typed +0 -0
  17. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt_Windows.Perception.egg-info/SOURCES.txt +0 -0
  18. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt_Windows.Perception.egg-info/dependency_links.txt +0 -0
  19. {winrt_windows_perception-2.0.1 → winrt_windows_perception-2.2.0}/winrt_Windows.Perception.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Perception
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-Windows.Foundation[all]==2.0.1
3
+ winrt-Windows.Foundation[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.Perception.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Perception
7
6
  {
8
7
  // ----- PerceptionTimestamp class --------------------
@@ -24,14 +23,21 @@ namespace py::cpp::Windows::Perception
24
23
 
25
24
  static PyObject* PerceptionTimestamp_get_PredictionAmount(py::wrapper::Windows::Perception::PerceptionTimestamp* self, void* /*unused*/) noexcept
26
25
  {
27
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"PredictionAmount"))
28
- {
29
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
30
- return nullptr;
31
- }
32
-
33
26
  try
34
27
  {
28
+ static std::optional<bool> is_property_present{};
29
+
30
+ if (!is_property_present.has_value())
31
+ {
32
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"PredictionAmount");
33
+ }
34
+
35
+ if (!is_property_present.value())
36
+ {
37
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
38
+ return nullptr;
39
+ }
40
+
35
41
  return py::convert(self->obj.PredictionAmount());
36
42
  }
37
43
  catch (...)
@@ -43,14 +49,21 @@ namespace py::cpp::Windows::Perception
43
49
 
44
50
  static PyObject* PerceptionTimestamp_get_TargetTime(py::wrapper::Windows::Perception::PerceptionTimestamp* self, void* /*unused*/) noexcept
45
51
  {
46
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"TargetTime"))
47
- {
48
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
49
- return nullptr;
50
- }
51
-
52
52
  try
53
53
  {
54
+ static std::optional<bool> is_property_present{};
55
+
56
+ if (!is_property_present.has_value())
57
+ {
58
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"TargetTime");
59
+ }
60
+
61
+ if (!is_property_present.value())
62
+ {
63
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
64
+ return nullptr;
65
+ }
66
+
54
67
  return py::convert(self->obj.TargetTime());
55
68
  }
56
69
  catch (...)
@@ -62,14 +75,21 @@ namespace py::cpp::Windows::Perception
62
75
 
63
76
  static PyObject* PerceptionTimestamp_get_SystemRelativeTargetTime(py::wrapper::Windows::Perception::PerceptionTimestamp* self, void* /*unused*/) noexcept
64
77
  {
65
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"SystemRelativeTargetTime"))
66
- {
67
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
68
- return nullptr;
69
- }
70
-
71
78
  try
72
79
  {
80
+ static std::optional<bool> is_property_present{};
81
+
82
+ if (!is_property_present.has_value())
83
+ {
84
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Perception.PerceptionTimestamp", L"SystemRelativeTargetTime");
85
+ }
86
+
87
+ if (!is_property_present.value())
88
+ {
89
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
90
+ return nullptr;
91
+ }
92
+
73
93
  return py::convert(self->obj.SystemRelativeTargetTime());
74
94
  }
75
95
  catch (...)
@@ -116,23 +136,20 @@ namespace py::cpp::Windows::Perception
116
136
  { }
117
137
  };
118
138
 
119
- static PyType_Slot _type_slots_PerceptionTimestamp[] =
120
- {
139
+ static PyType_Slot _type_slots_PerceptionTimestamp[] = {
121
140
  { Py_tp_new, reinterpret_cast<void*>(_new_PerceptionTimestamp) },
122
141
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PerceptionTimestamp) },
123
142
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PerceptionTimestamp) },
124
143
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PerceptionTimestamp) },
125
- { },
144
+ { }
126
145
  };
127
146
 
128
- static PyType_Spec type_spec_PerceptionTimestamp =
129
- {
147
+ static PyType_Spec type_spec_PerceptionTimestamp = {
130
148
  "winrt._winrt_windows_perception.PerceptionTimestamp",
131
149
  sizeof(py::wrapper::Windows::Perception::PerceptionTimestamp),
132
150
  0,
133
151
  Py_TPFLAGS_DEFAULT,
134
- _type_slots_PerceptionTimestamp
135
- };
152
+ _type_slots_PerceptionTimestamp};
136
153
 
137
154
  // ----- PerceptionTimestampHelper class --------------------
138
155
 
@@ -149,14 +166,21 @@ namespace py::cpp::Windows::Perception
149
166
 
150
167
  if (arg_count == 1)
151
168
  {
152
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.PerceptionTimestampHelper", L"FromHistoricalTargetTime", 1))
153
- {
154
- py::set_arg_count_version_error(1);
155
- return nullptr;
156
- }
157
-
158
169
  try
159
170
  {
171
+ static std::optional<bool> is_overload_present{};
172
+
173
+ if (!is_overload_present.has_value())
174
+ {
175
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.PerceptionTimestampHelper", L"FromHistoricalTargetTime", 1);
176
+ }
177
+
178
+ if (!is_overload_present.value())
179
+ {
180
+ py::set_arg_count_version_error(1);
181
+ return nullptr;
182
+ }
183
+
160
184
  auto param0 = py::convert_to<winrt::Windows::Foundation::DateTime>(args, 0);
161
185
 
162
186
  return py::convert(winrt::Windows::Perception::PerceptionTimestampHelper::FromHistoricalTargetTime(param0));
@@ -180,14 +204,21 @@ namespace py::cpp::Windows::Perception
180
204
 
181
205
  if (arg_count == 1)
182
206
  {
183
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.PerceptionTimestampHelper", L"FromSystemRelativeTargetTime", 1))
184
- {
185
- py::set_arg_count_version_error(1);
186
- return nullptr;
187
- }
188
-
189
207
  try
190
208
  {
209
+ static std::optional<bool> is_overload_present{};
210
+
211
+ if (!is_overload_present.has_value())
212
+ {
213
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Perception.PerceptionTimestampHelper", L"FromSystemRelativeTargetTime", 1);
214
+ }
215
+
216
+ if (!is_overload_present.value())
217
+ {
218
+ py::set_arg_count_version_error(1);
219
+ return nullptr;
220
+ }
221
+
191
222
  auto param0 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 0);
192
223
 
193
224
  return py::convert(winrt::Windows::Perception::PerceptionTimestampHelper::FromSystemRelativeTargetTime(param0));
@@ -213,22 +244,19 @@ namespace py::cpp::Windows::Perception
213
244
  { }
214
245
  };
215
246
 
216
- static PyType_Slot _type_slots_PerceptionTimestampHelper[] =
217
- {
247
+ static PyType_Slot _type_slots_PerceptionTimestampHelper[] = {
218
248
  { Py_tp_new, reinterpret_cast<void*>(_new_PerceptionTimestampHelper) },
219
249
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PerceptionTimestampHelper) },
220
250
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PerceptionTimestampHelper) },
221
- { },
251
+ { }
222
252
  };
223
253
 
224
- static PyType_Spec type_spec_PerceptionTimestampHelper =
225
- {
254
+ static PyType_Spec type_spec_PerceptionTimestampHelper = {
226
255
  "winrt._winrt_windows_perception.PerceptionTimestampHelper",
227
256
  0,
228
257
  0,
229
258
  Py_TPFLAGS_DEFAULT,
230
- _type_slots_PerceptionTimestampHelper
231
- };
259
+ _type_slots_PerceptionTimestampHelper};
232
260
 
233
261
  static PyGetSetDef getset_PerceptionTimestampHelper_Static[] = {
234
262
  { }
@@ -258,20 +286,19 @@ namespace py::cpp::Windows::Perception
258
286
  };
259
287
 
260
288
  // ----- Windows.Perception Initialization --------------------
261
- PyDoc_STRVAR(module_doc, "Windows::Perception");
262
-
263
289
 
264
- static PyModuleDef module_def
265
- = {PyModuleDef_HEAD_INIT,
266
- "_winrt_windows_perception",
267
- module_doc,
268
- 0,
269
- nullptr,
270
- nullptr,
271
- nullptr,
272
- nullptr,
273
- nullptr};
290
+ PyDoc_STRVAR(module_doc, "Windows.Perception");
274
291
 
292
+ static PyModuleDef module_def = {
293
+ PyModuleDef_HEAD_INIT,
294
+ "_winrt_windows_perception",
295
+ module_doc,
296
+ 0,
297
+ nullptr,
298
+ nullptr,
299
+ nullptr,
300
+ nullptr,
301
+ nullptr};
275
302
  } // py::cpp::Windows::Perception
276
303
 
277
304
  PyMODINIT_FUNC PyInit__winrt_windows_perception(void) noexcept
@@ -303,7 +330,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_perception(void) noexcept
303
330
  return nullptr;
304
331
  }
305
332
 
306
- if (py::register_python_type(module.get(), &type_spec_PerceptionTimestamp, object_bases.get(), nullptr) == -1)
333
+ py::pytype_handle PerceptionTimestamp_type{py::register_python_type(module.get(), &type_spec_PerceptionTimestamp, object_bases.get(), nullptr)};
334
+ if (!PerceptionTimestamp_type)
307
335
  {
308
336
  return nullptr;
309
337
  }
@@ -314,7 +342,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_perception(void) noexcept
314
342
  return nullptr;
315
343
  }
316
344
 
317
- if (py::register_python_type(module.get(), &type_spec_PerceptionTimestampHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PerceptionTimestampHelper_Static.get())) == -1)
345
+ py::pytype_handle PerceptionTimestampHelper_type{py::register_python_type(module.get(), &type_spec_PerceptionTimestampHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PerceptionTimestampHelper_Static.get()))};
346
+ if (!PerceptionTimestampHelper_type)
318
347
  {
319
348
  return nullptr;
320
349
  }
@@ -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
@@ -0,0 +1 @@
1
+ 2.2.0
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,7 +9,7 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
12
+ import winrt.windows.foundation as windows_foundation
13
13
 
14
14
  Self = typing.TypeVar('Self')
15
15
 
@@ -31,6 +31,5 @@ class PerceptionTimestampHelper_Static(type):
31
31
 
32
32
  @typing.final
33
33
  class PerceptionTimestampHelper(winrt.system.Object, metaclass=PerceptionTimestampHelper_Static):
34
- @staticmethod
35
- def _from(obj: winrt.system.Object, /) -> PerceptionTimestampHelper: ...
34
+ pass
36
35
 
@@ -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 winrt.system
4
4
  from winrt import _winrt_windows_perception
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Perception
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1 +0,0 @@
1
- 2.0.1
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1